diff options
author | Russell Belfer <rb@github.com> | 2013-06-29 12:41:39 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-07-10 12:14:13 -0700 |
commit | 302a04b09ca706eeda9b8cceb50694f37973e348 (patch) | |
tree | d1a0199a8989ec1e727510145a929e69cc58eaf1 /src/thread-utils.h | |
parent | e807860fa9b5278932a0ba25f84b4035b0ebda84 (diff) | |
download | libgit2-302a04b09ca706eeda9b8cceb50694f37973e348.tar.gz |
Add accessors for refcount value
Diffstat (limited to 'src/thread-utils.h')
-rw-r--r-- | src/thread-utils.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/thread-utils.h b/src/thread-utils.h index f19a2ba2c..f8c4dc66d 100644 --- a/src/thread-utils.h +++ b/src/thread-utils.h @@ -43,6 +43,11 @@ GIT_INLINE(void) git_atomic_set(git_atomic *a, int val) a->val = val; } +GIT_INLINE(int) git_atomic_get(git_atomic *a) +{ + return (int)a->val; +} + #ifdef GIT_THREADS #define git_thread pthread_t |