All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zeng Linggang <zenglg.jy-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH] gethostbyname.3: ATTRIBUTES: Note functions that aren't thread-safe
Date: Wed, 8 Apr 2015 10:56:14 +0800	[thread overview]
Message-ID: <1428461788-7518-4-git-send-email-zenglg.jy@cn.fujitsu.com> (raw)
In-Reply-To: <1428461788-7518-1-git-send-email-zenglg.jy-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>

The markings match glibc markings.

gethostbyname:    MT-Unsafe race:hostbyname env locale

gethostbyaddr:    MT-Unsafe race:hostbyaddr env locale

sethostent:       MT-Unsafe race:hostent env locale
endhostent:       MT-Unsafe race:hostent env locale
gethostent_r:     MT-Unsafe race:hostent env locale

herror:           MT‐Safe
hstrerror:        MT‐Safe

gethostent:       MT-Unsafe race:hostent race:hostentbuf env locale

gethostbyname2:   MT-Unsafe race:hostbyname2 env locale

gethostbyaddr_r:  MT-Safe env locale
gethostbyname_r:  MT-Safe env locale
gethostbyname2_r: MT-Safe env locale

Signed-off-by: Zeng Linggang <zenglg.jy-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
---
 man3/gethostbyname.3 | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 71 insertions(+)

diff --git a/man3/gethostbyname.3 b/man3/gethostbyname.3
index 41a5886..91898b9 100644
--- a/man3/gethostbyname.3
+++ b/man3/gethostbyname.3
@@ -314,6 +314,77 @@ host database file
 .TP
 .I /etc/nsswitch.conf
 name service switch configuration
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lbw18 lb lbw29
+l l l.
+Interface	Attribute	Value
+T{
+.BR gethostbyname ()
+T}	Thread safety	T{
+MT-Unsafe race:hostbyname env
+.br
+locale
+T}
+T{
+.BR gethostbyaddr ()
+T}	Thread safety	T{
+MT-Unsafe race:hostbyaddr env
+.br
+locale
+T}
+T{
+.BR sethostent (),
+.br
+.BR endhostent (),
+.br
+.BR gethostent_r ()
+T}	Thread safety	T{
+MT-Unsafe race:hostent env
+.br
+locale
+T}
+T{
+.BR herror (),
+.br
+.BR hstrerror ()
+T}	Thread safety	MT-Safe
+T{
+.BR gethostent ()
+T}	Thread safety	T{
+MT-Unsafe race:hostent
+.br
+race:hostentbuf env locale
+T}
+T{
+.BR gethostbyname2 ()
+T}	Thread safety	T{
+MT-Unsafe race:hostbyname2
+.br
+env locale
+T}
+T{
+.BR gethostbyaddr_r (),
+.BR gethostbyname_r (),
+.BR gethostbyname2_r ()
+T}	Thread safety	MT-Safe env locale
+.TE
+
+In the above table,
+.I hostent
+in
+.I race:hostent
+signifies that if any of the functions
+.BR sethostent (3),
+.BR gethostent (3),
+.BR gethostent_r (3),
+or
+.BR endhostent (3)
+are used in parallel in different threads of a program,
+then data races could occur.
 .SH CONFORMING TO
 POSIX.1-2001 specifies
 .BR gethostbyname (),
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-04-08  2:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08  2:56 [PATCH ] ATTRIBUTES: new correct versions Zeng Linggang
     [not found] ` <1428461788-7518-1-git-send-email-zenglg.jy-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2015-04-08  2:56   ` [PATCH] asprintf.3: ATTRIBUTES: Note functions that are thread-safe Zeng Linggang
2015-04-08  2:56   ` [PATCH] ctime.3: ATTRIBUTES: Note functions that aren't thread-safe Zeng Linggang
2015-04-08  2:56   ` Zeng Linggang [this message]
2015-04-08  2:56   ` [PATCH] getnetent.3: " Zeng Linggang
2015-04-08  2:56   ` [PATCH] get_nprocs_conf.3: ATTRIBUTES: Note functions that are thread-safe Zeng Linggang
2015-04-08  2:56   ` [PATCH] getutent.3: ATTRIBUTES: Note functions that aren't thread-safe Zeng Linggang
2015-04-08  2:56   ` [PATCH] mbsnrtowcs.3: ATTRIBUTES: Note function that isn't thread-safe Zeng Linggang
2015-04-08  2:56   ` [PATCH] mbsrtowcs.3: " Zeng Linggang
2015-04-08  2:56   ` [PATCH] perror.3: ATTRIBUTES: Note function that is thread-safe Zeng Linggang
2015-04-08  2:56   ` [PATCH] printf.3: ATTRIBUTES: Note functions that are thread-safe Zeng Linggang
2015-04-08  2:56   ` [PATCH] scandir.3: " Zeng Linggang
2015-04-08  2:56   ` [PATCH] scanf.3: " Zeng Linggang
2015-04-08  2:56   ` [PATCH] unlocked_stdio.3: ATTRIBUTES: Note functions that aren't thread-safe Zeng Linggang
2015-04-08  2:56   ` [PATCH] wcrtomb.3: ATTRIBUTES: Note function that isn't thread-safe Zeng Linggang
2015-04-08  2:56   ` [PATCH] wcsnrtombs.3: " Zeng Linggang
2015-04-08  2:56   ` [PATCH] wcsrtombs.3: " Zeng Linggang
2015-04-08  2:56   ` [PATCH] wprintf.3: ATTRIBUTES: Note functions that are thread-safe Zeng Linggang
2015-04-11  6:53   ` [PATCH ] ATTRIBUTES: new correct versions Michael Kerrisk (man-pages)
     [not found]     ` <5528C4DC.6000006-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-13  1:32       ` Zeng Linggang

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=1428461788-7518-4-git-send-email-zenglg.jy@cn.fujitsu.com \
    --to=zenglg.jy-bthxqxjhjhxqfuhtdcdx3a@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.