Re: [PATCH] iswblank.3: ATTRIBUTES: Note function that is thread safe with exceptions

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

 



On Mon, Feb 10, 2014 at 1:20 AM, Peng Haitao <penght@xxxxxxxxxxxxxx> wrote:
> The function iswblank() is thread safe with exceptions.
> +.SH ATTRIBUTES
> +.SS Multithreading (see pthreads(7))
> +The
> +.BR iswblank ()
> +function is thread-safe with exceptions.
> +It can be safely used in multithreaded applications, as long as
> +.BR setlocale (3)
> +is not called to change the locale during its execution.

Now that glibc 2.19 is out the door and using a standard set of
"exception" markers should we try to standardize the same markers?

For example in glibc this exception is called "locale" and iswblank is
marked "MT-Safe locale." With "locale" being described in detail in
the safety conceptions section.

For example the description you use is not quite technically correct.
It is possible to call setlocale, but you must guard the call to
setlocale and all other functions marked with the "locale" safety note
using a mutex to serialize access. That may be prohibitively
expensive, but it's an option.

In summary:
* Suggest you look at glibc 2.19 release and the safety notes used
there to simplify the linux kernel manual page notes.
* Add a manual page that specifically talked about "Safety concepts"
including thread, signal, and cancellation. Talk about things in more
detail there.

If need be Alex can repost the text for the linux kenrel man pages
project to reuse it under an alternate license.

Comments?

Cheers,
Carlos.
--
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