diff options
| author | Alexey Zelkin <phantom@FreeBSD.org> | 2002-10-26 13:47:06 +0000 |
|---|---|---|
| committer | Alexey Zelkin <phantom@FreeBSD.org> | 2002-10-26 13:47:06 +0000 |
| commit | 64536616e6dbdbcbf9866ce77add1b1d0b35720b (patch) | |
| tree | 248735787ff3ae632fea9f12cc50e560822cb74b /lib | |
| parent | 0607fb02d95236ba66d5eb9cf5d8823917d70e00 (diff) | |
Notes
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libc_r/uthread/uthread_create.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc_r/uthread/uthread_create.c b/lib/libc_r/uthread/uthread_create.c index 0f006a9aabfc..67694288fa37 100644 --- a/lib/libc_r/uthread/uthread_create.c +++ b/lib/libc_r/uthread/uthread_create.c @@ -59,7 +59,7 @@ int _thread_PS_DEAD_value = PS_DEAD; __weak_reference(_pthread_create, pthread_create); int -_pthread_create(pthread_t * thread, const pthread_attr_t * attr, +_pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine) (void *), void *arg) { struct pthread *curthread = _get_curthread(); @@ -71,6 +71,9 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr, pthread_attr_t pattr; void *stack; + if (thread == NULL) + return(EINVAL); + /* * Locking functions in libc are required when there are * threads other than the initial thread. |
