diff options
| author | Daniel Eischen <deischen@FreeBSD.org> | 1999-12-28 18:13:04 +0000 |
|---|---|---|
| committer | Daniel Eischen <deischen@FreeBSD.org> | 1999-12-28 18:13:04 +0000 |
| commit | 1752e66d49ea5d9653b0cec4df9949774de0b806 (patch) | |
| tree | cfe4b336992c8189f28dd9dd04ab184768a47b5e /lib/libpthread/thread/thr_fork.c | |
| parent | 69186ed701cbfc740d08df24d46b8d184b6f57eb (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_fork.c')
| -rw-r--r-- | lib/libpthread/thread/thr_fork.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/libpthread/thread/thr_fork.c b/lib/libpthread/thread/thr_fork.c index b8d72dc00da2..08ea8129ea71 100644 --- a/lib/libpthread/thread/thr_fork.c +++ b/lib/libpthread/thread/thr_fork.c @@ -33,6 +33,7 @@ */ #include <errno.h> #include <string.h> +#include <stdlib.h> #include <unistd.h> #include <fcntl.h> #ifdef _THREAD_SAFE @@ -130,29 +131,28 @@ fork(void) pthread_save, tle); if (pthread_save->attr.stackaddr_attr == - NULL && pthread_save->stack != NULL) + NULL && pthread_save->stack != NULL) { if (pthread_save->attr.stacksize_attr == PTHREAD_STACK_DEFAULT) { /* - * Default-size stack. Cache - * it: + * Default-size stack. + * Cache it: */ struct stack *spare_stack; spare_stack = (pthread_save->stack - + PTHREAD_STACK_DEFAULT - - sizeof(struct stack)); - SLIST_INSERT_HEAD( - &_stackq, - spare_stack, - qe); + + PTHREAD_STACK_DEFAULT + - sizeof(struct stack)); + SLIST_INSERT_HEAD(&_stackq, + spare_stack, qe); } else /* * Free the stack of * the dead thread: */ free(pthread_save->stack); + } if (pthread_save->specific_data != NULL) free(pthread_save->specific_data); |
