Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/time PR/44248: Antti Kantee: Fix multi-threaded loc...



details:   https://anonhg.NetBSD.org/src/rev/9b8d03769790
branches:  trunk
changeset: 759845:9b8d03769790
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Dec 17 23:11:57 2010 +0000

description:
PR/44248: Antti Kantee: Fix multi-threaded localtime hang.

diffstat:

 lib/libc/time/localtime.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r edb6fc2bc33a -r 9b8d03769790 lib/libc/time/localtime.c
--- a/lib/libc/time/localtime.c Fri Dec 17 22:56:22 2010 +0000
+++ b/lib/libc/time/localtime.c Fri Dec 17 23:11:57 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: localtime.c,v 1.49 2010/12/16 18:38:07 christos Exp $  */
+/*     $NetBSD: localtime.c,v 1.50 2010/12/17 23:11:57 christos Exp $  */
 
 /*
 ** This file is in the public domain, so clarified as of
@@ -10,7 +10,7 @@
 #if 0
 static char    elsieid[] = "@(#)localtime.c    8.9";
 #else
-__RCSID("$NetBSD: localtime.c,v 1.49 2010/12/16 18:38:07 christos Exp $");
+__RCSID("$NetBSD: localtime.c,v 1.50 2010/12/17 23:11:57 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -1412,7 +1412,6 @@
 localtime_r(const time_t * __restrict timep, struct tm *tmp)
 {
        rwlock_rdlock(&lcl_lock);
-       rwlock_rdlock(&lcl_lock);
        tzset_unlocked();
        tmp = localtime_rz(lclptr, timep, tmp);
        rwlock_unlock(&lcl_lock);



Home | Main Index | Thread Index | Old Index