Skip to content

Commit

Permalink
Merge pull request #509 from robUx4/win32-pthread
Browse files Browse the repository at this point in the history
win32: don't use pthread on Windows
  • Loading branch information
sahlberg authored Dec 16, 2024
2 parents bcf5c75 + 5e9d5cb commit 115103c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions include/libnfs-multithreading.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ extern "C" {

#ifdef HAVE_MULTITHREADING

#ifdef HAVE_PTHREAD
#ifdef WIN32
typedef HANDLE libnfs_thread_t;
typedef HANDLE libnfs_mutex_t;
typedef HANDLE libnfs_sem_t;
typedef DWORD nfs_tid_t;
#elif defined(HAVE_PTHREAD)
#include <pthread.h>
typedef pthread_t libnfs_thread_t;
typedef pthread_mutex_t libnfs_mutex_t;
Expand All @@ -48,13 +53,6 @@ typedef pid_t nfs_tid_t;
#endif
#endif /* HAVE_PTHREAD */

#ifdef WIN32
typedef HANDLE libnfs_thread_t;
typedef HANDLE libnfs_mutex_t;
typedef HANDLE libnfs_sem_t;
typedef DWORD nfs_tid_t;
#endif

nfs_tid_t nfs_mt_get_tid(void);
int nfs_mt_mutex_init(libnfs_mutex_t *mutex);
int nfs_mt_mutex_destroy(libnfs_mutex_t *mutex);
Expand Down

0 comments on commit 115103c

Please sign in to comment.