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
e1e034cc
Commit
e1e034cc
authored
4 years ago
by
Rob Swindell
Browse files
Options
Downloads
Patches
Plain Diff
Use atomics for protected-ints on other *nixes too (not just FreeBSD)
parent
e06cc807
No related branches found
No related tags found
1 merge request
!463
MRC mods by Codefenix (2024-10-20)
Pipeline
#1353
failed
4 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/xpdev/threadwrap.c
+1
-1
1 addition, 1 deletion
src/xpdev/threadwrap.c
src/xpdev/threadwrap.h
+2
-2
2 additions, 2 deletions
src/xpdev/threadwrap.h
with
3 additions
and
3 deletions
src/xpdev/threadwrap.c
+
1
−
1
View file @
e1e034cc
...
...
@@ -217,7 +217,7 @@ int DLLCALL pthread_mutex_destroy(pthread_mutex_t* mutex)
/* Protected (thread-safe) Integers (e.g. atomic/interlocked variables) */
/************************************************************************/
#ifdef __
FreeBSD
__
#ifdef __
unix
__
#define PROTECTED_TYPE_INIT(type) \
int DLLCALL protected_##type##_init(protected_##type##_t* prot, type##_t value) \
{ \
...
...
This diff is collapsed.
Click to expand it.
src/xpdev/threadwrap.h
+
2
−
2
View file @
e1e034cc
...
...
@@ -40,7 +40,7 @@
#include
"gen_defs.h"
/* HANDLE */
#include
"wrapdll.h"
/* DLLEXPORT and DLLCALL */
#ifdef __
FreeBSD
__
#ifdef __
unix
__
#include
<stdatomic.h>
#endif
...
...
@@ -152,7 +152,7 @@ DLLEXPORT int DLLCALL pthread_once(pthread_once_t *oc, void (*init)(void));
/* working and being thread-safe on all platforms that support pthread */
/* mutexes. */
/************************************************************************/
#ifdef __
FreeBSD
__
#ifdef __
unix
__
typedef
_Atomic
(
int32_t
)
protected_int32_t
;
typedef
_Atomic
(
uint32_t
)
protected_uint32_t
;
typedef
_Atomic
(
int64_t
)
protected_int64_t
;
...
...
This diff is collapsed.
Click to expand it.
Rob Swindell
@rswindell
mentioned in commit
ddb1cea4
·
4 years ago
mentioned in commit
ddb1cea4
mentioned in commit ddb1cea4a8bee9050a4cbc2bb5f9fdd79eb53a76
Toggle commit list
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