[Threading] Android thread naming and other cleanup

This commit is contained in:
Triang3l
2020-11-22 20:03:45 +03:00
parent aca23c08cf
commit 63ff758049
8 changed files with 80 additions and 42 deletions

View File

@@ -15,6 +15,7 @@
// avoided!
#include <android/native_activity.h>
#include <pthread.h>
#include <cstddef>
#include <cstdint>
@@ -32,7 +33,10 @@ int32_t api_level();
// Android API functions added after the minimum supported API version.
struct ApiFunctions {
struct {
// libandroid
int (*ASharedMemory_create)(const char* name, size_t size);
// libc
int (*pthread_getname_np)(pthread_t pthread, char* buf, size_t n);
} api_26;
};
const ApiFunctions& api_functions();