Loading system/stack/btu/btu_task.cc +0 −19 Original line number Diff line number Diff line Loading @@ -111,22 +111,3 @@ void main_thread_start_up() { } void main_thread_shut_down() { main_thread.ShutDown(); } bool is_on_main_thread() { // Pthreads doesn't have the concept of a thread ID, so we have to reach down // into the kernel. #if defined(OS_MACOSX) return main_thread.GetThreadId() == pthread_mach_thread_np(pthread_self()); #elif defined(OS_LINUX) #include <sys/syscall.h> /* For SYS_xxx definitions */ #include <unistd.h> return main_thread.GetThreadId() == syscall(__NR_gettid); #elif defined(__ANDROID__) #include <sys/types.h> #include <unistd.h> return main_thread.GetThreadId() == gettid(); #else LOG(ERROR) << __func__ << "Unable to determine if on main thread"; return true; #endif } system/stack/include/btu.h +0 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ bt_status_t do_in_main_thread_delayed(const base::Location& from_here, base::OnceClosure task, const base::TimeDelta& delay); bool is_on_main_thread(); using BtMainClosure = std::function<void()>; void post_on_bt_main(BtMainClosure closure); Loading system/test/common/main_handler.cc +0 −19 Original line number Diff line number Diff line Loading @@ -77,22 +77,3 @@ void sync_main_handler() { post_on_bt_main([&promise]() { promise.set_value(); }); future.wait_for(std::chrono::milliseconds(sync_timeout_in_ms)); }; bool is_on_main_thread() { // Pthreads doesn't have the concept of a thread ID, so we have to reach down // into the kernel. #if defined(OS_MACOSX) return main_thread.GetThreadId() == pthread_mach_thread_np(pthread_self()); #elif defined(OS_LINUX) #include <sys/syscall.h> /* For SYS_xxx definitions */ #include <unistd.h> return main_thread.GetThreadId() == syscall(__NR_gettid); #elif defined(__ANDROID__) #include <sys/types.h> #include <unistd.h> return main_thread.GetThreadId() == gettid(); #else LOG(ERROR) << __func__ << "Unable to determine if on main thread"; return true; #endif } system/test/common/main_handler.h +0 −1 Original line number Diff line number Diff line Loading @@ -37,4 +37,3 @@ void main_thread_shut_down(); extern int sync_timeout_in_ms; void sync_main_handler(); bluetooth::common::MessageLoopThread* get_main_thread(); bool is_on_main_thread(); Loading
system/stack/btu/btu_task.cc +0 −19 Original line number Diff line number Diff line Loading @@ -111,22 +111,3 @@ void main_thread_start_up() { } void main_thread_shut_down() { main_thread.ShutDown(); } bool is_on_main_thread() { // Pthreads doesn't have the concept of a thread ID, so we have to reach down // into the kernel. #if defined(OS_MACOSX) return main_thread.GetThreadId() == pthread_mach_thread_np(pthread_self()); #elif defined(OS_LINUX) #include <sys/syscall.h> /* For SYS_xxx definitions */ #include <unistd.h> return main_thread.GetThreadId() == syscall(__NR_gettid); #elif defined(__ANDROID__) #include <sys/types.h> #include <unistd.h> return main_thread.GetThreadId() == gettid(); #else LOG(ERROR) << __func__ << "Unable to determine if on main thread"; return true; #endif }
system/stack/include/btu.h +0 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ bt_status_t do_in_main_thread_delayed(const base::Location& from_here, base::OnceClosure task, const base::TimeDelta& delay); bool is_on_main_thread(); using BtMainClosure = std::function<void()>; void post_on_bt_main(BtMainClosure closure); Loading
system/test/common/main_handler.cc +0 −19 Original line number Diff line number Diff line Loading @@ -77,22 +77,3 @@ void sync_main_handler() { post_on_bt_main([&promise]() { promise.set_value(); }); future.wait_for(std::chrono::milliseconds(sync_timeout_in_ms)); }; bool is_on_main_thread() { // Pthreads doesn't have the concept of a thread ID, so we have to reach down // into the kernel. #if defined(OS_MACOSX) return main_thread.GetThreadId() == pthread_mach_thread_np(pthread_self()); #elif defined(OS_LINUX) #include <sys/syscall.h> /* For SYS_xxx definitions */ #include <unistd.h> return main_thread.GetThreadId() == syscall(__NR_gettid); #elif defined(__ANDROID__) #include <sys/types.h> #include <unistd.h> return main_thread.GetThreadId() == gettid(); #else LOG(ERROR) << __func__ << "Unable to determine if on main thread"; return true; #endif }
system/test/common/main_handler.h +0 −1 Original line number Diff line number Diff line Loading @@ -37,4 +37,3 @@ void main_thread_shut_down(); extern int sync_timeout_in_ms; void sync_main_handler(); bluetooth::common::MessageLoopThread* get_main_thread(); bool is_on_main_thread();