reactor-c 1.0
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
lf_semaphore.h File Reference

Semaphore utility for reactor C. More...

#include "low_level_platform.h"
#include <stdlib.h>

Go to the source code of this file.

Data Structures

struct  lf_semaphore_t
 A semaphore. More...

Macros

#define NUMBER_OF_WORKERS   1

Functions

void lf_semaphore_acquire (lf_semaphore_t *semaphore)
 Acquire the 'semaphore'.
void lf_semaphore_destroy (lf_semaphore_t *semaphore)
 Destroy the 'semaphore'.
lf_semaphore_tlf_semaphore_new (size_t count)
 Create a new semaphore.
void lf_semaphore_release (lf_semaphore_t *semaphore, size_t i)
 Release the 'semaphore' and add 'i' to its count.
void lf_semaphore_wait (lf_semaphore_t *semaphore)
 Wait on the 'semaphore' if count is 0.

Detailed Description

Semaphore utility for reactor C.

Author
Soroush Bateni

Macro Definition Documentation

◆ NUMBER_OF_WORKERS

#define NUMBER_OF_WORKERS   1