Re: For review: pthread_cancel.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gidday Michael,

Asynchronous cancelability
means that the thread can be canceled at any time
(usually immediately, but the system does not guarantee this).
Deferred cancelability means that cancellation will be delayed until
the thread next calls a function that is a
.IR "cancellation point" .
A list of functions that are or may be cancellation points is provided in
.IR pthreads (7).

It is very important to document the list of functions that are/are not CP in the "may be a CP" list: this is system specific and belongs to the system documentation.

For man-pages-3.14, I have added POSIX.1's lists of "are" and "may be"
cancellation points to pthreads.7.

However, it unclear to me how one determines the list of functions
that are cancellation points under glibc.  Do you have some ideas
about this?

I checked out, and I found no obvious to extract the information automatically from the source. We may have to ask support from the Glibc folks.


.SH NOTES
On Linux, cancellation is implemented using signals.
Under the NPTL threading implementation,
the first real-time signal (i.e., signal 32) is used for this purpose.

Hmmm... You are right: NPTL uses the first real-time signal (32) provided by the *kernel*. As a matter of fact, Glibc reserves kernel real-time signals 32 and 33 for NPTL; real-time queued signals available to the application ranges from SIGRTMIN (34) to SIGRTMAX(64).

Yes... exactly.

On LinuxThreads, the second real-time signal is used,
if real-time signals are available, otherwise
.B SIGUSR2
is used.

IIRC, this was true on 'older LinuxThreads'. Never used real-time queued signals as well ? (To verify...)

I'm not quite sure what you want to say there.  Can you say some
more please.

Sorry, typo and missing words make this sentence hard to understand... Second try:

Newer version of LinuxThreads uses RT signal as well? (this claim has to be verified).


.SH EXAMPLE
[...]

sleep(3) is a CP on Linux (AFAIR, sleep is a "may be CP").

Not sure what you are wanting to saying here; should something
be changed in the page?  (BTW: sleep() *is* a CP in POSIX.1.)

[...]

I hadn't the list at hand, and I thought mistakenly that sleep() is not a mandatory CP. Thanks for the note.

Cheers,
Loïc.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux