Changeset 0aae87a6 in mainline for uspace/lib/c/generic/thread.c


Ignore:
Timestamp:
2012-11-09T19:33:11Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
67b152e
Parents:
3b8a990
Message:

Unify the default stack size used by userspace threads and fibrils.

  • The size is stored by the kernel into sysinfo.
  • stack_size_get() reads this value from sysinfo and caches it locally.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/thread.c

    r3b8a990 r0aae87a6  
    3939#include <abi/proc/uarg.h>
    4040#include <fibril.h>
     41#include <stack.h>
    4142#include <str.h>
    4243#include <async.h>
     
    101102                return ENOMEM;
    102103       
    103         size_t stack_size = getpagesize() * THREAD_INITIAL_STACK_PAGES;
     104        size_t stack_size = stack_size_get();
    104105        void *stack = as_area_create(AS_AREA_ANY, stack_size,
    105106            AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE | AS_AREA_GUARD |
Note: See TracChangeset for help on using the changeset viewer.