summaryrefslogtreecommitdiff
path: root/source/helpers
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-12-15 19:05:11 +0000
committerRobin Watts <robin.watts@artifex.com>2016-12-19 12:56:50 +0000
commit1c3463c27470783a5b6807a91628a71f33b91090 (patch)
tree2fe0f9bbb8f20551f43ba086fe5cb1c54d1507dc /source/helpers
parentefab0b22ef17e95e12c7fe230b2e3073e5251304 (diff)
downloadmupdf-1c3463c27470783a5b6807a91628a71f33b91090.tar.xz
mu-threads: Fix windows thread and semaphore creation
Was returning errors on successful creation.
Diffstat (limited to 'source/helpers')
-rw-r--r--source/helpers/mu-threads/mu-threads.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/helpers/mu-threads/mu-threads.c b/source/helpers/mu-threads/mu-threads.c
index 72fb259c..58c725a2 100644
--- a/source/helpers/mu-threads/mu-threads.c
+++ b/source/helpers/mu-threads/mu-threads.c
@@ -61,7 +61,7 @@ void mu_unlock_mutex(mu_mutex *mutex)
int mu_create_semaphore(mu_semaphore *sem)
{
sem->handle = CreateSemaphore(NULL, 0, 1, NULL);
- return (sem->handle != NULL);
+ return (sem->handle == NULL);
}
void mu_destroy_semaphore(mu_semaphore *sem)
@@ -103,7 +103,7 @@ int mu_create_thread(mu_thread *th, mu_thread_fn *fn, void *arg)
th->arg = arg;
th->handle = CreateThread(NULL, 0, thread_starter, th, 0, NULL);
- return (th->handle != NULL);
+ return (th->handle == NULL);
}
void mu_destroy_thread(mu_thread *th)