blob: ff7275129e5b06d083f068d4cb0c34af7b849854 [file] [log] [blame]
JP Abgrall408fa572011-03-16 15:57:42 -07001/* the list of mutexes used by adb */
2/* #ifndef __MUTEX_LIST_H
3 * Do not use an include-guard. This file is included once to declare the locks
4 * and once in win32 to actually do the runtime initialization.
5 */
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -08006#ifndef ADB_MUTEX
7#error ADB_MUTEX not defined when including this file
8#endif
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -08009ADB_MUTEX(socket_list_lock)
10ADB_MUTEX(transport_lock)
11#if ADB_HOST
12ADB_MUTEX(local_transports_lock)
13#endif
14ADB_MUTEX(usb_lock)
15
JP Abgrall408fa572011-03-16 15:57:42 -070016// Sadly logging to /data/adb/adb-... is not thread safe.
17// After modifying adb.h::D() to count invocations:
18// DEBUG(jpa):0:Handling main()
19// DEBUG(jpa):1:[ usb_init - starting thread ]
20// (Oopsies, no :2:, and matching message is also gone.)
21// DEBUG(jpa):3:[ usb_thread - opening device ]
22// DEBUG(jpa):4:jdwp control socket started (10)
23ADB_MUTEX(D_lock)
24
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080025#undef ADB_MUTEX