Changeset 6843a9c in mainline for uspace/lib/c/arch/ia64/include/fibril.h
- Timestamp:
- 2012-06-29T13:02:14Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 722912e
- Parents:
- ba72f2b (diff), 0bbd13e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/ia64/include/fibril.h
rba72f2b r6843a9c 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 49 #define PFM_MASK (~0x3fffffffff) 50 50 51 #define PSTHREAD_INITIAL_STACK_PAGES_NO 252 51 /* Stack is divided into two equal parts (for memory stack and register stack). */ 53 #define PSTHREAD_INITIAL_STACK_DIVISION 252 #define FIBRIL_INITIAL_STACK_DIVISION 2 54 53 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 54 #define context_set(c, _pc, stack, size, tls) \ 55 do { \ 56 (c)->pc = (uint64_t) _pc; \ 57 (c)->bsp = ((uint64_t) stack) + \ 58 size / FIBRIL_INITIAL_STACK_DIVISION; \ 59 (c)->ar_pfs &= PFM_MASK; \ 60 (c)->sp = ((uint64_t) stack) + \ 61 ALIGN_UP((size / FIBRIL_INITIAL_STACK_DIVISION), STACK_ALIGNMENT) - \ 62 SP_DELTA; \ 63 (c)->tp = (uint64_t) tls; \ 64 } while (0) 64 65 65 66 /*
Note:
See TracChangeset
for help on using the changeset viewer.