Reentrant versions of localtime and gmtime.
Joel Tornatore
Joel.Tornatore at Eng.Sun.COM
Tue Oct 31 16:03:17 UTC 1995
## From eggert at twinsun.com Mon Oct 30 20:06:39 1995
##
## Date: Mon, 30 Oct 1995 17:13:53 -0800
## From: "J.T. Conklin" <jtc at cygnus.com>
##
## struct tm *
## + localtime_r(timep, res)
## + const time_t * const timep;
## + struct tm * tm;
## + {
## + tzset();
## + localsub(timep, 0L, tm);
## + return tm;
## + }
##
## That isn't reentrant, since tzset() isn't reentrant.
Solaris solves this problem with a mutex lock that is
acquired by all functions, including the _r versions.
joel
More information about the tz
mailing list