From: "Alexander Terekhov" <TEREKHOV@de.ibm.com>
To: pthreads-win32@sources.redhat.com
Subject: RE: Cancellation points
Date: Thu, 19 Dec 2002 16:53:00 -0000 [thread overview]
Message-ID: <OF69FA2FC9.1C5AE53E-ONC1256C95.0004C88A-C1256C95.0004F3B7@de.ibm.com> (raw)
In-Reply-To: <8179ED123ECCD611A5490000F822E6EA061BCA@pd001649.daronmont.com.au>
Simon Gerblich wrote:
[...]
> Is it correct if I put pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,
NULL)
^^^^
> after the small piece of code where I don't want a cancelation point?
It's correct as long as you use it properly; with proper arguments.
AFAICS, the use of null pointer for "oldstate"/"oldtype" is incorrect.
http://www.opengroup.org/onlinepubs/007904975/functions/pthread_setcancelstate.html
regards,
alexander.
Sent by: pthreads-win32-owner@sources.redhat.com
To: pthreads-win32@sources.redhat.com
cc:
Subject: RE: Cancellation points
>BTW,
>
>> pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL)
> ^^^^
>
>that's incorrect. Don't do this.
>
>regards,
>alexander.
alexander,
Is it correct if I put pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL)
after the small piece of code where I don't want a cancelation point? I
am
aware that if I start using pthread_setcancelstate() in my code I should
take care to use the "oldstate" as described in the RATIONALE and restore
the state correctly.
I was only using pthread_setcancelstate to confirm if there was a problem
with the pthread_mutex_lock() function in the 2002-11-04 snapshot.
Thanks,
Simon
next prev parent reply other threads:[~2002-12-20 0:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-19 15:29 Simon Gerblich
2002-12-19 16:53 ` Alexander Terekhov [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-12-19 5:00 Alexander Terekhov
2002-12-18 16:29 Simon Gerblich
2002-12-16 23:00 Simon Gerblich
2002-12-16 22:56 Simon Gerblich
2002-12-16 23:24 ` Ross Johnson
2002-12-17 0:15 ` Ross Johnson
2002-12-17 1:09 ` Norman Vine
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=OF69FA2FC9.1C5AE53E-ONC1256C95.0004C88A-C1256C95.0004F3B7@de.ibm.com \
--to=terekhov@de.ibm.com \
--cc=pthreads-win32@sources.redhat.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).