std.Thread.Futex addition (#9070)

* std.Thread.Futex: implementation + tests

* std.Thread.Futex: fix darwin compile errors

* std.Thread.Futex: fix wait() documentation typo

* std.Thread.Futex: fix darwin version check

* std.Thread.Futex: remove unnecessary comptime keyword
This commit is contained in:
protty
2021-06-12 08:51:37 -05:00
committed by GitHub
parent 2b2efa24d0
commit 2ba68f9f4c
6 changed files with 654 additions and 11 deletions

View File

@@ -11,6 +11,7 @@
data: Data,
pub const AutoResetEvent = @import("Thread/AutoResetEvent.zig");
pub const Futex = @import("Thread/Futex.zig");
pub const ResetEvent = @import("Thread/ResetEvent.zig");
pub const StaticResetEvent = @import("Thread/StaticResetEvent.zig");
pub const Mutex = @import("Thread/Mutex.zig");
@@ -574,6 +575,7 @@ pub fn getCurrentThreadId() u64 {
test "std.Thread" {
if (!builtin.single_threaded) {
_ = AutoResetEvent;
_ = Futex;
_ = ResetEvent;
_ = StaticResetEvent;
_ = Mutex;