From be384c0caa92cb152c264125fb265373e6a50440 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 2 Jan 2025 16:24:07 -0500 Subject: Replace threads with generic mutexed datastructures. --- stdlib/stdlib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'stdlib/stdlib.h') diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h index 7c9bd7e1..c68442a6 100644 --- a/stdlib/stdlib.h +++ b/stdlib/stdlib.h @@ -42,5 +42,7 @@ Closure_t spawn(Closure_t fn); bool pop_flag(char **argv, int *i, const char *flag, Text_t *result); void print_stack_trace(FILE *out, int start, int stop); void sleep_num(double seconds); +public Closure_t _mutexed(const void *item, size_t size); +#define mutexed(item) _mutexed((__typeof(item)[1]){item}, sizeof(item)) // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0 -- cgit v1.2.3