Implement SCHED_RR
This commit is contained in:
@@ -27,11 +27,17 @@
|
||||
*/
|
||||
|
||||
typedef uint32_t chopstx_t;
|
||||
typedef uint8_t chopstx_prio_t;
|
||||
|
||||
/* NOTE: This signature is different to PTHREAD's one. */
|
||||
chopstx_t
|
||||
chopstx_create (uint8_t prio, uint32_t stack_addr, size_t stack_size,
|
||||
chopstx_create (uint32_t flags_and_prio,
|
||||
uint32_t stack_addr, size_t stack_size,
|
||||
void *(thread_entry) (void *), void *);
|
||||
#define CHOPSTX_PRIO_BITS 8
|
||||
#define CHOPSTX_DETACHED 0x10000
|
||||
#define CHOPSTX_SCHED_RR 0x20000
|
||||
|
||||
|
||||
void chopstx_usec_wait (uint32_t useconds);
|
||||
|
||||
@@ -39,7 +45,6 @@ struct chx_spinlock {
|
||||
/* nothing for uniprocessor. */
|
||||
};
|
||||
|
||||
typedef uint8_t chopstx_prio_t;
|
||||
typedef struct chx_mtx {
|
||||
struct {
|
||||
struct chx_thread *next, *prev;
|
||||
|
||||
Reference in New Issue
Block a user