Rev 2482 | Rev 2568 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2482 | Rev 2483 | ||
|---|---|---|---|
| Line 47... | Line 47... | ||
| 47 | #endif /* context_set */ |
47 | #endif /* context_set */ |
| 48 | 48 | ||
| 49 | #define FIBRIL_SERIALIZED 1 |
49 | #define FIBRIL_SERIALIZED 1 |
| 50 | 50 | ||
| 51 | typedef enum { |
51 | typedef enum { |
| 52 | FIBRIL_SLEEP, |
- | |
| 53 | FIBRIL_PREEMPT, |
52 | FIBRIL_PREEMPT, |
| 54 | FIBRIL_TO_MANAGER, |
53 | FIBRIL_TO_MANAGER, |
| 55 | FIBRIL_FROM_MANAGER, |
54 | FIBRIL_FROM_MANAGER, |
| 56 | FIBRIL_FROM_DEAD |
55 | FIBRIL_FROM_DEAD |
| 57 | } fibril_switch_type_t; |
56 | } fibril_switch_type_t; |
| Line 65... | Line 64... | ||
| 65 | void *arg; |
64 | void *arg; |
| 66 | int (*func)(void *); |
65 | int (*func)(void *); |
| 67 | tcb_t *tcb; |
66 | tcb_t *tcb; |
| 68 | 67 | ||
| 69 | struct fibril *clean_after_me; |
68 | struct fibril *clean_after_me; |
| 70 | struct fibril *joiner; |
- | |
| 71 | int joinee_retval; |
- | |
| 72 | int retval; |
69 | int retval; |
| 73 | int flags; |
70 | int flags; |
| 74 | }; |
71 | }; |
| 75 | typedef struct fibril fibril_t; |
72 | typedef struct fibril fibril_t; |
| 76 | 73 | ||
| 77 | extern int context_save(context_t *c); |
74 | extern int context_save(context_t *c); |
| 78 | extern void context_restore(context_t *c) __attribute__ ((noreturn)); |
75 | extern void context_restore(context_t *c) __attribute__ ((noreturn)); |
| 79 | 76 | ||
| 80 | extern fid_t fibril_create(int (*func)(void *), void *arg); |
77 | extern fid_t fibril_create(int (*func)(void *), void *arg); |
| 81 | extern int fibril_join(fid_t fid); |
- | |
| 82 | extern fibril_t *fibril_setup(void); |
78 | extern fibril_t *fibril_setup(void); |
| 83 | extern void fibril_teardown(fibril_t *f); |
79 | extern void fibril_teardown(fibril_t *f); |
| 84 | extern int fibril_schedule_next_adv(fibril_switch_type_t stype); |
80 | extern int fibril_schedule_next_adv(fibril_switch_type_t stype); |
| 85 | extern void fibril_add_ready(fid_t fid); |
81 | extern void fibril_add_ready(fid_t fid); |
| 86 | extern void fibril_add_manager(fid_t fid); |
82 | extern void fibril_add_manager(fid_t fid); |