From 2ecb5fe885042ca6c25ee0a3e3da070ddec9e07e Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 11 Aug 2024 14:47:34 -0400 Subject: Add channels and threads --- builtins/datatypes.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'builtins/datatypes.h') diff --git a/builtins/datatypes.h b/builtins/datatypes.h index b0f62d03..41a67a5e 100644 --- a/builtins/datatypes.h +++ b/builtins/datatypes.h @@ -4,6 +4,7 @@ #include #include +#include #define ARRAY_LENGTH_BITS 42 #define ARRAY_FREE_BITS 6 @@ -57,4 +58,10 @@ typedef struct Range_s { int64_t first, last, step; } Range_t; +typedef struct { + array_t items; + pthread_mutex_t mutex; + pthread_cond_t cond; +} channel_t; + // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0 -- cgit v1.2.3