consistently use the LOCK an UNLOCK macros
In some places there has been a direct usage of the functions. Use the macros consistently everywhere, such that it might be easier later on to capture the fast path directly inside the macro and only have the call overhead on the slow path.
This commit is contained in:
1 parent
47d0bcd476
commit
c4bc0b1a64
6 files changed
+12
-12
No files matched your search
@@ -3,7 +3,7 @@
|
||||
int pthread_getschedparam(pthread_t t, int *restrict policy, struct sched_param *restrict param)
|
||||
{
|
||||
int r;
|
||||
__lock(t->killlock);
|
||||
LOCK(t->killlock);
|
||||
if (t->dead) {
|
||||
r = ESRCH;
|
||||
} else {
|
||||
@@ -12,6 +12,6 @@ int pthread_getschedparam(pthread_t t, int *restrict policy, struct sched_param
|
||||
*policy = __syscall(SYS_sched_getscheduler, t->tid);
|
||||
}
|
||||
}
|
||||
__unlock(t->killlock);
|
||||
UNLOCK(t->killlock);
|
||||
return r;
|
||||
}
|
||||
Reference in new issue
Block a user