arc: clone: Simplify CLONE_THREAD detection
commit334ddb1b8fe5d4b473a9e410b882952f2075b417
authorAlexey Brodkin <Alexey.Brodkin@synopsys.com>
Fri, 29 Jul 2016 09:17:20 +0000 (29 12:17 +0300)
committerWaldemar Brodkorb <wbx@uclibc-ng.org>
Sun, 31 Jul 2016 10:50:54 +0000 (31 12:50 +0200)
treea7710e67cd2314bf13d943aa5244e2f69e05ce87
parentb2c2bbcc8ccd0d0b281db653d22e568b8871ad46
arc: clone: Simplify CLONE_THREAD detection

This change was inspired by similar change in glibc:
https://sourceware.org/git/?p=glibc.git;a=commit;h=0cb313f7cb0e418b3d56f3a2ac69790522ab825d

Current Linux kernel requires CLONE_VM to be set with CLONE_THREAD
otherwise returning -EINVAL, see man clone2. This means we don't need
to check for both CLONE_THREAD and CLONE_VM instead we may simplify
code a lot and just check 1 bit (CLONE_THREAD).

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Acked-by: Vineet Gupta <vgupta@synopsys.com>
libc/sysdeps/linux/arc/clone.S