> the attached patch
-> The patch that was meant to be attached :)
> the solution is to add a new syscall that sets the current->user_tid
> address. This new syscall is used by glibc's exec() implementation. =20
I don't understand this: why would glibc use it in exec()?
> Another change is to make CLONE_SETTID work even if CLONE_VM is not used.
> This means that the TID must be set in the child's address space, not in
> the parent's address space. I've also merged SETTID and CLEARTID, the two
> should always be used together by any new-style threading abstraction.
But this prevents using SETTID to get the tid in a
signal-handler-accessible place before a SIGCHLD can arrive, without
having to use sigprocmask.
How about renaming CLONE_SETTID to CLONE_SETTID_PARENT, leaving the
existing semantics alone, and adding a CLONE_SETTID (with a new value)
that sets the tid in the fork child?
This would require two separate tid pointers so that glibc could
implement a fork_get_pid(int* pid) setting pid in the parent vm and the
tid in struct pthread in the child.
Alternatively, if the fork child calls sys_set_tid_address on its own
right after creation, no modifications to clone are required (this is
what my sys_cleartid patch did).
BTW, user_tid needs to be cleared on exec, and I'm not sure if we are
doing this.
--=-7ExARx0AVsh+gZTAEKkW
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQA914RBdjkty3ft5+cRAoXpAJ9H86OF7lhCX1ON5w0dXHBz570l1gCfdvsO
0MvlMMSj98nPcjHf9VFbWe4=
=duVo
-----END PGP SIGNATURE-----
--=-7ExARx0AVsh+gZTAEKkW--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/