9
0
Fork 0

Fix recursive mutex bug

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@770 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2008-06-05 01:57:49 +00:00
parent fe1f8511b1
commit 464b3b848d
2 changed files with 9 additions and 2 deletions

View File

@ -92,7 +92,7 @@ int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type)
if (attr && pthread_mutexattr_verifytype(type) == OK)
{
attr->type = type;
return 0;
return OK;
}
return EINVAL;
}

View File

@ -89,7 +89,14 @@ int pthread_mutexattr_verifytype(int type)
{
/* The depends on the value assigments in pthread.h */
return (type >= PTHREAD_MUTEX_NORMAL && type <= PTHREAD_MUTEX_RECURSIVE);
if (type >= PTHREAD_MUTEX_NORMAL && type <= PTHREAD_MUTEX_RECURSIVE)
{
return OK;
}
else
{
return ERROR;
}
}
#endif /* CONFIG_MUTEX_TYPES */