diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-10-20 20:03:31 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-10-20 20:03:31 +0200 |
commit | e0e1f05656e0b443bcb4a5c61550925acba78cb6 (patch) | |
tree | ed8affdf9c13c8ee8017ad61791a47757b397844 | |
parent | 96623db8d2fe02a66ac9176354634d41aca8c07d (diff) |
Use function parameter instead of global variable
* sysdeps/mach/pt-stack-alloc.c(__pthread_stack_alloc): Use `stacksize`
parameter instead of `__pthread_stacksize` global variable.
-rw-r--r-- | sysdeps/mach/pt-stack-alloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/mach/pt-stack-alloc.c b/sysdeps/mach/pt-stack-alloc.c index 0956fc7..f545ef3 100644 --- a/sysdeps/mach/pt-stack-alloc.c +++ b/sysdeps/mach/pt-stack-alloc.c @@ -49,8 +49,8 @@ __pthread_stack_alloc (void **stackaddr, size_t stacksize) for (base = next_stack_base; base < VM_MAX_ADDRESS && __vm_allocate (__mach_task_self (), &base, - __pthread_stacksize, FALSE) != KERN_SUCCESS; - base += __pthread_stacksize) + stacksize, FALSE) != KERN_SUCCESS; + base += stacksize) ; if (base >= VM_MAX_ADDRESS) @@ -67,7 +67,7 @@ __pthread_stack_alloc (void **stackaddr, size_t stacksize) if (base >= VM_MAX_ADDRESS) return EAGAIN; - next_stack_base = base + __pthread_stacksize; + next_stack_base = base + stacksize; (*stackaddr) = (void *) base; return 0; |