This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[MTASCsft PATCH WIP4 27/28] Thread safety documentation.
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: libc-alpha at sourceware dot org
- Cc: carlos at redhat dot com, mtk dot manpages at gmail dot com
- Date: Sat, 12 Oct 2013 04:13:59 -0300
- Subject: [MTASCsft PATCH WIP4 27/28] Thread safety documentation.
- Authentication-results: sourceware.org; auth=none
- References: <20131012070020 dot 7511 dot 90546 dot stgit at frit dot home>
for ChangeLog
* manual/time.texi: Document thread safety properties.
---
manual/time.texi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/manual/time.texi b/manual/time.texi
index ff31e28..2ff8b4a 100644
--- a/manual/time.texi
+++ b/manual/time.texi
@@ -409,6 +409,7 @@ subtracting. @xref{Elapsed Time}.
@comment time.h
@comment ISO
@deftypefun time_t time (time_t *@var{result})
+@safety{@mtsafe{}@assafe{}@acsafe{}}
The @code{time} function returns the current calendar time as a value of
type @code{time_t}. If the argument @var{result} is not a null pointer,
the calendar time value is also stored in @code{*@var{result}}. If the
@@ -475,6 +476,12 @@ Instead, use the facilities described in @ref{Time Zone Functions}.
@comment sys/time.h
@comment BSD
@deftypefun int gettimeofday (struct timeval *@var{tp}, struct timezone *@var{tzp})
+@safety{@mtsafe{}@assafe{}@acsafe{}}
+@c On most GNU/Linux systems this is a direct syscall, but the posix/
+@c implementation (not used on GNU/Linux or GNU/Hurd) relies on time and
+@c localtime_r, saving and restoring tzname in an unsafe manner.
+@c On some GNU/Linux variants, ifunc resolvers are used in shared libc
+@c for vdso resolution. ifunc-vdso-revisit.
The @code{gettimeofday} function returns the current calendar time as
the elapsed time since the epoch in the @code{struct timeval} structure
indicated by @var{tp}. (@pxref{Elapsed Time} for a description of