Hide the __bionic_clone and __bionic_clone_entry implementation details.

clone(2) is the public symbol.

Also switch a test from __bionic_clone to clone; testing public API
means the test now works on glibc too.

Change-Id: If59def26a00c3afadb8a6cf9442094c35a59ffde
This commit is contained in:
Elliott Hughes
2014-05-08 19:00:23 -07:00
parent 170daa042c
commit 954cf0d4e2
9 changed files with 15 additions and 17 deletions

View File

@@ -51,6 +51,14 @@ TEST(sched, clone) {
}
#endif
TEST(sched, clone_errno) {
// Check that our hand-written clone assembler sets errno correctly on failure.
uintptr_t fake_child_stack[16];
errno = 0;
ASSERT_EQ(-1, clone(NULL, &fake_child_stack[16], CLONE_THREAD, NULL));
ASSERT_EQ(EINVAL, errno);
}
TEST(sched, cpu_set) {
cpu_set_t set;