Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Aug 2010 03:23:07 +0000 (UTC)
From:      David Xu <davidxu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r211859 - head/lib/libthr/thread
Message-ID:  <201008270323.o7R3N7EP062038@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008270323.o7R3N7EP062038>