public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
From: Ross Johnson <rpj@ise.canberra.edu.au>
To: Milan Gardian <mg@tatramed.sk>
Cc: John.Bossom@Cognos.COM, pthreads-win32@sourceware.cygnus.com
Subject: Re: Return values
Date: Wed, 18 Aug 1999 21:31:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.05.9908191403350.23754-100000@swan.canberra.edu.au> (raw)
In-Reply-To: <000501bee96e$97998e50$440b10ac@leibinger.freinet.de>

On Wed, 18 Aug 1999, Milan Gardian wrote:

> I came across this "feature" of your pthread implementation some time ago
> (and it is another reason why I don't trust your pthreads at all) - the
> value returned by a thread function IS BEING IGNORED!!! I think every decent
> implementation of threads should care about the value (void *) that si
> returned by thread functions (why else would the pointer to thread function
> be declared as "returning pointer to void", ha?). It is not the case of your
> pthreads. Please take a look at:
> ---
> file: pthreads/private.c
> line: 192
> 
> Snip from the file, lines 187 to 194; Visual C++:
> __try
> {
>   /*
>    * Run the caller's routine;
>    */
>   (*start) (arg);
>   status = (void *) 0;
> }
> ---
> CAN you please EXPLAIN why the hell have you done it this way? Is there a
> reason? WHY do you set status value apriori to ZERO??? Why not
> status = (*start) (arg);

Dear Milan,

Yes, this would appear to be an obvious bug. I'll make the change
and credit you with finding it. Perhaps it was a case of not seeing
the trees because the forest was in the way, as distinct from not
seeing the forest because the trees are in the way.

Thanks also for providing your test code, which I will add to the
test suite.

This is an active project and it relies heavily on people like
yourself using it in the real world and reporting problems. I hope
that as you look through the code you'll find that it is really a
very well conceived implementation of POSIX threads on top of Win32
threads.

Any other problems or suggestions for improvement will be more than
happily received.

Cheers.
Ross

+----------------------+---+
| Ross Johnson         |   | E-Mail: rpj@ise.canberra.edu.au
| Info Sciences and Eng|___|
| University of Canberra   | FAX:    +61 6 2015227
| PO Box 1                 |
| Belconnen  ACT    2616   | WWW:    http://willow.canberra.edu.au/~rpj/
| AUSTRALIA                |
+--------------------------+


  reply	other threads:[~1999-08-18 21:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-17 19:44 gcc mingw/crtdll patch Bossom, John
1999-08-18  4:45 ` Return values Milan Gardian
1999-08-18 21:31   ` Ross Johnson [this message]
1999-09-02  2:43   ` pthread_exit bug ? Tristan Savatier
1999-09-02  3:06     ` Peter Slacik
1999-09-02  3:22     ` Ross Johnson
1999-09-02  3:35     ` Milan Gardian
1999-09-02  3:47       ` [pthread-win32] " Tristan Savatier
1999-09-02  4:10       ` Tristan Savatier
1999-08-18  7:03 Return values Bossom, John
1999-08-19 16:47 Hujsak, Jonathan T

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=Pine.LNX.4.05.9908191403350.23754-100000@swan.canberra.edu.au \
    --to=rpj@ise.canberra.edu.au \
    --cc=John.Bossom@Cognos.COM \
    --cc=mg@tatramed.sk \
    --cc=pthreads-win32@sourceware.cygnus.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).