Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
sem.h File Reference

public sys_sem APIs. More...

#include <kernel.h>
#include <sys/atomic.h>
#include <zephyr/types.h>

Go to the source code of this file.

Data Structures

struct  sys_sem
 

Macros

#define SYS_SEM_DEFINE(_name, _initial_count, _count_limit)
 Statically define and initialize a sys_sem. More...
 

Functions

int sys_sem_init (struct sys_sem *sem, unsigned int initial_count, unsigned int limit)
 Initialize a semaphore. More...
 
int sys_sem_give (struct sys_sem *sem)
 Give a semaphore. More...
 
int sys_sem_take (struct sys_sem *sem, k_timeout_t timeout)
 Take a sys_sem. More...
 
unsigned int sys_sem_count_get (struct sys_sem *sem)
 Get sys_sem's value. More...
 

Detailed Description

public sys_sem APIs.