summaryrefslogtreecommitdiff
path: root/std/thread.zc
diff options
context:
space:
mode:
authorZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-30 19:44:32 +0000
committerZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-30 19:44:32 +0000
commit472434301940015365f7ed303f52d71c505ac487 (patch)
tree923a4fb8821d03c8dc88266fd08320af17f90d9a /std/thread.zc
parent0427d254207a69e394499d1abaea768f484f1cb5 (diff)
Improvements for the standard library + '@ctype'.
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*);