diff options
author | crupest <crupest@outlook.com> | 2021-06-10 11:43:23 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-06-10 11:43:23 +0800 |
commit | 500ee4751c4861c4217c067f5d0dcae0cbd55d7c (patch) | |
tree | cd926a06928d977eebeb359798f96a683576bc51 /operating-system-experiment/Interlocked.cpp | |
parent | df97d69a45ba4e50114458e2b5c4185460f2d9f3 (diff) | |
download | life-500ee4751c4861c4217c067f5d0dcae0cbd55d7c.tar.gz life-500ee4751c4861c4217c067f5d0dcae0cbd55d7c.tar.bz2 life-500ee4751c4861c4217c067f5d0dcae0cbd55d7c.zip |
...
Diffstat (limited to 'operating-system-experiment/Interlocked.cpp')
-rw-r--r-- | operating-system-experiment/Interlocked.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/operating-system-experiment/Interlocked.cpp b/operating-system-experiment/Interlocked.cpp new file mode 100644 index 0000000..4f224e4 --- /dev/null +++ b/operating-system-experiment/Interlocked.cpp @@ -0,0 +1,16 @@ +#include "Interlocked.hpp"
+
+#ifdef CRU_WINDOWS
+#include <Windows.h>
+#else
+#endif
+
+namespace cru {
+void InterlockedIncrease(volatile long long *v) {
+#ifdef CRU_WINDOWS
+ InterlockedIncrement64(v);
+#else
+
+#endif
+}
+} // namespace cru
|