Ignore:
Timestamp:
2012-06-13T13:17:46Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1d4024cf, 375e501
Parents:
faba839
Message:

add support for variable uspace stack size
create individual address space areas for stacks of additional threads (instead of allocating the stack from heap)
avoid memory leaks in program_create()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/ia64/include/fibril.h

    rfaba839 r2902e1bb  
    4949#define PFM_MASK  (~0x3fffffffff)
    5050
    51 #define PSTHREAD_INITIAL_STACK_PAGES_NO  2
    52 
    5351/* Stack is divided into two equal parts (for memory stack and register stack). */
    54 #define PSTHREAD_INITIAL_STACK_DIVISION  2
     52#define FIBRIL_INITIAL_STACK_DIVISION  2
    5553
    5654#define context_set(c, _pc, stack, size, tls) \
     
    5856                (c)->pc = (uint64_t) _pc; \
    5957                (c)->bsp = ((uint64_t) stack) + \
    60                     size / PSTHREAD_INITIAL_STACK_DIVISION; \
     58                    size / FIBRIL_INITIAL_STACK_DIVISION; \
    6159                (c)->ar_pfs &= PFM_MASK; \
    6260                (c)->sp = ((uint64_t) stack) + \
    63                     ALIGN_UP((size / PSTHREAD_INITIAL_STACK_DIVISION), STACK_ALIGNMENT) - \
     61                    ALIGN_UP((size / FIBRIL_INITIAL_STACK_DIVISION), STACK_ALIGNMENT) - \
    6462                    SP_DELTA; \
    6563                (c)->tp = (uint64_t) tls; \
Note: See TracChangeset for help on using the changeset viewer.