Skip to content
Snippets Groups Projects
Commit fd72cccb authored by deuce's avatar deuce
Browse files

Stop using BSD macros unnecessarily.

parent b232aa59
No related branches found
No related tags found
No related merge requests found
...@@ -54,36 +54,26 @@ typedef struct xp_sem *xp_sem_t; ...@@ -54,36 +54,26 @@ typedef struct xp_sem *xp_sem_t;
#define SEM_FAILED ((xp_sem_t *)0) #define SEM_FAILED ((xp_sem_t *)0)
#define SEM_VALUE_MAX UINT_MAX #define SEM_VALUE_MAX UINT_MAX
#if defined(__cplusplus)
#define __BEGIN_DECLS extern "C" {
#define __END_DECLS }
#else
#define __BEGIN_DECLS
#define __END_DECLS
#endif
#define __P(protos) () /* traditional C preprocessor */
/* full-blown ANSI C */
/* #define __P(protos) protos */
#ifdef __solaris__ #ifdef __solaris__
typedef unsigned int u_int32_t; typedef unsigned int u_int32_t;
#endif #endif
#ifndef KERNEL #if defined(__cplusplus)
extern "C" {
__BEGIN_DECLS #endif
int xp_sem_init __P((xp_sem_t *, int, unsigned int)); int xp_sem_init (xp_sem_t *, int, unsigned int);
int xp_sem_destroy __P((xp_sem_t *)); int xp_sem_destroy (xp_sem_t *);
xp_sem_t *sem_open __P((const char *, int, ...)); xp_sem_t *sem_open (const char *, int, ...);
int xp_sem_close __P((xp_sem_t *)); int xp_sem_close (xp_sem_t *);
int xp_sem_unlink __P((const char *)); int xp_sem_unlink (const char *);
int xp_sem_wait __P((xp_sem_t *)); int xp_sem_wait (xp_sem_t *);
int xp_sem_trywait __P((xp_sem_t *)); int xp_sem_trywait (xp_sem_t *);
int xp_sem_post __P((xp_sem_t *)); int xp_sem_post (xp_sem_t *);
int xp_sem_getvalue __P((xp_sem_t *, int *)); int xp_sem_getvalue (xp_sem_t *, int *);
int xp_sem_timedwait __P((xp_sem_t *sem, const struct timespec *abs_timeout)); int xp_sem_timedwait (xp_sem_t *sem, const struct timespec *abs_timeout);
__END_DECLS #if defined(__cplusplus)
#endif /* KERNEL */ }
#endif
/* /*
* $Id$ * $Id$
...@@ -107,7 +97,7 @@ struct xp_sem { ...@@ -107,7 +97,7 @@ struct xp_sem {
extern pthread_once_t _thread_init_once; extern pthread_once_t _thread_init_once;
extern int _threads_initialized; extern int _threads_initialized;
extern void _thread_init __P((void)); extern void _thread_init (void);
#define THREAD_INIT() \ #define THREAD_INIT() \
(void) pthread_once(&_thread_init_once, _thread_init) (void) pthread_once(&_thread_init_once, _thread_init)
#define THREAD_SAFE() \ #define THREAD_SAFE() \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment