12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #include <assert.h>
- #include <errno.h>
- #include <string.h>
- #include <unistd.h>
- #include "pthreadP.h"
- struct pthread_attr *__attr_list;
- int __attr_list_lock = LLL_LOCK_INITIALIZER;
- int
- attribute_protected
- pthread_attr_init (
- pthread_attr_t *attr)
- {
- struct pthread_attr *iattr;
-
- memset (attr, '\0', __SIZEOF_PTHREAD_ATTR_T);
- assert (sizeof (*attr) >= sizeof (struct pthread_attr));
- iattr = (struct pthread_attr *) attr;
-
- iattr->guardsize = getpagesize ();
- return 0;
- }
|