Skip to content

Instantly share code, notes, and snippets.

@alisnic
Created December 9, 2012 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alisnic/4246021 to your computer and use it in GitHub Desktop.
Save alisnic/4246021 to your computer and use it in GitHub Desktop.
the Task data structure definition
#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