diff options
author | Pavlin Radoslavov <pavlin@google.com> | 2016-10-14 19:34:48 -0700 |
---|---|---|
committer | Pavlin Radoslavov <pavlin@google.com> | 2016-10-17 22:46:42 -0700 |
commit | b2a292b5d8df2f359c38b0787bc01181225a9bc9 (patch) | |
tree | 8f5f871981f241eb575cf70b758461c18242afda /udrv | |
parent | 3c196348ee9922fde76502b107656b07f04b31f3 (diff) | |
download | bt-b2a292b5d8df2f359c38b0787bc01181225a9bc9.tar.gz |
Renamed most C files to C++: *.c to *.cc
Also:
- Fixed C++ related compilation errors.
- Added missing 'extern "C"' guards in some of the header files.
- Added missing LOCAL_CPP_EXTENSION to Android.mk files.
- Added-back btif/src/btif_mce.cc and bta/mce/bta_mce_* to
btif/Android.mk and bta/Android.mk respectively.
- Fixed the alphabetical ordering of the *.cc files in some
of the Android.mk files.
- Added missing Copyright header to "osi/include/list.h"
- Updated "osi/src/wakelock.cc" to use C++ std::string
instead of dynamic allocation of C-style strings.
Test: code compilation, unit tests, and A2DP streaming
Change-Id: Ia2f7215ed9df32775c701b68fc86b09875b942c7
Diffstat (limited to 'udrv')
-rw-r--r-- | udrv/BUILD.gn | 2 | ||||
-rw-r--r-- | udrv/ulinux/uipc.cc (renamed from udrv/ulinux/uipc.c) | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/udrv/BUILD.gn b/udrv/BUILD.gn index 90c84b5a1..1993cc3f3 100644 --- a/udrv/BUILD.gn +++ b/udrv/BUILD.gn @@ -16,7 +16,7 @@ source_set("udrv") { sources = [ - "ulinux/uipc.c", + "ulinux/uipc.cc", ] include_dirs = [ diff --git a/udrv/ulinux/uipc.c b/udrv/ulinux/uipc.cc index 41403eb2e..f913500ba 100644 --- a/udrv/ulinux/uipc.c +++ b/udrv/ulinux/uipc.cc @@ -18,7 +18,7 @@ /***************************************************************************** * - * Filename: uipc.c + * Filename: uipc.cc * * Description: UIPC implementation for bluedroid * @@ -353,7 +353,8 @@ static inline void uipc_wakeup_locked(void) OSI_NO_INTR(send(uipc_main.signal_fds[1], &sig_on, sizeof(sig_on), 0)); } -static int uipc_setup_server_locked(tUIPC_CH_ID ch_id, char *name, tUIPC_RCV_CBACK *cback) +static int uipc_setup_server_locked(tUIPC_CH_ID ch_id, const char *name, + tUIPC_RCV_CBACK *cback) { int fd; @@ -503,7 +504,7 @@ void uipc_close_locked(tUIPC_CH_ID ch_id) } -static void uipc_read_task(void *arg) +static void *uipc_read_task(void *arg) { int ch_id; int result; @@ -557,6 +558,8 @@ static void uipc_read_task(void *arg) uipc_main.tid = 0; BTIF_TRACE_EVENT("UIPC READ THREAD DONE"); + + return nullptr; } @@ -564,7 +567,8 @@ int uipc_start_main_server_thread(void) { uipc_main.running = 1; - if (pthread_create(&uipc_main.tid, (const pthread_attr_t *) NULL, (void*)uipc_read_task, NULL) < 0) + if (pthread_create(&uipc_main.tid, (const pthread_attr_t *) NULL, + uipc_read_task, nullptr) < 0) { BTIF_TRACE_ERROR("uipc_thread_create pthread_create failed:%d", errno); return -1; |