aboutsummaryrefslogtreecommitdiff
path: root/works
diff options
context:
space:
mode:
Diffstat (limited to 'works')
-rw-r--r--works/life/operating-system-experiment/Interlocked.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/works/life/operating-system-experiment/Interlocked.cpp b/works/life/operating-system-experiment/Interlocked.cpp
index 4f224e4..1c0f638 100644
--- a/works/life/operating-system-experiment/Interlocked.cpp
+++ b/works/life/operating-system-experiment/Interlocked.cpp
@@ -6,11 +6,11 @@
#endif
namespace cru {
-void InterlockedIncrease(volatile long long *v) {
+void InterlockedAdd(volatile long long *v, long long a) {
#ifdef CRU_WINDOWS
- InterlockedIncrement64(v);
+ InterlockedAdd64(v, a);
#else
-
+ __sync_fetch_and_add(v, a);
#endif
}
} // namespace cru