2002-12-10 18:44:21

by Hu, Boris

[permalink] [raw]
Subject: problem about CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID ?


When I read create_thread() in NPTL source code, it passes
CLONE_PARENT_SETTID
| CLONE_CHILD_CLEARTID to sys_clone(). However, in arch/arm/kernel/sys_arm.c

(sys_clone) [kernel 2.5.49]
256 if (clone_flags & (CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID))
257 return -EINVAL;

I have searched CLONE_PARENT_SETTID in kernel, it seems only to appear in
some non-architecture files, such as /include/linux/sched.h and several arch
files,
but they do little about wrapping. Why ARM can't support
(CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID)?

any comments? thanks a lot.

Boris
=========================
To know what I don't know
To learn what I don't know
To contribute what I know
=========================




2002-12-10 18:53:37

by Ulrich Drepper

[permalink] [raw]
Subject: Re: problem about CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID ?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hu, Boris wrote:

> I have searched CLONE_PARENT_SETTID in kernel, it seems only to appear in
> some non-architecture files, such as /include/linux/sched.h and several arch
> files,
> but they do little about wrapping. Why ARM can't support
> (CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID)?
>
> any comments? thanks a lot.

Follow the kernel mailing lists. It's not adequate to ask these
questions here. If you would have read the kernel mailing list posts it
would have been obvious that every single architecture needs changes to
the kernel. Nobody cared for Arm so far so there obviously is no kernel
support.

- --
- --------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE99joM2ijCOnn/RHQRAsyaAJ4khzPYopcMqxUSxOsnXf+r5qPD+ACfST14
51FpBVTFUFO6A9WwAOgX5EU=
=2xM9
-----END PGP SIGNATURE-----

2002-12-11 16:15:12

by Roger Gammans

[permalink] [raw]
Subject: Re: problem about CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID ?

On Tue, Dec 10, 2002 at 11:01:32AM -0800, Ulrich Drepper wrote:
> Hu, Boris wrote:
>
> > I have searched CLONE_PARENT_SETTID in kernel, it seems only to appear in
> > some non-architecture files, such as /include/linux/sched.h and several arch
> [snip]
> the kernel. Nobody cared for Arm so far so there obviously is no kernel
> support.

Unless Russell has changed his mind recently,[1] use of SWP in userspace code
isn't supported.
I suppose this is less of a concern if futex's work on ARM though.

But you'll need some userspace synchronisation primitive to do useful work
with threads.

TTFN
[1] And I haven't been following linux-arm recently.
--
Roger.
Master of Peng Shui. (Ancient oriental art of Penguin Arranging)
GPG Key FPR: CFF1 F383 F854 4E6A 918D 5CFF A90D E73B 88DE 0B3E


Attachments:
(No filename) (797.00 B)
(No filename) (232.00 B)
Download all attachments