6 #include "mpmc-queue.h"
8 void threadA(struct mpmc_boundq_1_alt<int, sizeof(int)> *queue)
10 int *bin = queue->write_prepare();
12 queue->write_publish();
15 void threadB(struct mpmc_boundq_1_alt<int, sizeof(int)> *queue)
17 int *bin = queue->read_fetch();
18 printf("Read: %d\n", *bin);
19 queue->read_consume();
22 int user_main(int argc, char **argv)
24 struct mpmc_boundq_1_alt<int, sizeof(int)> queue;
27 thrd_create(&A, (thrd_start_t)&threadA, &queue);
28 thrd_create(&B, (thrd_start_t)&threadB, &queue);