Skip to content

This project implements a semaphore type platform independent in C . Highly influenced by lib dispatch

License

Notifications You must be signed in to change notification settings

Jakouf/CPP_Semaphore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CPP_Semaphore

This project implements a semaphore type platform independent in C . Highly influenced by lib dispatch

Example:

A sample application can be found in sample.cpp.

Single-Header-Include:

  #include "cppSemaphore.hpp" 

Usage:

dispatch::semaphore_c(long s)

creates a new semaphore. the parameter s indicates how many signals you have to invoke until you unblock the blocked thread.

You can block the current thread by calling:

dispatch::semaphore_wait(dispatch::semaphore semaphore)

To invoke a signal on the semaphore call:

dispatch::semaphore_signal(dispatch::semaphore_c& semaphore)

About

This project implements a semaphore type platform independent in C . Highly influenced by lib dispatch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages