Created
December 9, 2012 16:52
-
-
Save alisnic/4246021 to your computer and use it in GitHub Desktop.
the Task data structure definition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define TASK_STACK_SIZE 512 | |
typedef enum { | |
TS_RUNNABLE = 1, TS_BLOCKED = 2, TS_ZOMBIE = 3 | |
} task_status_t; | |
typedef struct { | |
jmp_buf state; | |
task_status_t status; | |
unsigned char stack[TASK_STACK_SIZE]; | |
} task_t; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment