This patch moves more includes (most of them, to tell the truth) to common/include directory. This completes the list of includes needed to compile current trunk with the new libc (but to do that you need more patches in queue). This patch also contains some modification (for compilation with new headers) to the common includes under __NBSD_LIBC, the define used in mk script to specialize compilation with new includes.
53 lines
1.1 KiB
C
53 lines
1.1 KiB
C
#ifndef _DDEKIT_SEMAPHORE_H
|
|
#define _DDEKIT_SEMAPHORE_H
|
|
|
|
#include <ddekit/ddekit.h>
|
|
|
|
|
|
/** \defgroup DDEKit_synchronization */
|
|
|
|
struct ddekit_sem;
|
|
typedef struct ddekit_sem ddekit_sem_t;
|
|
|
|
/** Initialize DDEKit semaphore.
|
|
*
|
|
* \ingroup DDEKit_synchronization
|
|
*
|
|
* \param value initial semaphore counter
|
|
*/
|
|
_PROTOTYPE( ddekit_sem_t *ddekit_sem_init, (int value));
|
|
|
|
/** Uninitialize semaphore.
|
|
*
|
|
* \ingroup DDEKit_synchronization
|
|
*/
|
|
_PROTOTYPE( void ddekit_sem_deinit, (ddekit_sem_t *sem));
|
|
|
|
/** Semaphore down method. */
|
|
_PROTOTYPE( void ddekit_sem_down, (ddekit_sem_t *sem));
|
|
|
|
/** Semaphore down method, non-blocking.
|
|
*
|
|
* \ingroup DDEKit_synchronization
|
|
*
|
|
* \return 0 success
|
|
* \return !=0 would block
|
|
*/
|
|
_PROTOTYPE( int ddekit_sem_down_try, (ddekit_sem_t *sem));
|
|
|
|
/** Semaphore down with timeout.
|
|
*
|
|
* \ingroup DDEKit_synchronization
|
|
*
|
|
* \return 0 success
|
|
* \return !=0 would block
|
|
*/
|
|
_PROTOTYPE( int ddekit_sem_down_timed, (ddekit_sem_t *sem, int timo));
|
|
|
|
/** Semaphore up method.
|
|
*
|
|
* \ingroup DDEKit_synchronization
|
|
*/
|
|
_PROTOTYPE( void ddekit_sem_up, (ddekit_sem_t *sem));
|
|
|
|
#endif
|