Return-Path: From: Andrei Emeltchenko To: linux-bluetooth@vger.kernel.org Subject: [PATCHv2 0/9] Improve logging for Android Date: Tue, 29 Oct 2013 12:21:49 +0200 Message-Id: <1383042118-21205-1-git-send-email-Andrei.Emeltchenko.news@gmail.com> In-Reply-To: <1382957047-31775-1-git-send-email-Andrei.Emeltchenko.news@gmail.com> References: <1382957047-31775-1-git-send-email-Andrei.Emeltchenko.news@gmail.com> Sender: linux-bluetooth-owner@vger.kernel.org List-ID: From: Andrei Emeltchenko Changes: *v2: Added thread-safe helpers for printing properties, bdaddr, etc after comments that simple printing is not thread-safe. The idea is to use TLS (thread local storage) like bionic is doing for strerror for example. More info can be found on manpage for pthread_key_create. This patch series uses debug functions defined already for haltest and allows to print very helpful logs on Android target like shown below: ... hal-bluetooth.c:set_adapter_property() prop: type=BT_PROPERTY_ADAPTER_SCAN_MODE len=4 val=BT_SCAN_MODE_NONE ... Andrei Emeltchenko (9): android/haltest: Export print property android/haltest: Fix compile error making function static android/haltest: Use pointer as parameter for debug android/hal: Print full property in debug android/hal: Add extra logs android/hal: Print adapter state android/hal: Print adapter property in callback android: Add thread-safe helpers android: Use thread-safe helpers android/client/if-bt.c | 112 +------------------------------------------ android/client/textconv.c | 115 +++++++++++++++++++++++++++++++++++++++++++++ android/client/textconv.h | 3 ++ android/hal-bluetooth.c | 28 ++++++----- android/pthread-local.h | 58 +++++++++++++++++++++++ 5 files changed, 194 insertions(+), 122 deletions(-) create mode 100644 android/pthread-local.h -- 1.7.10.4