Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
fd72cccb
Commit
fd72cccb
authored
21 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Stop using BSD macros unnecessarily.
parent
b232aa59
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/xpdev/xpsem.h
+17
-27
17 additions, 27 deletions
src/xpdev/xpsem.h
with
17 additions
and
27 deletions
src/xpdev/xpsem.h
+
17
−
27
View file @
fd72cccb
...
@@ -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() \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment