aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/mutexeddata.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-31 02:11:03 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-03-31 02:11:03 -0400
commit7a172be6213839a3d023ba21c3bafd7540a4bfe8 (patch)
tree5646ba0e4c0690fe64711fb77658308541de695b /src/stdlib/mutexeddata.c
parentd3655740cc6a8e6c4788946af412065fb52f51dc (diff)
Remove threads and mutexed data from the language in favor of a
module-based approach
Diffstat (limited to 'src/stdlib/mutexeddata.c')
-rw-r--r--src/stdlib/mutexeddata.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/stdlib/mutexeddata.c b/src/stdlib/mutexeddata.c
deleted file mode 100644
index ead154e7..00000000
--- a/src/stdlib/mutexeddata.c
+++ /dev/null
@@ -1,39 +0,0 @@
-// Mutexed data methods/type info
-#include <ctype.h>
-#include <err.h>
-#include <gc.h>
-#include <stdbool.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <sys/param.h>
-
-#include "bools.h"
-#include "metamethods.h"
-#include "optionals.h"
-#include "text.h"
-#include "util.h"
-
-static Text_t MutexedData$as_text(const void *m, bool colorize, const TypeInfo_t *type)
-{
- auto mutexed = type->MutexedDataInfo;
- Text_t typename = generic_as_text(NULL, false, mutexed.type);
- if (!m) {
- return Texts(colorize ? Text("\x1b[34;1mmutexed\x1b[m(") : Text("mutexed("), typename, Text(")"));
- }
- return Texts(colorize ? Text("\x1b[34;1mmutexed ") : Text("mutexed "), typename,
- Text$format(colorize ? "<%p>\x1b[m" : "<%p>", *((MutexedData_t*)m)));
-}
-
-static bool MutexedData$is_none(const void *m, const TypeInfo_t *)
-{
- return *((MutexedData_t*)m) == NULL;
-}
-
-public const metamethods_t MutexedData$metamethods = {
- .as_text=MutexedData$as_text,
- .is_none=MutexedData$is_none,
- .serialize=cannot_serialize,
- .deserialize=cannot_deserialize,
-};
-
-// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0