📨 chic 0.0.0
Realtime-safe channels in C
Loading...
Searching...
No Matches
spsc.h
Go to the documentation of this file.
1// This Source Code Form is subject to the terms of the Mozilla Public
2// License, v. 2.0. If a copy of the MPL was not distributed with this
3// file, You can obtain one at https://mozilla.org/MPL/2.0/.
4
9
10#pragma once
11#error spsc is not yet implemented; use mpmc for now
12#include "claim.h"
13
14#ifdef __cplusplus
15 #if defined(__clang__) || defined(__GNUG__) || defined(_MSC_VER)
16 #define restrict __restrict
17 #else
18 #define restrict
19 #endif
20 extern "C" {
21#endif
22
28struct spsc;
29
30#ifdef __cplusplus
31 }
32 #undef restrict
33#endif
Exclusive claims for directly reading/writing into channels.
Single-producer, single-consumer channel.