svn commit: r211859 - head/lib/libthr/thread

[ Available lists | Index of svn-src-head | Month of Aug 2010 | Week of 27 Aug 2010 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
David Xu <davidxu@FreeBSD.org>
Date
27 Aug 2010 03:23:07
Subject
svn commit: r211859 - head/lib/libthr/thread
Message-ID
201008270323.o7R3N7EP062038@svn.freebsd.org


[ Hide this part ]
Author: davidxu
Date: Fri Aug 27 03:23:07 2010
New Revision: 211859
URL: http://svn.freebsd.org/changeset/base/211859

Log:
clear lock to zero state if it is destroyed.

Modified:
head/lib/libthr/thread/thr_rtld.c

Modified: head/lib/libthr/thread/thr_rtld.c
==============================================================================
--- head/lib/libthr/thread/thr_rtld.c Fri Aug 27 02:46:21 2010 (r211858)
+++ head/lib/libthr/thread/thr_rtld.c Fri Aug 27 03:23:07 2010 (r211859)
@@ -81,8 +81,11 @@ static void
_thr_rtld_lock_destroy(void *lock)
{
int locki;
+ size_t i;

locki = (struct rtld_lock *)lock - &lock_place[0];
+ for (i = 0; i < sizeof(struct rtld_lock); ++i)
+ ((char *)lock)[i] = 0;
busy_places &= ~(1 << locki);
}


Elapsed time: 0.102 seconds