1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

Be more agresive on arguments' checking.

OK'ed by:	deischen
MFC after:	3 days
This commit is contained in:
Alexey Zelkin 2002-10-26 13:47:06 +00:00
parent 0607fb02d9
commit 64536616e6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105984

View File

@ -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.