Removed pthread_attr_getstackaddr/pthread_attr_setstackaddr
Moved existing definitions to ndk_cruft to preserve NDK compatibility. Bug: 13281069 Change-Id: I6f260de69afa55a6274f0d13145c19ac6517b9d5
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
// This file perpetuates the mistakes of the past, but only for 32-bit targets.
|
||||
#if !defined(__LP64__)
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/time.h>
|
||||
@@ -73,4 +74,17 @@ extern "C" void memswap(void* m1, void* m2, size_t n) {
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" int pthread_attr_setstackaddr(pthread_attr_t*, void*) {
|
||||
// This was removed from POSIX.1-2008, and is not implemented on bionic.
|
||||
// Needed for ABI compatibility with the NDK.
|
||||
return ENOSYS;
|
||||
}
|
||||
|
||||
extern "C" int pthread_attr_getstackaddr(const pthread_attr_t* attr, void** stack_addr) {
|
||||
// This was removed from POSIX.1-2008.
|
||||
// Needed for ABI compatibility with the NDK.
|
||||
*stack_addr = (char*)attr->stack_base + attr->stack_size;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user