An open API service indexing awesome lists of open source software.

https://github.com/valkryst/c_pthread

A wrapper which simplifies the creation and destruction of POSIX threads.
https://github.com/valkryst/c_pthread

pthread pthreads pthreads-wrapper thread-library threading

Last synced: 10 months ago
JSON representation

A wrapper which simplifies the creation and destruction of POSIX threads.

Awesome Lists containing this project

README

          

The foci of this repository are the [thread.c](https://github.com/Valkryst/C_PThread/blob/main/src/thread.c)
and [thread.h](https://github.com/Valkryst/C_PThread/blob/main/src/thread.h)
files. They simplify the creation and destruction of [POSIX Threads](https://en.wikipedia.org/wiki/Pthreads).

## Compiling

Add `thread.c` and `thread.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_PThread/blob/main/Makefile)
as a reference.

## Dependencies

For development purposes, `thread.c` depends on my
[C_Logging](https://github.com/Valkryst/C_Logging) library. By replacing all
calls to `printError` in `thread.c`, you can remove this dependency.