Changes in uspace/lib/c/arch/ia64/include/fibril.h [9971ea7f:619e2a6b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/ia64/include/fibril.h
r9971ea7f r619e2a6b 27 27 */ 28 28 29 /** @addtogroup libcia64 29 /** @addtogroup libcia64 30 30 * @{ 31 31 */ … … 45 45 * No need to allocate scratch area. 46 46 */ 47 #define SP_DELTA 47 #define SP_DELTA (0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT)) 48 48 49 #define PFM_MASK (~0x3fffffffff)49 #define PFM_MASK (~0x3fffffffff) 50 50 51 #define PSTHREAD_INITIAL_STACK_PAGES_NO 2 51 #define PSTHREAD_INITIAL_STACK_PAGES_NO 2 52 /* Stack is divided into two equal parts (for memory stack and register stack). */ 53 #define PSTHREAD_INITIAL_STACK_DIVISION 2 52 54 53 /* Stack is divided into two equal parts (for memory stack and register stack). */ 54 #define PSTHREAD_INITIAL_STACK_DIVISION 2 55 56 #define context_set(c, _pc, stack, size, tls) \ 57 do { \ 58 (c)->pc = (uint64_t) _pc; \ 59 (c)->bsp = ((uint64_t) stack) + \ 60 size / PSTHREAD_INITIAL_STACK_DIVISION; \ 61 (c)->ar_pfs &= PFM_MASK; \ 62 (c)->sp = ((uint64_t) stack) + \ 63 ALIGN_UP((size / PSTHREAD_INITIAL_STACK_DIVISION), STACK_ALIGNMENT) - \ 64 SP_DELTA; \ 65 (c)->tp = (uint64_t) tls; \ 66 } while (0) 55 #define context_set(c, _pc, stack, size, tls) \ 56 do { \ 57 (c)->pc = (uint64_t) _pc; \ 58 (c)->bsp = ((uint64_t) stack) + size / PSTHREAD_INITIAL_STACK_DIVISION; \ 59 (c)->ar_pfs &= PFM_MASK; \ 60 (c)->sp = ((uint64_t) stack) + ALIGN_UP((size / PSTHREAD_INITIAL_STACK_DIVISION), STACK_ALIGNMENT) - SP_DELTA; \ 61 (c)->tp = (uint64_t) tls; \ 62 } while (0); 63 67 64 68 65 /*
Note:
See TracChangeset
for help on using the changeset viewer.