Rev 1125 | Rev 1129 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1125 | Rev 1128 | ||
|---|---|---|---|
| Line 42... | Line 42... | ||
| 42 | typedef sysarg_t pstid_t; |
42 | typedef sysarg_t pstid_t; |
| 43 | 43 | ||
| 44 | struct psthread_data { |
44 | struct psthread_data { |
| 45 | struct psthread_data *self; /* ia32, amd64 needs to get self address */ |
45 | struct psthread_data *self; /* ia32, amd64 needs to get self address */ |
| 46 | 46 | ||
| 47 | link_t list; |
47 | link_t link; |
| 48 | context_t ctx; |
48 | context_t ctx; |
| 49 | void *stack; |
49 | void *stack; |
| 50 | void *arg; |
50 | void *arg; |
| 51 | int (*func)(void *); |
51 | int (*func)(void *); |
| 52 | 52 | ||
| Line 59... | Line 59... | ||
| 59 | 59 | ||
| 60 | extern int context_save(context_t *c); |
60 | extern int context_save(context_t *c); |
| 61 | extern void context_restore(context_t *c) __attribute__ ((noreturn)); |
61 | extern void context_restore(context_t *c) __attribute__ ((noreturn)); |
| 62 | 62 | ||
| 63 | pstid_t psthread_create(int (*func)(void *), void *arg); |
63 | pstid_t psthread_create(int (*func)(void *), void *arg); |
| 64 | int ps_preempt(void); |
64 | int psthread_schedule_next(void); |
| 65 | int ps_join(pstid_t psthrid); |
65 | int psthread_join(pstid_t psthrid); |
| 66 | 66 | ||
| 67 | #endif |
67 | #endif |