aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/mutexeddata.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-21 21:48:53 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-03-21 21:48:53 -0400
commit5ee185a4896e43c67b6d299becfa616da78fb9f4 (patch)
tree183ceef2fd21230c89334d7d039255d1c86c5dca /src/stdlib/mutexeddata.h
parentf4aaf7b73481248f6768302be688700a364a1af8 (diff)
Move stdlib into src/
Diffstat (limited to 'src/stdlib/mutexeddata.h')
-rw-r--r--src/stdlib/mutexeddata.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/stdlib/mutexeddata.h b/src/stdlib/mutexeddata.h
new file mode 100644
index 00000000..47686195
--- /dev/null
+++ b/src/stdlib/mutexeddata.h
@@ -0,0 +1,17 @@
+#pragma once
+
+// Metamethods and type info for mutexed data
+
+#include "types.h"
+#include "optionals.h"
+#include "util.h"
+
+#define NONE_MUTEXED_DATA ((MutexedData_t)NULL)
+
+extern const metamethods_t MutexedData$metamethods;
+
+#define MutexedData$info(t) &((TypeInfo_t){.size=sizeof(MutexedData_t), .align=__alignof(MutexedData_t), \
+ .tag=MutexedDataInfo, .MutexedDataInfo.type=t, \
+ .metamethods=MutexedData$metamethods})
+
+// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0