36,17 → 36,18 |
#define LIBC_FIBRIL_H_ |
|
#include <libarch/fibril.h> |
#include <libadt/list.h> |
#include <adt/list.h> |
#include <libarch/tls.h> |
|
#ifndef context_set |
#define context_set(c, _pc, stack, size, ptls) \ |
(c)->pc = (sysarg_t) (_pc); \ |
(c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \ |
(c)->tls = (sysarg_t) (ptls); |
#define context_set(c, _pc, stack, size, ptls) \ |
(c)->pc = (sysarg_t) (_pc); \ |
(c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \ |
(c)->tls = (sysarg_t) (ptls); |
#endif /* context_set */ |
|
#define FIBRIL_SERIALIZED 1 |
#define FIBRIL_SERIALIZED 1 |
#define FIBRIL_WRITER 2 |
|
typedef enum { |
FIBRIL_PREEMPT, |
71,6 → 72,9 |
}; |
typedef struct fibril fibril_t; |
|
/** Fibril-local variable specifier */ |
#define fibril_local __thread |
|
extern int context_save(context_t *c); |
extern void context_restore(context_t *c) __attribute__ ((noreturn)); |
|