Projekte
workwind
Multitasking 1
thread.h
Projekte
Forum
Doku
Öffentliche Projekte
Startseite
Beispielprogramme
Projekte von anderen
Welcome
Username
Passwort
Eingeloggt bleiben
Zugangsdaten vergessen?
Registrieren
Projektverwaltung
⇨ Please choose! ⇦
——————————————————
✎ Create new project...
★ Browse existing projects...
——————————————————
⚬ MotorTest#1
⚬ C Tutorial 8#1
⚬ NIBO2 C Project#1
⚙ C Tutorial 15#1
⚬ 2010_11_18_el_test001#1
Multitasking 1
cdll.c
cdll.h
main.c
scheduler.S
thread.c
thread.h
Project details
Compiler settings
Nachrichten
Sie sind nicht eingeloggt.
Neuigkeiten
★
NiboRoboLib 3.6
2017-01-17: Neue Version 3.6
★
NiboRoboLib 3.4.1
2016-04-16: Neue Version 3.4.1
★
Coding Tutorial
2015-11-22: Jetzt auch für den NIBO burger!
Site-Statistic
7416 private projects
378 public projects
16172649 lines compiled
58122 builds
NIBO
@
multitasking_1/thread.h [read only]
#ifndef THREAD_H #define THREAD_H #include "cdll.h" #include <stdint.h> #define THREAD_PRIO_MAX 4 enum { THREAD_READY = 0x01, // in ready list THREAD_WAIT = 0x02, // in wait list THREAD_WAITTIME = 0x03 // in wait timeout list }; typedef struct _thread_s { cdll_t list; // ptr[0...3] uint8_t priority; // ptr[4] uint8_t state; // ptr[5] uint16_t signal_cnt; // ptr[6...7] uint16_t wait_timeout; // ptr[8...9] void * stackpointer; // ptr[10...11] } thread_t; extern thread_t primaryThread; extern volatile thread_t * running_thread; typedef void thread_main_t(void * arg); void thread_startScheduler(uint8_t priority); void thread_create(thread_t * thread, void * stack, uint16_t stack_size, uint8_t priority); void thread_start(thread_t * thread, thread_main_t * mainFunc, void * arg); void thread_delete(thread_t * thread); void thread_yield(); void thread_wait(); void thread_waitTimeout(uint16_t timeout); void thread_signal(thread_t * thread); void thread_signalISR(thread_t * thread); inline static thread_t * thread_getCurrent() {return (thread_t *) running_thread;} #endif
Compiler results:
Werbung
Online
anniestarr166704752
brandi20b03191419
carollamson4653652
dustinbaldridge38
jeffryaiello27385282
kinay25036512297240
nilawhitelaw039161899
noelgerste704576016
ola03c531405628257
orlandomckenzie895
reneedillon5507
shannanbury30913456