JP Abgrall | 2e5dd6e | 2011-03-16 15:57:42 -0700 | [diff] [blame] | 1 | /* 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 Project | 9ca14dc | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 6 | #ifndef ADB_MUTEX |
| 7 | #error ADB_MUTEX not defined when including this file |
| 8 | #endif |
Spencer Low | 939d000 | 2015-08-01 17:29:23 -0700 | [diff] [blame] | 9 | ADB_MUTEX(dirname_lock) |
The Android Open Source Project | 9ca14dc | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 10 | ADB_MUTEX(socket_list_lock) |
| 11 | ADB_MUTEX(transport_lock) |
| 12 | #if ADB_HOST |
| 13 | ADB_MUTEX(local_transports_lock) |
| 14 | #endif |
| 15 | ADB_MUTEX(usb_lock) |
| 16 | |
JP Abgrall | 2e5dd6e | 2011-03-16 15:57:42 -0700 | [diff] [blame] | 17 | // Sadly logging to /data/adb/adb-... is not thread safe. |
| 18 | // After modifying adb.h::D() to count invocations: |
| 19 | // DEBUG(jpa):0:Handling main() |
| 20 | // DEBUG(jpa):1:[ usb_init - starting thread ] |
| 21 | // (Oopsies, no :2:, and matching message is also gone.) |
| 22 | // DEBUG(jpa):3:[ usb_thread - opening device ] |
| 23 | // DEBUG(jpa):4:jdwp control socket started (10) |
| 24 | ADB_MUTEX(D_lock) |
| 25 | |
The Android Open Source Project | 9ca14dc | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 26 | #undef ADB_MUTEX |