1 #ifndef DDEKIT_SRC_THREAD_H
2 #define DDEKIT_SRC_THREAD_H 1
3 #include <ddekit/thread.h>
4 #include <ddekit/semaphore.h>
7 #define DDEKIT_THREAD_NAMELEN 32
8 #define DDEKIT_THREAD_PRIOS 3
9 #define DDEKIT_THREAD_STDPRIO 1
11 #define DDEKIT_THREAD_STACKSIZE (4096*16)
13 /* This threadlib makes following assumptions:
16 * No blocking syscalls
20 struct ddekit_thread
{
28 char name
[DDEKIT_THREAD_NAMELEN
];
30 ddekit_sem_t
*sleep_sem
;
31 struct ddekit_thread
* next
;
35 void _ddekit_thread_set_myprio(int prio
);
36 void _ddekit_thread_enqueue(ddekit_thread_t
*th
);
37 void _ddekit_thread_schedule();
38 void _ddekit_thread_wakeup_sleeping();
39 void _ddekit_print_backtrace(ddekit_thread_t
*th
);