Changes in uspace/lib/c/arch/mips64/include/fibril.h [9d58539:2429e4a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/mips64/include/fibril.h
r9d58539 r2429e4a 38 38 39 39 #include <sys/types.h> 40 #include <libarch/stack.h>41 #include <align.h>42 40 43 #define SP_DELTA (ABI_STACK_FRAME + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT)) 44 45 /* 46 * We define our own context_set, because we need to set 47 * the TLS pointer to the tcb + 0x7000 41 /* We define our own context_set, because we need to set 42 * the TLS pointer to the tcb+0x7000 48 43 * 49 44 * See tls_set in thread.h 50 45 */ 51 46 #define context_set(c, _pc, stack, size, ptls) \ 52 do { \ 53 (c)->pc = (sysarg_t) (_pc); \ 54 (c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \ 55 (c)->tls = ((sysarg_t)(ptls)) + 0x7000 + sizeof(tcb_t); \ 56 } while (0) 47 (c)->pc = (sysarg_t) (_pc); \ 48 (c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \ 49 (c)->tls = ((sysarg_t)(ptls)) + 0x7000 + sizeof(tcb_t); 50 51 /* +16 is just for sure that the called function 52 * have space to store it's arguments 53 */ 54 #define SP_DELTA (8 + 16) 57 55 58 56 typedef struct {
Note:
See TracChangeset
for help on using the changeset viewer.