summaryrefslogtreecommitdiff
path: root/std/thread.zc
diff options
context:
space:
mode:
authorczjstmax <jstmaxlol@disroot.org>2026-01-31 15:10:20 +0100
committerGitHub <noreply@github.com>2026-01-31 15:10:20 +0100
commitd2e2617dec584884b92eb452f377b20c0bf8f321 (patch)
treed7cdc28d1a83f16a0fc7e945963aa070bfa9d3e4 /std/thread.zc
parent0427d254207a69e394499d1abaea768f484f1cb5 (diff)
parent051400c70a4d5384923113cfbcbc69e8e58d27a0 (diff)
Merge pull request #1 from z-libs/main
Merge newer updates
Diffstat (limited to 'std/thread.zc')
-rw-r--r--std/thread.zc5
1 files changed, 5 insertions, 0 deletions
diff --git a/std/thread.zc b/std/thread.zc
index 98f080e..16f3ca1 100644
--- a/std/thread.zc
+++ b/std/thread.zc
@@ -7,6 +7,11 @@ import "./core.zc"
import "./result.zc"
import "./mem.zc"
+// Essential raw block: required for pthread operations and closure trampolining
+// This block cannot be eliminated because:
+// 1. z_closure_T is an internal compiler type for Zen-C closures
+// 2. pthread_t, pthread_mutex_t are opaque types that can't be extern'd with void*
+// 3. The trampoline function needs to cast and execute Zen-C closures
raw {
typedef void (*ZenThreadFunc)(void*);