Changes in uspace/lib/libc/include/fibril.h [b1d3c36:ec8b0dac] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/include/fibril.h
rb1d3c36 rec8b0dac 40 40 #include <libarch/tls.h> 41 41 42 #define context_set_generic(c, _pc, stack, size, ptls) \ 42 #ifndef context_set 43 #define context_set(c, _pc, stack, size, ptls) \ 43 44 (c)->pc = (sysarg_t) (_pc); \ 44 45 (c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \ 45 46 (c)->tls = (sysarg_t) (ptls); 47 #endif /* context_set */ 46 48 47 #define FIBRIL_SERIALIZED 48 #define FIBRIL_WRITER 49 #define FIBRIL_SERIALIZED 1 50 #define FIBRIL_WRITER 2 49 51 50 52 typedef enum { … … 57 59 typedef sysarg_t fid_t; 58 60 59 typedefstruct fibril {61 struct fibril { 60 62 link_t link; 61 63 context_t ctx; … … 68 70 int retval; 69 71 int flags; 70 } fibril_t; 72 }; 73 typedef struct fibril fibril_t; 71 74 72 75 /** Fibril-local variable specifier */ 73 76 #define fibril_local __thread 74 77 75 extern int context_save(context_t *c tx) __attribute__((returns_twice));76 extern void context_restore(context_t *c tx) __attribute__((noreturn));78 extern int context_save(context_t *c) __attribute__ ((returns_twice)); 79 extern void context_restore(context_t *c) __attribute__ ((noreturn)); 77 80 78 81 extern fid_t fibril_create(int (*func)(void *), void *arg); … … 87 90 extern void fibril_dec_sercount(void); 88 91 89 static inline int fibril_yield(void) 90 { 92 static inline int fibril_yield(void) { 91 93 return fibril_switch(FIBRIL_PREEMPT); 92 94 }
Note:
See TracChangeset
for help on using the changeset viewer.