aboutsummaryrefslogtreecommitdiff
path: root/stdlib/threads.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-21 15:37:51 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-03-21 15:37:51 -0400
commit0b76011a45b421b1473e9be75e538d3ceadf1140 (patch)
tree5738f89e0fb55235e0a3fda861db1a2dde2bd063 /stdlib/threads.c
parent013995b146a5984a7bd053ad33aae88d42838868 (diff)
Remove some less-supported code features like static initializers for
variable-sized arrays
Diffstat (limited to 'stdlib/threads.c')
-rw-r--r--stdlib/threads.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/threads.c b/stdlib/threads.c
index efd23546..9ad68c81 100644
--- a/stdlib/threads.c
+++ b/stdlib/threads.c
@@ -33,7 +33,7 @@ static void *run_thread(Closure_t *closure)
public Thread_t Thread$new(Closure_t fn)
{
- Thread_t thread = new(pthread_t);
+ Thread_t thread = GC_MALLOC(sizeof(pthread_t));
Closure_t *closure = new(Closure_t, .fn=fn.fn, .userdata=fn.userdata);
pthread_create(thread, NULL, (void*)run_thread, closure);
return thread;