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
6f490584
Commit
6f490584
authored
11 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Define protected_int_value() macros to perform a thread-safe read of the
current protected-interger value.
parent
e129b164
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/xpdev/threadwrap.h
+5
-1
5 additions, 1 deletion
src/xpdev/threadwrap.h
with
5 additions
and
1 deletion
src/xpdev/threadwrap.h
+
5
−
1
View file @
6f490584
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* *
* Copyright 201
1
Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 201
4
Rob Swindell - http://www.synchro.net/copyright.html *
* *
* *
* This library is free software; you can redistribute it and/or *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public License *
* modify it under the terms of the GNU Lesser General Public License *
...
@@ -169,9 +169,13 @@ int protected_int64_init(protected_int64_t*, int64_t value);
...
@@ -169,9 +169,13 @@ int protected_int64_init(protected_int64_t*, int64_t value);
/* Return new value: */
/* Return new value: */
int32_t
protected_int32_adjust
(
protected_int32_t
*
,
int32_t
adjustment
);
int32_t
protected_int32_adjust
(
protected_int32_t
*
,
int32_t
adjustment
);
#define protected_int32_value(i) protected_int32_adjust(&i,0)
uint32_t
protected_uint32_adjust
(
protected_uint32_t
*
,
int32_t
adjustment
);
uint32_t
protected_uint32_adjust
(
protected_uint32_t
*
,
int32_t
adjustment
);
#define protected_uint32_value(i) protected_uint32_adjust(&i,0)
int64_t
protected_int64_adjust
(
protected_int64_t
*
,
int64_t
adjustment
);
int64_t
protected_int64_adjust
(
protected_int64_t
*
,
int64_t
adjustment
);
#define protected_int64_value(i) protected_int64_adjust(&i,0)
uint64_t
protected_uint64_adjust
(
protected_uint64_t
*
,
int64_t
adjustment
);
uint64_t
protected_uint64_adjust
(
protected_uint64_t
*
,
int64_t
adjustment
);
#define protected_uint64_value(i) protected_uint64_adjust(&i,0)
/* Return 0 on success, non-zero on failure (see pthread_mutex_destroy): */
/* Return 0 on success, non-zero on failure (see pthread_mutex_destroy): */
#define protected_int32_destroy(i) pthread_mutex_destroy(&i.mutex)
#define protected_int32_destroy(i) pthread_mutex_destroy(&i.mutex)
...
...
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