Skip to content

Commit

Permalink
lkl: Revert "lkl: decrease stack size of thread_create to PTHREAD_STA…
Browse files Browse the repository at this point in the history
…CK_MIN"

This reverts commit bee09a0.

The 8MB stack size is virtual memory but not the real memory it uses.
Limiting the stack size has a risk of too small stack size.

Signed-off-by: Yuan Liu <[email protected]>
  • Loading branch information
liuyuan10 committed Aug 5, 2016
1 parent 591c3b6 commit d7567bc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tools/lkl/lib/posix-host.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <sys/socket.h>
#include <sys/syscall.h>
#include <poll.h>
#include <limits.h>
#include <lkl_host.h>
#include "iomem.h"

Expand Down Expand Up @@ -178,10 +177,7 @@ static void mutex_free(struct lkl_mutex *_mutex)
static lkl_thread_t thread_create(void (*fn)(void *), void *arg)
{
pthread_t thread;
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN);
if (WARN_PTHREAD(pthread_create(&thread, &attr, (void* (*)(void *))fn, arg)))
if (WARN_PTHREAD(pthread_create(&thread, NULL, (void* (*)(void *))fn, arg)))
return 0;
else
return (lkl_thread_t) thread;
Expand Down

0 comments on commit d7567bc

Please sign in to comment.