diff options
author | Bobby Bingham <koorogi@koorogi.info> | 2014-02-06 22:11:22 -0600 |
---|---|---|
committer | Bobby Bingham <koorogi@koorogi.info> | 2014-02-09 20:07:43 -0600 |
commit | fdf5f1b13123883ac1d5e298e5f32c7ed43578ce (patch) | |
tree | 56cddbaadf3f67c66a4914f4a3db7ae6d19a7aa6 /src/thread/x86_64/clone.s | |
parent | 7ee48f7b69523c68768684551bc37ba05496c27f (diff) | |
download | musl-fdf5f1b13123883ac1d5e298e5f32c7ed43578ce.tar.gz musl-fdf5f1b13123883ac1d5e298e5f32c7ed43578ce.tar.xz musl-fdf5f1b13123883ac1d5e298e5f32c7ed43578ce.zip |
clone: make clone a wrapper around __clone
The architecture-specific assembly versions of clone did not set errno on failure, which is inconsistent with glibc. __clone still returns the error via its return value, and clone is now a wrapper that sets errno as needed. The public clone has also been moved to src/linux, as it's not directly related to the pthreads API. __clone is called by pthread_create, which does not report errors via errno. Though not strictly necessary, it's nice to avoid clobbering errno here.
Diffstat (limited to 'src/thread/x86_64/clone.s')
-rw-r--r-- | src/thread/x86_64/clone.s | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/thread/x86_64/clone.s b/src/thread/x86_64/clone.s index 4db081cd..ee59903a 100644 --- a/src/thread/x86_64/clone.s +++ b/src/thread/x86_64/clone.s @@ -1,10 +1,7 @@ .text .global __clone -.weak clone .type __clone,@function -.type clone,@function __clone: -clone: xor %eax,%eax mov $56,%al mov %rdi,%r11 |