mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-26 13:01:34 +03:00
fix: wasm requires strict function prototypes
* `pthread_mutex_*` and friends are also invalid then but they're not currently tested (and there's no wasi prong in `pthread_mutex_t`)
This commit is contained in:
+4
-4
@@ -12,9 +12,9 @@ test "pthread_spinlock_t" {
|
||||
_ = c.pthread_spin_init(&spin, c.PTHREAD_PROCESS_PRIVATE);
|
||||
defer _ = c.pthread_spin_destroy(&spin);
|
||||
|
||||
try std.testing.expectEqual(.SUCCESS, c.pthread_spin_trylock(&spin));
|
||||
try std.testing.expectEqual(.SUCCESS, c.pthread_spin_unlock(&spin));
|
||||
try std.testing.expectEqual(@intFromEnum(c.E.SUCCESS), c.pthread_spin_trylock(&spin));
|
||||
try std.testing.expectEqual(@intFromEnum(c.E.SUCCESS), c.pthread_spin_unlock(&spin));
|
||||
|
||||
try std.testing.expectEqual(.SUCCESS, c.pthread_spin_lock(&spin));
|
||||
try std.testing.expectEqual(.SUCCESS, c.pthread_spin_unlock(&spin));
|
||||
try std.testing.expectEqual(@intFromEnum(c.E.SUCCESS), c.pthread_spin_lock(&spin));
|
||||
try std.testing.expectEqual(@intFromEnum(c.E.SUCCESS), c.pthread_spin_unlock(&spin));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user