You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The native C/C++ side of [Hexa.NET.Utilities](https://github.com/HexaEngine/Hexa.NET.Utilities), providing low-level synchronization primitives with a C-compatible API for P/Invoke interop from .NET.
4
+
5
+
## Features
6
+
7
+
-**ReaderWriterLock** — A high-performance, lock-free reader-writer lock built on C++20 atomics with:
8
+
- Multiple concurrent readers
9
+
- Exclusive writer access
10
+
- Writer fairness (writers are not starved by incoming readers)
11
+
- Try-lock variants for non-blocking acquisition
12
+
- C-compatible ABI for use from C or via P/Invoke
13
+
14
+
## Requirements
15
+
16
+
- CMake 3.20 or later
17
+
- A C++20-capable compiler (GCC, Clang, or MSVC)
18
+
- C99 compiler support
19
+
20
+
## Building
21
+
22
+
```bash
23
+
cmake -B build -DBUILD_SHARED_LIBS=ON
24
+
cmake --build build
25
+
```
26
+
27
+
To build as a static library:
28
+
29
+
```bash
30
+
cmake -B build -DBUILD_SHARED_LIBS=OFF
31
+
cmake --build build
32
+
```
33
+
34
+
## Installation
35
+
36
+
```bash
37
+
cmake --install build
38
+
```
39
+
40
+
This installs the library to `lib/` and headers to `include/`.
41
+
42
+
## Project Structure
43
+
44
+
```
45
+
include/
46
+
common.h — Export macros and calling convention definitions
47
+
ReaderWriterLock.h — ReaderWriterLock C API
48
+
utils.h — Umbrella header (includes all public headers)
0 commit comments