mthread: mmap returns MAP_FAILED on error
This commit is contained in:
parent
73379f0be5
commit
c0ef4c4956
1 changed files with 1 additions and 1 deletions
|
@ -406,7 +406,7 @@ void *arg;
|
|||
stackaddr = minix_mmap(NULL, stacksize,
|
||||
PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE,
|
||||
-1, 0);
|
||||
if (stackaddr == NULL)
|
||||
if (stackaddr == MAP_FAILED)
|
||||
mthread_panic("Failed to allocate stack to thread");
|
||||
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL)
|
||||
|
|
Loading…
Reference in a new issue