diff options
| author | 2013-03-20 05:38:06 +0100 | |
|---|---|---|
| committer | 2013-03-20 05:38:06 +0100 | |
| commit | b2924a1549d874fb86deaad5fd2438e567c65bf4 (patch) | |
| tree | ead89f885a0492cdfc228a1c25326912e7d9b973 /src/afc.h | |
| parent | efca491e4c19868a68a099638552f9ba431dca4b (diff) | |
| download | libimobiledevice-b2924a1549d874fb86deaad5fd2438e567c65bf4.tar.gz libimobiledevice-b2924a1549d874fb86deaad5fd2438e567c65bf4.tar.bz2 | |
use new internal common code for thread, mutex, and socket operations
Diffstat (limited to 'src/afc.h')
| -rw-r--r-- | src/afc.h | 12 |
1 files changed, 2 insertions, 10 deletions
| @@ -23,15 +23,11 @@ | |||
| 23 | #define __AFC_H | 23 | #define __AFC_H |
| 24 | 24 | ||
| 25 | #include <stdint.h> | 25 | #include <stdint.h> |
| 26 | #ifdef WIN32 | ||
| 27 | #include <windows.h> | ||
| 28 | #else | ||
| 29 | #include <pthread.h> | ||
| 30 | #endif | ||
| 31 | 26 | ||
| 32 | #include "libimobiledevice/afc.h" | 27 | #include "libimobiledevice/afc.h" |
| 33 | #include "service.h" | 28 | #include "service.h" |
| 34 | #include "endianness.h" | 29 | #include "endianness.h" |
| 30 | #include "common/thread.h" | ||
| 35 | 31 | ||
| 36 | #define AFC_MAGIC "CFA6LPAA" | 32 | #define AFC_MAGIC "CFA6LPAA" |
| 37 | #define AFC_MAGIC_LEN (8) | 33 | #define AFC_MAGIC_LEN (8) |
| @@ -62,11 +58,7 @@ struct afc_client_private { | |||
| 62 | AFCPacket *afc_packet; | 58 | AFCPacket *afc_packet; |
| 63 | int file_handle; | 59 | int file_handle; |
| 64 | int lock; | 60 | int lock; |
| 65 | #ifdef WIN32 | 61 | mutex_t mutex; |
| 66 | CRITICAL_SECTION mutex; | ||
| 67 | #else | ||
| 68 | pthread_mutex_t mutex; | ||
| 69 | #endif | ||
| 70 | int free_parent; | 62 | int free_parent; |
| 71 | }; | 63 | }; |
| 72 | 64 | ||
