https://github.com/valkryst/c_mutex
A wrapper which simplifies the creation, destruction, and use of mutex locks.
https://github.com/valkryst/c_mutex
mutex mutex-lock mutex-synchronisation pthreads pthreads-wrapper wrapper
Last synced: about 1 month ago
JSON representation
A wrapper which simplifies the creation, destruction, and use of mutex locks.
- Host: GitHub
- URL: https://github.com/valkryst/c_mutex
- Owner: Valkryst
- License: apache-2.0
- Created: 2022-03-09T17:56:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-09T18:06:51.000Z (over 3 years ago)
- Last Synced: 2025-02-17T11:34:10.441Z (4 months ago)
- Topics: mutex, mutex-lock, mutex-synchronisation, pthreads, pthreads-wrapper, wrapper
- Language: C
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
The foci of this repository are the [mutex.c](https://github.com/Valkryst/C_Mutex/blob/main/src/mutex.c)
and [mutex.h](https://github.com/Valkryst/C_Mutex/blob/main/src/mutex.h)
files. They simplify the creation, destruction, and use of
[mutex locks](https://en.wikipedia.org/wiki/Lock_(computer_science)).## Compiling
Add `mutex.c` and `mutex.h` to your project, and add
[-pthread flag](https://stackoverflow.com/a/2127819/13279616) to your compile
flags.See the provided [Makefile](https://github.com/Valkryst/C_Mutex/blob/main/Makefile)
as a reference.## Dependencies
For development purposes, `mutex.c` depends on my
[C_Logging](https://github.com/Valkryst/C_Logging) library. By replacing all
calls to `printError` in `mutex.c`, you can remove this dependency.