/*
* This file and its contents are supplied under the terms of the
* Common Development and Distribution License ("CDDL"), version 1.0.
* You may only use this file in accordance with the terms of version
* 1.0 of the CDDL.
*
* A full copy of the text of the CDDL should have accompanied this
* source. A copy of the CDDL is also available via the Internet at
*/
/*
* Copyright 2016 Joyent, Inc.
*/
#ifndef _THREADS_H
#define _THREADS_H
/*
*/
#include <sys/feature_tests.h>
#include <limits.h>
#include <time.h>
#include <pthread.h>
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(_STRICT_SYMBOLS) || defined(_STDC_C11)
#if !defined(_NORETURN_KYWD)
#if __STDC_VERSION__ - 0 >= 201112L
#else
#define _NORETURN_KYWD
#endif /* __STDC_VERSION__ - 0 >= 201112L */
#endif /* !defined(_NORETURN_KYWD) */
typedef void (*tss_dtor_t)(void *);
typedef int (*thrd_start_t)(void *);
enum {
};
enum {
thrd_success = 0,
};
extern int cnd_broadcast(cnd_t *);
extern void cnd_destroy(cnd_t *);
extern int cnd_signal(cnd_t *);
const struct timespec *_RESTRICT_KYWD);
extern void mtx_destroy(mtx_t *);
const struct timespec *_RESTRICT_KYWD);
extern int mtx_trylock(mtx_t *);
extern int mtx_unlock(mtx_t *);
extern thrd_t thrd_current(void);
extern int thrd_detach(thrd_t);
extern void thrd_yield(void);
extern void tss_delete(tss_t);
#endif /* !_STRICT_SYMBOLS | _STDC_C11 */
#ifdef __cplusplus
}
#endif
#endif /* _THREADS_H */