History

Only use pthread_setname_np on Android >= 9 (2.3)

Older versions of Android don't have this function.

Martin Storsjö committed 12 years ago

Commit 0a3d4c41 parent 94a1d441 file · +4 −1Browse files

Showing the changes to codec/common/src/WelsThreadLib.cpp (1 of 1 file). Show all

Unified · Split

codec/common/src/WelsThreadLib.cpp+4−1
@@ -58,6 +58,9 @@ · 57 unmodified lines
58#ifdef ANDROID_NDK58#ifdef ANDROID_NDK
59#include <cpu-features.h>59#include <cpu-features.h>
60#endif60#endif
61#ifdef __ANDROID__
62#include <android/api-level.h>
63#endif
61 64
62#include "WelsThreadLib.h"65#include "WelsThreadLib.h"
63#include <stdio.h>66#include <stdio.h>
@@ -252,7 +255,7 @@ WELS_THREAD_ERROR_CODE WelsThreadSetName (const char* thread_name) { · 188 unmodified lines
252#ifdef APPLE_IOS255#ifdef APPLE_IOS
253 pthread_setname_np(thread_name);256 pthread_setname_np(thread_name);
254#endif257#endif
255#ifdef __ANDROID__258#if defined(__ANDROID__) && __ANDROID_API__ >= 9
256 pthread_setname_np(pthread_self(), thread_name);259 pthread_setname_np(pthread_self(), thread_name);
257#endif260#endif
258 // do nothing261 // do nothing

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t