summaryrefslogtreecommitdiff
path: root/tests/benchlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchlib.c')
-rw-r--r--tests/benchlib.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/benchlib.c b/tests/benchlib.c
index 78ec3c8..3fa7171 100644
--- a/tests/benchlib.c
+++ b/tests/benchlib.c
@@ -51,6 +51,31 @@ int old_mutex_use = OLD_WIN32CS;
BOOL (WINAPI *ptw32_try_enter_critical_section)(LPCRITICAL_SECTION) = NULL;
HINSTANCE ptw32_h_kernel32;
+void
+dummy_call(int * a)
+{
+}
+
+void
+interlocked_inc_with_conditionals(int * a)
+{
+ if (a != NULL)
+ if (InterlockedIncrement((long *) a) == -1)
+ {
+ *a = 0;
+ }
+}
+
+void
+interlocked_dec_with_conditionals(int * a)
+{
+ if (a != NULL)
+ if (InterlockedDecrement((long *) a) == -1)
+ {
+ *a = 0;
+ }
+}
+
int
old_mutex_init(old_mutex_t *mutex, const old_mutexattr_t *attr)
{