summaryrefslogtreecommitdiffstats
path: root/adb/sysdeps.h
diff options
context:
space:
mode:
Diffstat (limited to 'adb/sysdeps.h')
-rw-r--r--adb/sysdeps.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/adb/sysdeps.h b/adb/sysdeps.h
index 74f4ed1..b518076 100644
--- a/adb/sysdeps.h
+++ b/adb/sysdeps.h
@@ -44,6 +44,7 @@ typedef CRITICAL_SECTION adb_mutex_t;
#define ADB_MUTEX_DEFINE(x) adb_mutex_t x
/* declare all mutexes */
+/* For win32, adb_sysdeps_init() will do the mutex runtime initialization. */
#define ADB_MUTEX(x) extern adb_mutex_t x;
#include "mutex_list.h"
@@ -195,6 +196,8 @@ struct fdevent {
fdevent *prev;
int fd;
+ int force_eof;
+
unsigned short state;
unsigned short events;
@@ -274,13 +277,14 @@ static __inline__ int adb_is_absolute_host_path( const char* path )
#define OS_PATH_SEPARATOR_STR "/"
typedef pthread_mutex_t adb_mutex_t;
+
#define ADB_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
#define adb_mutex_init pthread_mutex_init
#define adb_mutex_lock pthread_mutex_lock
#define adb_mutex_unlock pthread_mutex_unlock
#define adb_mutex_destroy pthread_mutex_destroy
-#define ADB_MUTEX_DEFINE(m) static adb_mutex_t m = PTHREAD_MUTEX_INITIALIZER
+#define ADB_MUTEX_DEFINE(m) adb_mutex_t m = PTHREAD_MUTEX_INITIALIZER
#define adb_cond_t pthread_cond_t
#define adb_cond_init pthread_cond_init
@@ -289,6 +293,10 @@ typedef pthread_mutex_t adb_mutex_t;
#define adb_cond_signal pthread_cond_signal
#define adb_cond_destroy pthread_cond_destroy
+/* declare all mutexes */
+#define ADB_MUTEX(x) extern adb_mutex_t x;
+#include "mutex_list.h"
+
static __inline__ void close_on_exec(int fd)
{
fcntl( fd, F_SETFD, FD_CLOEXEC );