Index: attr.c =================================================================== RCS file: /cvs/glibc/libc/linuxthreads/attr.c,v retrieving revision 1.14 diff -u -r1.14 attr.c --- attr.c 2000/09/11 19:12:39 1.14 +++ attr.c 2000/10/30 07:09:18 @@ -24,6 +24,26 @@ #include #include +int __pthread_attr_init_2_2(pthread_attr_t *attr) +{ + size_t ps = __getpagesize (); + + attr->__detachstate = PTHREAD_CREATE_JOINABLE; + attr->__schedpolicy = SCHED_OTHER; + attr->__schedparam.sched_priority = 0; + attr->__inheritsched = PTHREAD_EXPLICIT_SCHED; + attr->__scope = PTHREAD_SCOPE_SYSTEM; + attr->__set_guardsize = ps; + attr->__guardsize = ps; + attr->__stackaddr = NULL; + attr->__stackaddr_set = 0; + attr->__stacksize = STACK_SIZE - ps; + return 0; +} + +versioned_symbol (libpthread, __pthread_attr_init_2_2, pthread_attr_init, + GLIBC_2_2); + int __pthread_attr_init_2_1(pthread_attr_t *attr) { size_t ps = __getpagesize (); @@ -147,6 +167,9 @@ { size_t ps = __getpagesize (); + /* Store size provided for Unix98 compliance */ + attr->__set_guardize = guardsize; + /* First round up the guard size. */ guardsize = page_roundup (guardsize, ps); @@ -161,7 +184,7 @@ int __pthread_attr_getguardsize(const pthread_attr_t *attr, size_t *guardsize) { - *guardsize = attr->__guardsize; + *guardsize = attr->__set_guardsize; return 0; } weak_alias (__pthread_attr_getguardsize, pthread_attr_getguardsize) Index: sysdeps/pthread/bits/pthreadtypes.h =================================================================== RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h,v retrieving revision 1.8 diff -u -r1.8 pthreadtypes.h --- pthreadtypes.h 2000/07/04 00:07:14 1.8 +++ pthreadtypes.h 2000/10/30 07:09:19 @@ -49,6 +49,7 @@ int __stackaddr_set; void *__stackaddr; size_t __stacksize; + size_t __set_guardsize; } pthread_attr_t;