summaryrefslogtreecommitdiffstats
path: root/adb/adb.h
diff options
context:
space:
mode:
authorJP Abgrall <jpa@google.com>2011-02-23 18:44:39 -0800
committerJP Abgrall <jpa@google.com>2011-02-23 18:49:00 -0800
commit0e7c4274c687446dbe30a814278d7a6b99da8c4e (patch)
tree1a186c36a574be64b986179f3504f9aebec99281 /adb/adb.h
parent1e0582eba6cb07aa9311602dbed7d13bbab84588 (diff)
downloadcore-0e7c4274c687446dbe30a814278d7a6b99da8c4e.tar.gz
core-0e7c4274c687446dbe30a814278d7a6b99da8c4e.tar.bz2
core-0e7c4274c687446dbe30a814278d7a6b99da8c4e.zip
Revert "Fix adb hang when subprocess dies early."
This is for http://b/3482112 "adb interactions with device causing test harness failures". This reverts commit 69c5c4c45bd4f1575ae8bdba13795297be7deb8c. Change-Id: I630bf2e04d2ecf0223bd2af4e87136754ff880d3
Diffstat (limited to 'adb/adb.h')
-rw-r--r--adb/adb.h38
1 files changed, 4 insertions, 34 deletions
diff --git a/adb/adb.h b/adb/adb.h
index 7cbf3d33b..0aa98d3db 100644
--- a/adb/adb.h
+++ b/adb/adb.h
@@ -123,7 +123,7 @@ struct asocket {
/* socket-type-specific extradata */
void *extra;
- /* A socket is bound to atransport */
+ /* A socket is bound to atransport */
atransport *transport;
};
@@ -344,50 +344,20 @@ typedef enum {
#if ADB_TRACE
-// TODO(jpa): remove this after fixing fprintf() multithreading issue {
-// Can't include sysdeps.h, because framebuffer_service.c wants a different
-// close() than what sysdeps overrides when linking adbd.
+ int adb_trace_mask;
-// Assume Linux.
-#ifndef _ADB_SYSDEPS_H
-#include <pthread.h>
-typedef pthread_mutex_t adb_mutex_t;
-#define ADB_MUTEX(x) extern adb_mutex_t x;
-#include "mutex_list.h"
-#endif
-
-// }
-
- extern int adb_trace_mask;
- extern unsigned char adb_trace_output_count;
void adb_trace_init(void);
# define ADB_TRACING ((adb_trace_mask & (1 << TRACE_TAG)) != 0)
/* you must define TRACE_TAG before using this macro */
-# define D(...) \
- do { \
- if (ADB_TRACING) { \
- adb_mutex_lock(&D_lock); \
- fprintf(stderr, "%s::%s():", \
- __FILE__, __FUNCTION__); \
- fprintf(stderr, __VA_ARGS__ ); \
- fflush(stderr); \
- adb_mutex_unlock(&D_lock); \
- } \
- } while (0)
-# define DR(...) \
+ #define D(...) \
do { \
- if (ADB_TRACING) { \
- adb_mutex_lock(&D_lock); \
+ if (ADB_TRACING) \
fprintf(stderr, __VA_ARGS__ ); \
- fflush(stderr); \
- adb_mutex_unlock(&D_lock); \
- } \
} while (0)
#else
# define D(...) ((void)0)
-# define DR(...) ((void)0)
# define ADB_TRACING 0
#endif