2018-02-06 04:57:44 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
2018-09-14 19:43:44 +02:00
|
|
|
#ifndef ZEPHYR_INCLUDE_POSIX_SEMAPHORE_H_
|
|
|
|
#define ZEPHYR_INCLUDE_POSIX_SEMAPHORE_H_
|
2018-02-06 04:57:44 +01:00
|
|
|
|
2019-08-12 19:55:06 +02:00
|
|
|
#include <posix/time.h>
|
|
|
|
#include "posix_types.h"
|
|
|
|
|
2018-02-06 04:57:44 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
int sem_destroy(sem_t *semaphore);
|
2020-08-12 19:33:04 +02:00
|
|
|
int sem_getvalue(sem_t *ZRESTRICT semaphore, int *ZRESTRICT value);
|
2018-02-06 04:57:44 +01:00
|
|
|
int sem_init(sem_t *semaphore, int pshared, unsigned int value);
|
|
|
|
int sem_post(sem_t *semaphore);
|
2020-08-12 19:33:04 +02:00
|
|
|
int sem_timedwait(sem_t *ZRESTRICT semaphore, struct timespec *ZRESTRICT abstime);
|
2018-02-06 04:57:44 +01:00
|
|
|
int sem_trywait(sem_t *semaphore);
|
|
|
|
int sem_wait(sem_t *semaphore);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2018-09-14 19:43:44 +02:00
|
|
|
#endif /* ZEPHYR_INCLUDE_POSIX_SEMAPHORE_H_ */
|