All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@baldric.uwo.ca>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: PARISC list <parisc-linux@lists.parisc-linux.org>,
	John David Anglin <dave.anglin@nrc-cnrc.gc.ca>,
	Randolph Chung <tausq@debian.org>
Subject: Re: [parisc-linux] pthread attributes and stack positions (gcc related?)
Date: Mon, 29 Sep 2003 11:10:38 -0400	[thread overview]
Message-ID: <20030929151038.GC15180@systemhalted> (raw)
In-Reply-To: <1064771620.10778.5.camel@mulgrave>

On Sun, Sep 28, 2003 at 12:53:38PM -0500, James Bottomley wrote:
> On Sun, 2003-09-28 at 12:42, Carlos O'Donell wrote:
> > The variable is definately on the process stack. The thread's stack 
> > address seems to be inside the libraries 'writable' space and the stack 
> > size is wrong (or uninitialized). Perhaps I should just be looking for 
> > arch-dependant init code that we might be missing.
> 
> This, I believe to be correct: there's only one real stack (i.e. the
> thing on x86 that grows down from top of memory) and only one thread can
> have it.  The rest of the thread stacks are mmapped at fixed sizes with
> a guard area to prevent them growing too far.  mmapped memory comes out
> of the same pool that shared library memory comes from, so you should
> correctly see the mappings interleave (depending on the load and thread
> start order).

I agree, it seems though that after "fork" the values returned by 
"pthread_getattr_np (pthread_self (), &a);" are bogus. While if you call
pthread_create(...) and then the previous line from within the newly
created thread the values are initialized properly. A mistake might
exist with symbol versioning by which we are not calling libpthread's
overloaded thread manager "fork()" and continuing on with the normal syscall.

I think this seems to be a question of expected behaviour. I'll pass
this onto the libc-alpha list.

c.

  reply	other threads:[~2003-09-29 15:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-28 17:42 [parisc-linux] pthread attributes and stack positions (gcc related?) Carlos O'Donell
2003-09-28 17:53 ` James Bottomley
2003-09-29 15:10   ` Carlos O'Donell [this message]
2003-09-29 19:02     ` Carlos O'Donell

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=20030929151038.GC15180@systemhalted \
    --to=carlos@baldric.uwo.ca \
    --cc=James.Bottomley@steeleye.com \
    --cc=dave.anglin@nrc-cnrc.gc.ca \
    --cc=parisc-linux@lists.parisc-linux.org \
    --cc=tausq@debian.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.