diff options
| author | Mikhail Romanko <me@blankhex.com> | 2025-03-02 23:18:23 +0300 |
|---|---|---|
| committer | Mikhail Romanko <me@blankhex.com> | 2025-03-02 23:18:23 +0300 |
| commit | d403d41f2c54ca382d3a1be17491fdf94097c693 (patch) | |
| tree | 9aa2dc87bca34ee2360f82e87bbc0ce09eff0a70 /src/Platform/Dummy/Tss.c | |
| parent | 2ca6a3e316f356c0467f52f80d8588ee8ed76314 (diff) | |
| download | bhlib-d403d41f2c54ca382d3a1be17491fdf94097c693.tar.gz | |
Add initial implementation of threads/mutexes/semaphores/cvs/spinlocks
Added initial implementation (or wrapper) of the threading library.
It's rather basic, but should work for most of the tasks.
Unfortunately, spinlock implementation relies on GCC/Clang compiler
built-ins (or in-worst-case-scenario on Win32 - InterlockExchange).
In the future, I should revisit this code and fix/reimplement some stuff
(or add support for Windows XP).
Diffstat (limited to 'src/Platform/Dummy/Tss.c')
| -rw-r--r-- | src/Platform/Dummy/Tss.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/Platform/Dummy/Tss.c b/src/Platform/Dummy/Tss.c new file mode 100644 index 0000000..a6582c9 --- /dev/null +++ b/src/Platform/Dummy/Tss.c @@ -0,0 +1,24 @@ +#include "Thread.h" + +#include <BH/Thread.h> + + +int BH_TssCreate(BH_GenericCallback callback) +{ + + BH_UNUSED(callback); +} + + +void *BH_TssRead(int index) +{ + return NULL; +} + + +void BH_TssWrite(int index, + void *value) +{ + BH_UNUSED(index); + BH_UNUSED(value); +} |
