Changeset 25eec4e in mainline for uspace/lib/c/generic/thread.c


Ignore:
Timestamp:
2013-04-19T18:38:18Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6d717a4
Parents:
a1e2df13 (diff), 289cb7dd (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:

Merge mainline chages.

File:
1 edited

Legend:

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

    ra1e2df13 r25eec4e  
    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.