diff options
| author | 2011-09-10 19:08:39 +0200 | |
|---|---|---|
| committer | 2012-03-19 01:38:54 +0100 | |
| commit | 475c9679716eec92e3508063b7486e3508c4c974 (patch) | |
| tree | 5ab09c85387821e05b052cbb642b92ae102953ec /src/notification_proxy.h | |
| parent | 6f29ab73053327066409744d025dcbd03fd6b627 (diff) | |
| download | libimobiledevice-475c9679716eec92e3508063b7486e3508c4c974.tar.gz libimobiledevice-475c9679716eec92e3508063b7486e3508c4c974.tar.bz2 | |
WIN32: use windows threads and mutexes instead of pthread_*
Diffstat (limited to 'src/notification_proxy.h')
| -rw-r--r-- | src/notification_proxy.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/notification_proxy.h b/src/notification_proxy.h index 4a9cdad..0f92cdf 100644 --- a/src/notification_proxy.h +++ b/src/notification_proxy.h | |||
| @@ -21,15 +21,24 @@ | |||
| 21 | #ifndef INOTIFICATION_PROXY_H | 21 | #ifndef INOTIFICATION_PROXY_H |
| 22 | #define INOTIFICATION_PROXY_H | 22 | #define INOTIFICATION_PROXY_H |
| 23 | 23 | ||
| 24 | #ifdef WIN32 | ||
| 25 | #include <windows.h> | ||
| 26 | #else | ||
| 24 | #include <pthread.h> | 27 | #include <pthread.h> |
| 28 | #endif | ||
| 25 | 29 | ||
| 26 | #include "libimobiledevice/notification_proxy.h" | 30 | #include "libimobiledevice/notification_proxy.h" |
| 27 | #include "property_list_service.h" | 31 | #include "property_list_service.h" |
| 28 | 32 | ||
| 29 | struct np_client_private { | 33 | struct np_client_private { |
| 30 | property_list_service_client_t parent; | 34 | property_list_service_client_t parent; |
| 35 | #ifdef WIN32 | ||
| 36 | CRITICAL_SECTION mutex; | ||
| 37 | HANDLE notifier; | ||
| 38 | #else | ||
| 31 | pthread_mutex_t mutex; | 39 | pthread_mutex_t mutex; |
| 32 | pthread_t notifier; | 40 | pthread_t notifier; |
| 41 | #endif | ||
| 33 | }; | 42 | }; |
| 34 | 43 | ||
| 35 | void* np_notifier(void* arg); | 44 | void* np_notifier(void* arg); |
