-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.c
72 lines (54 loc) · 1.44 KB
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <threads.h>
#include <string.h>
#include <time.h>
#include <sentient/core/types.h>
#include "example_model.h"
thrd_t threads[4] = { 0, };
snt_i32 thread_handler(snt_void* arg)
{
printf("thread %ld\n", thrd_current());
}
___SNT_PP_DECL_OBJECT_POOL_STORAGE(snt_i32, SNT_PRIMITIVE)
#define ___SNT_PP_COMPARE_HEY(x) x
___SNT_PP_UNWRAP(snt_u32 ah);
struct ahah
{
snt_f32 __attribute__((aligned(1))) vec;
};
int main(int argc, char** argv)
{
const snt_bool fucking = __builtin_types_compatible_p(void*, void*);
struct oioi oioi = {
.model_num = 123,
.name = u8"jin",
.hey = 123,
.howru = 1234,
};
struct snt_subcentury_datetime64 ahah = {
.microseconds = 5,
};
const snt_size sizee = sizeof(struct oioi);
// const snt_size ahah = ___SNT_PP_COUNT_ARGS(FIELD(snt_u32, num), FIELD(snt_str8, name, 30))
int res = EXIT_SUCCESS;
for (snt_i32 i = 0; i < 4; i++)
{
int err = thrd_create(&threads[i],
thread_handler,
snt_nullptr);
if (err < 0)
{
res = EXIT_FAILURE;
goto exit_label;
}
}
for (snt_i32 i = 0; i < 4; i++)
{
thrd_join(threads[i],
snt_nullptr);
}
exit_label:
return 0;
}