public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Luca Barbieri <ldb@ldb.ods.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	Linux-Kernel ML <linux-kernel@vger.kernel.org>
Subject: Re: [patch] threading fix, tid-2.5.47-A3
Date: 17 Nov 2002 12:57:53 +0100	[thread overview]
Message-ID: <1037534273.1597.26.camel@ldb> (raw)
In-Reply-To: <Pine.LNX.4.44.0211171314200.7001-100000@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1357 bytes --]

> 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.  
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.


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2002-11-17 11:51 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-17 12:40 [patch] threading fix, tid-2.5.47-A3 Ingo Molnar
2002-11-17 11:57 ` Luca Barbieri [this message]
2002-11-17 13:36   ` Ingo Molnar
2002-11-17 13:49   ` Ingo Molnar
2002-11-17 13:29     ` Luca Barbieri
2002-11-17 17:28 ` Linus Torvalds
2002-11-17 19:03   ` Ulrich Drepper
2002-11-17 19:19   ` Ingo Molnar
2002-11-17 19:31   ` Ingo Molnar
2002-11-17 18:27     ` Linus Torvalds
2002-11-17 20:13       ` Ingo Molnar
2002-11-17 20:01   ` Jamie Lokier
     [not found] <3DD7E3E7.6040403@redhat.com>
2002-11-17 18:54 ` Linus Torvalds
2002-11-17 20:18   ` Ingo Molnar
2002-11-17 20:37   ` Ingo Molnar
2002-11-17 19:54     ` Luca Barbieri
2002-11-17 21:17       ` Ingo Molnar
2002-11-17 20:16         ` Luca Barbieri
2002-11-17 21:45           ` Ingo Molnar
2002-11-17 20:35         ` Ulrich Drepper
2002-11-17 20:44           ` Jamie Lokier
2002-11-17 20:49           ` Luca Barbieri
2002-11-17 22:08     ` Ingo Molnar
2002-11-17 23:00     ` Linus Torvalds
2002-11-17 23:23       ` Ulrich Drepper
2002-11-18  1:33         ` Linus Torvalds
2002-11-18  3:33           ` Ulrich Drepper
2002-11-18  3:43             ` Linus Torvalds
2002-11-18  3:58               ` Ulrich Drepper
2002-11-18  4:11                 ` Linus Torvalds
2002-11-18  4:31                   ` Ulrich Drepper
2002-11-18  6:46                   ` Ulrich Drepper
2002-11-18 16:00                     ` Linus Torvalds
2002-11-18  8:07                   ` Luca Barbieri
2002-11-18  8:21                     ` Ulrich Drepper
2002-11-18  8:27                       ` Luca Barbieri
2002-11-18  8:30                 ` Luca Barbieri
2002-11-18 12:21                   ` Ingo Molnar
2002-11-18 12:50                     ` Luca Barbieri
2002-11-18 12:26                   ` Ingo Molnar
2002-11-18 13:20                     ` Alan Cox
2002-11-18 13:03                       ` Luca Barbieri
2002-11-18 16:24                       ` Linus Torvalds
2002-11-18 16:42                       ` Ingo Molnar
2002-11-18  1:46       ` Jamie Lokier
2002-11-18  3:40         ` Ulrich Drepper
2002-11-18 22:22           ` Jamie Lokier
2002-11-17 23:37     ` Ulrich Drepper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1037534273.1597.26.camel@ldb \
    --to=ldb@ldb.ods.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox