5#ifndef SKYWAY_ANDROID_SDK_THREAD_UTILS_HPP
6#define SKYWAY_ANDROID_SDK_THREAD_UTILS_HPP
12#if defined(WEBRTC_IOS) || defined(WEBRTC_LINUX)
21inline int SetThreadName(
const std::string& name) {
23#if defined(WEBRTC_ANDROID)
24#if __ANDROID_API__ < 24
26 return prctl(PR_SET_NAME, name.c_str());
28 return pthread_setname_np(pthread_self(), name.c_str());
31#elif defined(WEBRTC_IOS)
32 return pthread_setname_np(name.c_str());
33#elif defined(WEBRTC_LINUX)
34 return pthread_setname_np(pthread_self(), name.c_str());