Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
semaphore.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#ifndef ZEPHYR_INCLUDE_POSIX_SEMAPHORE_H_
7#define ZEPHYR_INCLUDE_POSIX_SEMAPHORE_H_
8
9#include <posix/time.h>
10#include "posix_types.h"
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16int sem_destroy(sem_t *semaphore);
17int sem_getvalue(sem_t *restrict semaphore, int *restrict value);
18int sem_init(sem_t *semaphore, int pshared, unsigned int value);
19int sem_post(sem_t *semaphore);
20int sem_timedwait(sem_t *restrict semaphore, struct timespec *restrict abstime);
21int sem_trywait(sem_t *semaphore);
22int sem_wait(sem_t *semaphore);
23
24#ifdef __cplusplus
25}
26#endif
27
28#endif /* ZEPHYR_INCLUDE_POSIX_SEMAPHORE_H_ */
int sem_trywait(sem_t *semaphore)
int sem_init(sem_t *semaphore, int pshared, unsigned int value)
int sem_post(sem_t *semaphore)
int sem_wait(sem_t *semaphore)
int sem_destroy(sem_t *semaphore)
int sem_timedwait(sem_t *restrict semaphore, struct timespec *restrict abstime)
int sem_getvalue(sem_t *restrict semaphore, int *restrict value)
Definition: _timespec.h:22