summaryrefslogtreecommitdiffstats
path: root/lib/libkse/thread/thr_stack.c
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2003-06-28 09:48:05 +0000
committerdavidxu <davidxu@FreeBSD.org>2003-06-28 09:48:05 +0000
commitedb09b0c7fe5cfb64cf9fbdff972073411292488 (patch)
treece719bfd5c61eb2269bdf606335234010c1681d0 /lib/libkse/thread/thr_stack.c
parent2a76d14fc7b2db2bed221ea6782d08129e7f7ec3 (diff)
downloadFreeBSD-src-edb09b0c7fe5cfb64cf9fbdff972073411292488.zip
FreeBSD-src-edb09b0c7fe5cfb64cf9fbdff972073411292488.tar.gz
Use mmap retuned value.
Reviewed by: deischen
Diffstat (limited to 'lib/libkse/thread/thr_stack.c')
-rw-r--r--lib/libkse/thread/thr_stack.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libkse/thread/thr_stack.c b/lib/libkse/thread/thr_stack.c
index f14289e..530e2b9 100644
--- a/lib/libkse/thread/thr_stack.c
+++ b/lib/libkse/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)
OpenPOWER on IntegriCloud