zephyr/include/posix/semaphore.h
Ramakrishna Pallala f603e603bb lib: posix: Move posix layer from 'kernel' to 'lib'
Move posix layer from 'kernel' to 'lib' folder as it is not
a core kernel feature.

Fixed posix header file dependencies as part of the move and
also removed NEWLIBC related macros from posix headers.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-04-05 16:43:05 -04:00

29 lines
639 B
C

/*
* Copyright (c) 2018 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _POSIX_SEMAPHORE_H
#define _POSIX_SEMAPHORE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <posix/time.h>
#include "sys/types.h"
int sem_destroy(sem_t *semaphore);
int sem_getvalue(sem_t *restrict semaphore, int *restrict value);
int sem_init(sem_t *semaphore, int pshared, unsigned int value);
int sem_post(sem_t *semaphore);
int sem_timedwait(sem_t *restrict semaphore, struct timespec *restrict abstime);
int sem_trywait(sem_t *semaphore);
int sem_wait(sem_t *semaphore);
#ifdef __cplusplus
}
#endif
#endif /* POSIX_SEMAPHORE_H */