mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
lock the mutex on pthread_cond_signal()
This commit is contained in:
parent
7045f1e875
commit
92dac89d01
@ -199,6 +199,8 @@ const PosixParker = struct {
|
||||
}
|
||||
|
||||
pub fn unpark(self: *PosixParker, ptr: *const u32) void {
|
||||
assert(pthread_mutex_lock(&self.mutex) == 0);
|
||||
defer assert(pthread_mutex_unlock(&self.mutex) == 0);
|
||||
assert(pthread_cond_signal(&self.cond) == 0);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user