From 3387a425e65b839b68bd2973f6bc5ab22315cc5d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 25 Jun 1998 19:36:00 +0000 Subject: Finish user stack support. Change locking code to be safe in situations with different priorities. 1998-06-25 19:27 Ulrich Drepper * attr.c: Finish user stack support. Change locking code to be safe in situations with different priorities. * cancel.c: Likewise. * condvar.c: Likewise. * internals.h: Likewise. * join.c: Likewise. * manager.c: Likewise. * mutex.c: Likewise. * pthread.c: Likewise. * ptlongjmp.c: Likewise. * queue.h: Likewise. * rwlock.c: Likewise. * semaphore.c: Likewise. * semaphore.h: Likewise. * signals.c: Likewise. * spinlock.c: Likewise. * spinlock.h: Likewise. Patches by Xavier leroy. 1998-06-25 Ulrich Drepper * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and [sg]et_stackaddr prototypes always available. * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR. --- linuxthreads/attr.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'linuxthreads/attr.c') diff --git a/linuxthreads/attr.c b/linuxthreads/attr.c index 027f69c..d1f6058 100644 --- a/linuxthreads/attr.c +++ b/linuxthreads/attr.c @@ -19,7 +19,6 @@ #include "pthread.h" #include "internals.h" - int __pthread_attr_init_2_1(pthread_attr_t *attr) { size_t ps = __getpagesize (); @@ -185,11 +184,8 @@ weak_alias (__pthread_attr_getstackaddr, pthread_attr_getstackaddr) int __pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize) { - size_t ps = __getpagesize (); - - /* We don't accept value smaller than PTHREAD_STACK_MIN or bigger than - 2MB - pagesize. */ - if (stacksize < PTHREAD_STACK_MIN || stacksize > STACK_SIZE - ps) + /* We don't accept value smaller than PTHREAD_STACK_MIN. */ + if (stacksize < PTHREAD_STACK_MIN) return EINVAL; attr->stacksize = stacksize; -- cgit v1.1