diff options
| author | David Xu <davidxu@FreeBSD.org> | 2003-06-28 09:48:05 +0000 |
|---|---|---|
| committer | David Xu <davidxu@FreeBSD.org> | 2003-06-28 09:48:05 +0000 |
| commit | d15cbd7dc03101e0cc0608445c7c8d31b658e1d5 (patch) | |
| tree | ce719bfd5c61eb2269bdf606335234010c1681d0 /lib/libpthread/thread/thr_stack.c | |
| parent | 8d5f23a1f97a824a5305fca25b1adf8f752ad321 (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_stack.c')
| -rw-r--r-- | lib/libpthread/thread/thr_stack.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libpthread/thread/thr_stack.c b/lib/libpthread/thread/thr_stack.c index f14289efb962..530e2b9fc965 100644 --- a/lib/libpthread/thread/thr_stack.c +++ b/lib/libpthread/thread/thr_stack.c @@ -200,8 +200,9 @@ _thr_stack_alloc(struct pthread_attr *attr) _kse_critical_leave(crit); /* Map the stack, but not the guard page: */ - if (mmap(attr->stackaddr_attr, stacksize, - PROT_READ | PROT_WRITE, MAP_STACK, -1, 0) == MAP_FAILED) + if ((attr->stackaddr_attr = mmap(attr->stackaddr_attr, + stacksize, PROT_READ | PROT_WRITE, MAP_STACK, + -1, 0)) == MAP_FAILED) attr->stackaddr_attr = NULL; } if (attr->stackaddr_attr != NULL) |
