Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Sep 2009 00:20:06 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-threads@FreeBSD.org
Subject:   Re: threads/135462: commit references a PR
Message-ID:  <200909250020.n8P0K62G003837@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR threads/135462; it has been noted by GNATS.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: threads/135462: commit references a PR
Date: Fri, 25 Sep 2009 00:15:40 +0000 (UTC)

 Author: davidxu
 Date: Fri Sep 25 00:15:30 2009
 New Revision: 197477
 URL: http://svn.freebsd.org/changeset/base/197477
 
 Log:
   don't report error if key was deleted.
   
   PR:	threads/135462
 
 Modified:
   head/lib/libthr/thread/thr_spec.c
 
 Modified: head/lib/libthr/thread/thr_spec.c
 ==============================================================================
 --- head/lib/libthr/thread/thr_spec.c	Fri Sep 25 00:03:13 2009	(r197476)
 +++ head/lib/libthr/thread/thr_spec.c	Fri Sep 25 00:15:30 2009	(r197477)
 @@ -131,9 +131,19 @@ _thread_cleanupspecific(void)
  				curthread->specific[key].data = NULL;
  				curthread->specific_data_count--;
  			}
 +			else if (curthread->specific[key].data != NULL) {
 +				/* 
 +				 * This can happen if the key is deleted via
 +				 * pthread_key_delete without first setting the value
 +				 * to NULL in all threads.  POSIX says that the
 +				 * destructor is not invoked in this case.
 +				 */
 +				curthread->specific[key].data = NULL;
 +				curthread->specific_data_count--;
 +			}
  
  			/*
 -			 * If there is a destructore, call it
 +			 * If there is a destructor, call it
  			 * with the key table entry unlocked:
  			 */
  			if (destructor != NULL) {
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 



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