Changeset 69146b93 in mainline for uspace/lib/c/generic/thread.c


Ignore:
Timestamp:
2012-11-26T19:02:45Z (12 years ago)
Author:
Adam Hraska <adam.hraska+hos@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
04552324
Parents:
5d230a30 (diff), 7462674 (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.
Message:

Merged mainline,1723.

File:
1 edited

Legend:

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

    r5d230a30 r69146b93  
    3939#include <abi/proc/uarg.h>
    4040#include <fibril.h>
     41#include <stack.h>
    4142#include <str.h>
    4243#include <async.h>
     
    4445#include <as.h>
    4546#include "private/thread.h"
    46 
    47 #ifndef THREAD_INITIAL_STACK_PAGES
    48         #define THREAD_INITIAL_STACK_PAGES  2
    49 #endif
    5047
    5148/** Main thread function.
     
    10198                return ENOMEM;
    10299       
    103         size_t stack_size = getpagesize() * THREAD_INITIAL_STACK_PAGES;
     100        size_t stack_size = stack_size_get();
    104101        void *stack = as_area_create(AS_AREA_ANY, stack_size,
    105             AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE);
     102            AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE | AS_AREA_GUARD |
     103            AS_AREA_LATE_RESERVE);
    106104        if (stack == AS_MAP_FAILED) {
    107105                free(uarg);
Note: See TracChangeset for help on using the changeset viewer.