Commit c964f73d3f5a6529bba87c0ad1e484e2a5db87ee

Edward Thomson 2020-10-14T12:35:00

Merge pull request #5664 from lhchavez/define-non-threadsafe-git-load Define `git___load` when building with `-DTHREADSAFE=OFF`

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/src/thread-utils.h b/src/thread-utils.h
index ecb4909..3311672 100644
--- a/src/thread-utils.h
+++ b/src/thread-utils.h
@@ -311,6 +311,11 @@ GIT_INLINE(volatile void *) git___swap(
 	return old;
 }
 
+GIT_INLINE(volatile void *) git___load(void * volatile *ptr)
+{
+	return *ptr;
+}
+
 #ifdef GIT_ARCH_64
 
 GIT_INLINE(int64_t) git_atomic64_add(git_atomic64 *a, int64_t addend)