2000-03-14  Ulrich Drepper  <drepper@redhat.com>

	* mutex.c (__pthread_once): Handle cancelled init function correctly.
	(pthread_once_cancelhandler): New function.
	Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
This commit is contained in:
Ulrich Drepper 2000-03-15 07:12:44 +00:00
parent d9cb1a7dad
commit 30b416ea87
9 changed files with 82 additions and 42 deletions

View File

@ -1,3 +1,9 @@
2000-03-14 Ulrich Drepper <drepper@redhat.com>
* mutex.c (__pthread_once): Handle cancelled init function correctly.
(pthread_once_cancelhandler): New function.
Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2000-03-14 Andreas Jaeger <aj@suse.de> 2000-03-14 Andreas Jaeger <aj@suse.de>
* pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to

View File

@ -173,11 +173,31 @@ static pthread_cond_t once_finished = PTHREAD_COND_INITIALIZER;
enum { NEVER = 0, IN_PROGRESS = 1, DONE = 2 }; enum { NEVER = 0, IN_PROGRESS = 1, DONE = 2 };
/* If a thread is canceled while calling the init_routine out of
pthread once, this handler will reset the once_control variable
to the NEVER state. */
static void pthread_once_cancelhandler(void *arg)
{
pthread_once_t *once_control = arg;
pthread_mutex_lock(&once_masterlock);
*once_control = NEVER;
pthread_mutex_unlock(&once_masterlock);
pthread_cond_broadcast(&once_finished);
}
int __pthread_once(pthread_once_t * once_control, void (*init_routine)(void)) int __pthread_once(pthread_once_t * once_control, void (*init_routine)(void))
{ {
/* flag for doing the condition broadcast outside of mutex */
int state_changed;
/* Test without locking first for speed */ /* Test without locking first for speed */
if (*once_control == DONE) return 0; if (*once_control == DONE) return 0;
/* Lock and test again */ /* Lock and test again */
state_changed = 0;
pthread_mutex_lock(&once_masterlock); pthread_mutex_lock(&once_masterlock);
/* If init_routine is being called from another routine, wait until /* If init_routine is being called from another routine, wait until
it completes. */ it completes. */
@ -188,12 +208,18 @@ int __pthread_once(pthread_once_t * once_control, void (*init_routine)(void))
if (*once_control == NEVER) { if (*once_control == NEVER) {
*once_control = IN_PROGRESS; *once_control = IN_PROGRESS;
pthread_mutex_unlock(&once_masterlock); pthread_mutex_unlock(&once_masterlock);
pthread_cleanup_push(pthread_once_cancelhandler, once_control);
init_routine(); init_routine();
pthread_cleanup_pop(0);
pthread_mutex_lock(&once_masterlock); pthread_mutex_lock(&once_masterlock);
*once_control = DONE; *once_control = DONE;
pthread_cond_broadcast(&once_finished); state_changed = 1;
} }
pthread_mutex_unlock(&once_masterlock); pthread_mutex_unlock(&once_masterlock);
if (state_changed)
pthread_cond_broadcast(&once_finished);
return 0; return 0;
} }
strong_alias (__pthread_once, pthread_once) strong_alias (__pthread_once, pthread_once)

View File

@ -2842,7 +2842,7 @@ msgid ""
msgstr "" msgstr ""
"Die folgende Liste enthält alle bekannten Zeichensatzkodierungen. Das\n" "Die folgende Liste enthält alle bekannten Zeichensatzkodierungen. Das\n"
"bedeutet nicht, daß zwischen allen Kombinationen dieser Namen als FROM\n" "bedeutet nicht, daß zwischen allen Kombinationen dieser Namen als FROM\n"
"und TO Paramter konvertiert werden kann. Eine Zeichensatzkodierung kann\n" "und TO Parameter konvertiert werden kann. Eine Zeichensatzkodierung kann\n"
"unter verschiedenen Namen aufgeführt sein (sog. Aliasnamen).\n" "unter verschiedenen Namen aufgeführt sein (sog. Aliasnamen).\n"
"\n" "\n"
"Einige Namen sind keine normalen Zeichenketten, sondern Reguläre Ausdrücke;\n" "Einige Namen sind keine normalen Zeichenketten, sondern Reguläre Ausdrücke;\n"

View File

@ -1,4 +1,4 @@
# @(#)africa 7.32 # @(#)africa 7.33
# This data is by no means authoritative; if you think you know better, # This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to # go ahead and edit the file (and please send any changes to
@ -10,7 +10,7 @@
# Thomas G. Shanks, The International Atlas (5th edition), # Thomas G. Shanks, The International Atlas (5th edition),
# San Diego: ACS Publications, Inc. (1999). # San Diego: ACS Publications, Inc. (1999).
# #
# Gwillim Law <LAW@encmail.encompass.com> writes that a good source # Gwillim Law <Gwil_Law@bridge-point.com> writes that a good source
# for recent time zone data is the International Air Transport # for recent time zone data is the International Air Transport
# Association's Standard Schedules Information Manual (IATA SSIM), # Association's Standard Schedules Information Manual (IATA SSIM),
# published semiannually. Law sent in several helpful summaries # published semiannually. Law sent in several helpful summaries
@ -515,10 +515,14 @@ Zone Africa/Johannesburg 1:52:00 - LMT 1892 Feb 8
# no information # no information
# Sudan # Sudan
# From Michael Ross <mross@antigone.com> (1995-11-15): #
# Sudan no longer observes any form of daylight time change. # From <a href="http://www.sunanews.net/sn13jane.html">
# I verified this today by telephone with the Sudan Mission to the # Sudan News Agency (2000-01-13)
# United Nations: 212-573-6033 # </a>, also reported by Michael De Beukelaer-Dossche via Steffen Thorsen:
# Clocks will be moved ahead for 60 minutes all over the Sudan as of noon
# Saturday.... This was announced Thursday by Caretaker State Minister for
# Manpower Abdul-Rahman Nur-Eddin.
#
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Sudan 1970 only - May 1 0:00 1:00 S Rule Sudan 1970 only - May 1 0:00 1:00 S
Rule Sudan 1970 1985 - Oct 15 0:00 0 - Rule Sudan 1970 1985 - Oct 15 0:00 0 -
@ -526,7 +530,8 @@ Rule Sudan 1971 only - Apr 30 0:00 1:00 S
Rule Sudan 1972 1985 - Apr lastSun 0:00 1:00 S Rule Sudan 1972 1985 - Apr lastSun 0:00 1:00 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Africa/Khartoum 2:10:08 - LMT 1931 Zone Africa/Khartoum 2:10:08 - LMT 1931
2:00 Sudan CA%sT 2:00 Sudan CA%sT 2000 Jan 15 12:00
3:00 - EAT
# Swaziland # Swaziland
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]

View File

@ -1,4 +1,4 @@
# @(#)asia 7.54 # @(#)asia 7.55
# This data is by no means authoritative; if you think you know better, # This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to # go ahead and edit the file (and please send any changes to
@ -10,7 +10,7 @@
# Thomas G. Shanks, The International Atlas (5th edition), # Thomas G. Shanks, The International Atlas (5th edition),
# San Diego: ACS Publications, Inc. (1999). # San Diego: ACS Publications, Inc. (1999).
# #
# Gwillim Law <LAW@encmail.encompass.com> writes that a good source # Gwillim Law <Gwil_Law@bridge-point.com> writes that a good source
# for recent time zone data is the International Air Transport # for recent time zone data is the International Air Transport
# Association's Standard Schedules Information Manual (IATA SSIM), # Association's Standard Schedules Information Manual (IATA SSIM),
# published semiannually. Law sent in several helpful summaries # published semiannually. Law sent in several helpful summaries
@ -597,7 +597,7 @@ Rule Zion 1999 only - Sep 3 2:00 0 S
# that the end date of 2000 and both dates of 2001-2002 should be regarded # that the end date of 2000 and both dates of 2001-2002 should be regarded
# as tentative pending final approval. # as tentative pending final approval.
# #
# The official announcement for the years 2000-2001 can be viewed at: # The official announcement for the years 2000-2002 can be viewed at:
# #
# ftp://ftp.huji.ac.il/pub/tz/announcements/2000-2002.ps.gz # ftp://ftp.huji.ac.il/pub/tz/announcements/2000-2002.ps.gz
@ -687,9 +687,6 @@ Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u
# The decision was taken because of the increase in working hours in # The decision was taken because of the increase in working hours in
# government's departments from six to seven hours. # government's departments from six to seven hours.
# #
# From Paul Eggert (1999-11-09):
# No word on Jordan's future rules; assume 04-01 to 10-01 for now.
#
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Jordan 1973 only - Jun 6 0:00 1:00 S Rule Jordan 1973 only - Jun 6 0:00 1:00 S
Rule Jordan 1973 1975 - Oct 1 0:00 0 - Rule Jordan 1973 1975 - Oct 1 0:00 0 -
@ -711,9 +708,9 @@ Rule Jordan 1992 1993 - Oct Fri>=1 0:00 0 -
Rule Jordan 1993 1998 - Apr Fri>=1 0:00 1:00 S Rule Jordan 1993 1998 - Apr Fri>=1 0:00 1:00 S
Rule Jordan 1994 only - Sep Fri>=15 0:00 0 - Rule Jordan 1994 only - Sep Fri>=15 0:00 0 -
Rule Jordan 1995 1998 - Sep Fri>=15 0:00s 0 - Rule Jordan 1995 1998 - Sep Fri>=15 0:00s 0 -
Rule Jordan 1999 only - Jul 1 0:00 1:00 S Rule Jordan 1999 only - Jul 1 0:00s 1:00 S
Rule Jordan 1999 max - Oct 1 0:00 0 - Rule Jordan 1999 max - Sep lastThu 0:00s 0 -
Rule Jordan 2000 max - Apr 1 0:00 1:00 - Rule Jordan 2000 max - Mar lastThu 0:00s 1:00 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Amman 2:23:44 - LMT 1931 Zone Asia/Amman 2:23:44 - LMT 1931
2:00 Jordan EE%sT 2:00 Jordan EE%sT

View File

@ -1,4 +1,4 @@
# @(#)australasia 7.55 # @(#)australasia 7.56
# This file also includes Pacific islands. # This file also includes Pacific islands.
# Notes are at the end of this file # Notes are at the end of this file
@ -464,7 +464,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# Thomas G. Shanks, The International Atlas (5th edition), # Thomas G. Shanks, The International Atlas (5th edition),
# San Diego: ACS Publications, Inc. (1999). # San Diego: ACS Publications, Inc. (1999).
# #
# Gwillim Law <LAW@encmail.encompass.com> writes that a good source # Gwillim Law <Gwil_Law@bridge-point.com> writes that a good source
# for recent time zone data is the International Air Transport # for recent time zone data is the International Air Transport
# Association's Standard Schedules Information Manual (IATA SSIM), # Association's Standard Schedules Information Manual (IATA SSIM),
# published semiannually. Law sent in several helpful summaries # published semiannually. Law sent in several helpful summaries

View File

@ -1,4 +1,4 @@
# @(#)europe 7.69 # @(#)europe 7.71
# This data is by no means authoritative; if you think you know better, # This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to # go ahead and edit the file (and please send any changes to
@ -9,7 +9,7 @@
# Thomas G. Shanks, The International Atlas (5th edition), # Thomas G. Shanks, The International Atlas (5th edition),
# San Diego: ACS Publications, Inc. (1999). # San Diego: ACS Publications, Inc. (1999).
# #
# Gwillim Law <LAW@encmail.encompass.com> writes that a good source # Gwillim Law <Gwil_Law@bridge-point.com> writes that a good source
# for recent time zone data is the International Air Transport # for recent time zone data is the International Air Transport
# Association's Standard Schedules Information Manual (IATA SSIM), # Association's Standard Schedules Information Manual (IATA SSIM),
# published semiannually. Law sent in several helpful summaries # published semiannually. Law sent in several helpful summaries
@ -1135,6 +1135,12 @@ Link Europe/Rome Europe/San_Marino
# 1997-01-21 on transition to Summer time ... established the same order of # 1997-01-21 on transition to Summer time ... established the same order of
# daylight savings time settings as in the States of the European Union. # daylight savings time settings as in the States of the European Union.
# From Andrei Ivanov (2000-03-06):
# This year Latvia will not switch to Daylight Savings Time (as specified in
# <a href="http://www.lv-laiks.lv/wwwraksti/2000/071072/vd4.htm">
# The Regulations of the Cabinet of Ministers of the Rep. of Latvia of
# 29-Feb-2000 (#79)</a>, in Latvian for subscribers only).
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Latvia 1989 1996 - Mar lastSun 2:00s 1:00 S Rule Latvia 1989 1996 - Mar lastSun 2:00s 1:00 S
Rule Latvia 1989 1996 - Sep lastSun 2:00s 0 - Rule Latvia 1989 1996 - Sep lastSun 2:00s 0 -
@ -1151,7 +1157,8 @@ Zone Europe/Riga 1:36:24 - LMT 1880
3:00 Russia MSK/MSD 1989 Mar lastSun 2:00s 3:00 Russia MSK/MSD 1989 Mar lastSun 2:00s
2:00 1:00 EEST 1989 Sep lastSun 2:00s 2:00 1:00 EEST 1989 Sep lastSun 2:00s
2:00 Latvia EE%sT 1997 Jan 21 2:00 Latvia EE%sT 1997 Jan 21
2:00 EU EE%sT 2:00 EU EE%sT 2000 Feb 29
2:00 - EET
# Liechtenstein # Liechtenstein
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]

View File

@ -1,4 +1,4 @@
# @(#)northamerica 7.50 # @(#)northamerica 7.51
# also includes Central America and the Caribbean # also includes Central America and the Caribbean
# This data is by no means authoritative; if you think you know better, # This data is by no means authoritative; if you think you know better,
@ -509,7 +509,7 @@ Link Pacific/Honolulu HST
# Thomas G. Shanks, The International Atlas (5th edition), # Thomas G. Shanks, The International Atlas (5th edition),
# San Diego: ACS Publications, Inc. (1999). # San Diego: ACS Publications, Inc. (1999).
# #
# Gwillim Law <LAW@encmail.encompass.com> writes that a good source # Gwillim Law <Gwil_Law@bridge-point.com> writes that a good source
# for recent time zone data is the International Air Transport # for recent time zone data is the International Air Transport
# Association's Standard Schedules Information Manual (IATA SSIM), # Association's Standard Schedules Information Manual (IATA SSIM),
# published semiannually. Law sent in several helpful summaries # published semiannually. Law sent in several helpful summaries

View File

@ -1,4 +1,4 @@
# @(#)southamerica 7.34 # @(#)southamerica 7.35
# This data is by no means authoritative; if you think you know better, # This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to # go ahead and edit the file (and please send any changes to
@ -9,7 +9,7 @@
# Thomas G. Shanks, The International Atlas (5th edition), # Thomas G. Shanks, The International Atlas (5th edition),
# San Diego: ACS Publications, Inc. (1999). # San Diego: ACS Publications, Inc. (1999).
# #
# Gwillim Law <LAW@encmail.encompass.com> writes that a good source # Gwillim Law <Gwil_Law@bridge-point.com> writes that a good source
# for recent time zone data is the International Air Transport # for recent time zone data is the International Air Transport
# Association's Standard Schedules Information Manual (IATA SSIM), # Association's Standard Schedules Information Manual (IATA SSIM),
# published semiannually. Law sent in several helpful summaries # published semiannually. Law sent in several helpful summaries
@ -114,8 +114,11 @@ Rule Arg 1989 1992 - Oct Sun>=15 0:00 1:00 S
# from the International Date Line. On March 5, 2000, at 0:00 local time, # from the International Date Line. On March 5, 2000, at 0:00 local time,
# Argentina will come off daylight savings time, which will bring them to 8 # Argentina will come off daylight savings time, which will bring them to 8
# hours from the International Date Line. # hours from the International Date Line.
Rule Arg 1999 max - Oct Sun>=1 0:00 1:00 S #
Rule Arg 2000 max - Mar Sun>=1 0:00 0 - # From Peter Gradelski via Steffen Thorsen (2000-03-01):
# We just checked with our San Paulo office and they say the government of
# Argentina decided not to become one of the countries that go on or off DST.
# So Buenos Aires should be -3 hours from GMT at all times.
# #
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
# #
@ -125,8 +128,7 @@ Zone America/Buenos_Aires -3:53:48 - LMT 1894 Nov
-4:16:44 - CMT 1920 May # Cordoba Mean Time -4:16:44 - CMT 1920 May # Cordoba Mean Time
-4:00 - ART 1930 Dec -4:00 - ART 1930 Dec
-4:00 Arg AR%sT 1969 Oct 5 -4:00 Arg AR%sT 1969 Oct 5
-3:00 Arg AR%sT 1999 Oct 3 0:00 -3:00 Arg AR%sT
-4:00 Arg AR%sT
# #
# Santa Fe (SF), Entre Rios (ER), Corrientes (CN), Misiones (MN), Chaco (CC), # Santa Fe (SF), Entre Rios (ER), Corrientes (CN), Misiones (MN), Chaco (CC),
# Formosa (FM), La Pampa (LP), Chubut (CH) # Formosa (FM), La Pampa (LP), Chubut (CH)
@ -135,8 +137,7 @@ Zone America/Rosario -4:02:40 - LMT 1894 Nov
-4:00 - ART 1930 Dec -4:00 - ART 1930 Dec
-4:00 Arg AR%sT 1969 Oct 5 -4:00 Arg AR%sT 1969 Oct 5
-3:00 Arg AR%sT 1991 Jul -3:00 Arg AR%sT 1991 Jul
-3:00 - ART 1999 Oct 3 0:00 -3:00 - ART
-4:00 Arg AR%sT
# #
# Cordoba (CB), Santiago del Estero (SE), Salta (SA), Tucuman (TM), La Rioja (LR), San Juan (SJ), San Luis (SL), # Cordoba (CB), Santiago del Estero (SE), Salta (SA), Tucuman (TM), La Rioja (LR), San Juan (SJ), San Luis (SL),
# Neuquen (NQ), Rio Negro (RN) # Neuquen (NQ), Rio Negro (RN)
@ -145,8 +146,7 @@ Zone America/Cordoba -4:16:44 - LMT 1894 Nov
-4:00 - ART 1930 Dec -4:00 - ART 1930 Dec
-4:00 Arg AR%sT 1969 Oct 5 -4:00 Arg AR%sT 1969 Oct 5
-3:00 Arg AR%sT 1990 Jul -3:00 Arg AR%sT 1990 Jul
-3:00 - ART 1999 Oct 3 0:00 -3:00 - ART
-4:00 Arg AR%sT
# #
# Jujuy (JY) # Jujuy (JY)
Zone America/Jujuy -4:21:12 - LMT 1894 Nov Zone America/Jujuy -4:21:12 - LMT 1894 Nov
@ -157,8 +157,7 @@ Zone America/Jujuy -4:21:12 - LMT 1894 Nov
-4:00 - WART 1991 Oct 6 -4:00 - WART 1991 Oct 6
-4:00 1:00 WARST 1992 Mar 15 -4:00 1:00 WARST 1992 Mar 15
-4:00 - WART 1992 Oct 18 -4:00 - WART 1992 Oct 18
-3:00 - ART 1999 Oct 3 0:00 -3:00 - ART
-4:00 Arg AR%sT
# #
# Catamarca (CT) # Catamarca (CT)
Zone America/Catamarca -4:23:08 - LMT 1894 Nov Zone America/Catamarca -4:23:08 - LMT 1894 Nov
@ -168,8 +167,7 @@ Zone America/Catamarca -4:23:08 - LMT 1894 Nov
-3:00 Arg AR%sT 1990 Jul -3:00 Arg AR%sT 1990 Jul
-3:00 - ART 1991 Jul -3:00 - ART 1991 Jul
-3:00 Arg AR%sT 1992 Jul -3:00 Arg AR%sT 1992 Jul
-3:00 - ART 1999 Oct 3 0:00 -3:00 - ART
-4:00 Arg AR%sT
# #
# Mendoza (MZ) # Mendoza (MZ)
Zone America/Mendoza -4:35:16 - LMT 1894 Nov Zone America/Mendoza -4:35:16 - LMT 1894 Nov
@ -180,8 +178,7 @@ Zone America/Mendoza -4:35:16 - LMT 1894 Nov
-4:00 - WART 1991 Oct 15 -4:00 - WART 1991 Oct 15
-4:00 1:00 WARST 1992 Mar 1 -4:00 1:00 WARST 1992 Mar 1
-4:00 - WART 1992 Oct 18 -4:00 - WART 1992 Oct 18
-3:00 - ART 1999 Oct 3 0:00 -3:00 - ART
-4:00 Arg AR%sT
# Aruba # Aruba
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
@ -559,10 +556,12 @@ Rule Para 1996 only - Mar 1 0:00 0 -
# IATA SSIM (1997-09) says Mar 1; go with Shanks. # IATA SSIM (1997-09) says Mar 1; go with Shanks.
Rule Para 1997 only - Feb lastSun 0:00 0 - Rule Para 1997 only - Feb lastSun 0:00 0 -
Rule Para 1998 only - Mar 1 0:00 0 - Rule Para 1998 only - Mar 1 0:00 0 -
Rule Para 1996 max - Oct Sun>=1 0:00 1:00 S Rule Para 1996 1998 - Oct Sun>=1 0:00 1:00 S
# IATA SSIM (1999-02) says lastSat, not lastSun; (1999-09) reports no date; # IATA SSIM (1999-02) says lastSat, not lastSun; (1999-09) reports no date;
# go with Shanks. # go with Shanks.
Rule Para 1999 max - Feb lastSun 0:00 0 - Rule Para 1999 max - Feb lastSun 0:00 0 -
# IATA SSIM (2000-02) says 1999-10-10.
Rule Para 1999 max - Oct Sun>=8 0:00 1:00 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Asuncion -3:50:40 - LMT 1890 Zone America/Asuncion -3:50:40 - LMT 1890
-3:50:40 - AMT 1931 Oct 10 # Asuncion Mean Time -3:50:40 - AMT 1931 Oct 10 # Asuncion Mean Time