Fixed mis-implementation of pthread_mutex_get{spin,yield}loops_np().
Reviewed by: davidxu
This commit is contained in:
parent
ea26d58729
commit
7e0e78248e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=177600
@ -40,6 +40,7 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/queue.h>
|
||||
#include <pthread.h>
|
||||
#include <pthread_np.h>
|
||||
#include "un-namespace.h"
|
||||
|
||||
#include "thr_private.h"
|
||||
@ -793,8 +794,9 @@ int
|
||||
_pthread_mutex_getspinloops_np(pthread_mutex_t *mutex, int *count)
|
||||
{
|
||||
if (*mutex == NULL)
|
||||
return (0);
|
||||
return (*mutex)->m_spinloops;
|
||||
return (EINVAL);
|
||||
*count = (*mutex)->m_spinloops;
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
@ -831,8 +833,9 @@ int
|
||||
_pthread_mutex_getyieldloops_np(pthread_mutex_t *mutex, int *count)
|
||||
{
|
||||
if (*mutex == NULL)
|
||||
return (0);
|
||||
return (*mutex)->m_yieldloops;
|
||||
return (EINVAL);
|
||||
*count = (*mutex)->m_yieldloops;
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user