aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/mutexeddata.h
diff options
context:
space:
mode:
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