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
c75c84fa
Commit
c75c84fa
authored
13 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Switch to stdint.h types from magical FreeBSD (or maybe GCC?) types.
parent
205d8ecf
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/xpdev/xpsem.c
+2
-2
2 additions, 2 deletions
src/xpdev/xpsem.c
src/xpdev/xpsem.h
+6
-5
6 additions, 5 deletions
src/xpdev/xpsem.h
with
8 additions
and
7 deletions
src/xpdev/xpsem.c
+
2
−
2
View file @
c75c84fa
...
...
@@ -90,7 +90,7 @@ xp_sem_init(xp_sem_t *sem, int pshared, unsigned int value)
goto
RETURN
;
}
(
*
sem
)
->
count
=
(
u
_
int32_t
)
value
;
(
*
sem
)
->
count
=
(
uint32_t
)
value
;
(
*
sem
)
->
nwaiters
=
0
;
(
*
sem
)
->
magic
=
XP_SEM_MAGIC
;
...
...
@@ -248,7 +248,7 @@ xp_sem_setvalue(xp_sem_t *sem, int sval)
_SEM_CHECK_VALIDITY
(
sem
);
pthread_mutex_lock
(
&
(
*
sem
)
->
lock
);
(
*
sem
)
->
count
=
(
u
_
int32_t
)
sval
;
(
*
sem
)
->
count
=
(
uint32_t
)
sval
;
if
(((
*
sem
)
->
nwaiters
>
0
)
&&
sval
)
{
/*
* We must use pthread_cond_broadcast() rather than
...
...
This diff is collapsed.
Click to expand it.
src/xpdev/xpsem.h
+
6
−
5
View file @
c75c84fa
...
...
@@ -46,6 +46,7 @@
#include
<sys/types.h>
#include
<fcntl.h>
#include
<pthread.h>
#include
<inttypes.h>
/* Opaque type definition. */
struct
xp_sem
;
...
...
@@ -55,7 +56,7 @@ typedef struct xp_sem *xp_sem_t;
#define XP_SEM_VALUE_MAX UINT_MAX
#if defined(__solaris__)
typedef
unsigned
int
u
_
int32_t
;
typedef
unsigned
int
uint32_t
;
#endif
#if defined(__cplusplus)
...
...
@@ -88,12 +89,12 @@ int xp_sem_timedwait (xp_sem_t *sem, const struct timespec *abs_timeout);
*/
struct
xp_sem
{
#define XP_SEM_MAGIC ((u
_
int32_t) 0x09fa4012)
u
_
int32_t
magic
;
#define XP_SEM_MAGIC ((uint32_t) 0x09fa4012)
uint32_t
magic
;
pthread_mutex_t
lock
;
pthread_cond_t
gtzero
;
u
_
int32_t
count
;
u
_
int32_t
nwaiters
;
uint32_t
count
;
uint32_t
nwaiters
;
};
extern
pthread_once_t
_thread_init_once
;
...
...
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