Merge "Make __clone_for_fork pure native bridge mode abstraction" am: 07c85f1688
am: e157c11f68
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1441332 Change-Id: Ib364f706a95b9a87e5a5e88c2bffeff8097cfe85
This commit is contained in:
commit
24c3dd690f
2 changed files with 5 additions and 2 deletions
|
@ -33,8 +33,8 @@
|
|||
#include "private/bionic_defs.h"
|
||||
#include "pthread_internal.h"
|
||||
|
||||
__BIONIC_WEAK_FOR_NATIVE_BRIDGE
|
||||
extern "C" __LIBC_HIDDEN__ int __clone_for_fork() {
|
||||
__BIONIC_WEAK_FOR_NATIVE_BRIDGE_INLINE
|
||||
int __clone_for_fork() {
|
||||
pthread_internal_t* self = __get_thread();
|
||||
|
||||
int result = clone(nullptr, nullptr, (CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD),
|
||||
|
|
|
@ -36,9 +36,12 @@
|
|||
#ifdef __ANDROID_NATIVE_BRIDGE__
|
||||
#define __BIONIC_WEAK_FOR_NATIVE_BRIDGE __attribute__((__weak__, __noinline__))
|
||||
#define __BIONIC_WEAK_VARIABLE_FOR_NATIVE_BRIDGE __attribute__((__weak__))
|
||||
#define __BIONIC_WEAK_FOR_NATIVE_BRIDGE_INLINE \
|
||||
__BIONIC_WEAK_FOR_NATIVE_BRIDGE extern "C" __LIBC_HIDDEN__
|
||||
#else
|
||||
#define __BIONIC_WEAK_FOR_NATIVE_BRIDGE
|
||||
#define __BIONIC_WEAK_VARIABLE_FOR_NATIVE_BRIDGE
|
||||
#define __BIONIC_WEAK_FOR_NATIVE_BRIDGE_INLINE static inline
|
||||
#endif
|
||||
|
||||
#endif /* __BIONIC_PRIVATE_BIONIC_DEFS_H_ */
|
||||
|
|
Loading…
Reference in a new issue