mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: rvk@prodmail.net
Cc: Robert Hancock <hancockr@shaw.ca>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Thread_Id
Date: Thu, 14 Jul 2005 12:30:52 +0200	[thread overview]
Message-ID: <1121337052.3967.25.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <42D63916.7000007@prodmail.net>

On Thu, 2005-07-14 at 15:36 +0530, RVK wrote:

> >
> >it doesn't return a number it returns a pointer ;) or a floating point
> >number. You don't know :)
> >
> >what it returns is a *cookie*. A cookie that you can only use to pass
> >back to various pthread functions.
> >
> >  
> >
> Hahaha......common. Please clarify following....

I'm missing the joke

> SYNOPSIS
>        #include <pthread.h>
> 
>        pthread_t pthread_self(void);
> 
> DESCRIPTION
>        pthread_self return the thread identifier for the calling thread.

*identifier*.
It doesn't give a meaning beyond that, and if you look at other pthread
manpages (say pthread_join) it just wants that identifier back. If you
want to attach meaning to a thread identifier, please come up with a
manpage/standard that actually defines the meaning of it.

> 
> bits/pthreadtypes.h:150:typedef unsigned long int pthread_t;

and here you 
1) look at implementation details of your specific threading
implementation and 
2) you prove that your analysis is wrong since the implementation you
look at defines it as *unsigned* so it can't be negative. So what your
app does is clearly wrong even within the implementation you look at.


Other implementations are allowed to use different types for this. In
fact, I'd be surprised if NPTL and LinuxThreads would have the same
type... (they'll have the same size for ABI compat reasons of course,
but type... not so sure).




  reply	other threads:[~2005-07-14 10:31 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4mfcK-UT-25@gated-at.bofh.it>
     [not found] ` <4mUJ1-5ZG-23@gated-at.bofh.it>
2005-07-06  2:47   ` Thread_Id Robert Hancock
2005-07-14  5:33     ` Thread_Id RVK
2005-07-14  7:45       ` Thread_Id Arjan van de Ven
2005-07-14 10:06         ` Thread_Id RVK
2005-07-14 10:30           ` Arjan van de Ven [this message]
2005-07-14 11:20             ` Thread_Id RVK
2005-07-14 12:25               ` Thread_Id Arjan van de Ven
2005-07-14 12:39                 ` Thread_Id Jakub Jelinek
2005-07-14 13:08                   ` Thread_Id Benedikt Spranger
2005-07-14 13:49                   ` Thread_Id RVK
2005-07-14 10:39           ` Thread_Id Ian Campbell
2005-07-14 11:02             ` Thread_Id RVK
2005-07-14 11:16               ` Thread_Id Ian Campbell
2005-07-14 11:24                 ` Thread_Id RVK
2005-07-14 23:02                   ` Thread_Id J.A. Magallon
2005-07-15  6:09                     ` Thread_Id RVK
2005-07-15  6:18                       ` Thread_Id Ian Campbell
2005-07-14 14:28               ` Thread_Id Robert Hancock
2005-07-23 15:02 [PATCH] quieten OOM killer noise Anton Blanchard
2005-07-05 12:15 ` Thread_Id RVK
2005-07-05 12:55   ` Thread_Id Arjan van de Ven
2005-07-07 12:43   ` Thread_Id Benedikt Spranger
2005-07-14  5:31     ` Thread_Id RVK

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=1121337052.3967.25.camel@laptopd505.fenrus.org \
    --to=arjan@infradead.org \
    --cc=hancockr@shaw.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rvk@prodmail.net \
    /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

all inboxes | Powered by JetHome®