socsvn commit: r239968 - in soc2012/gmiller/locking-head: . include lib/libwitness

gmiller at FreeBSD.org gmiller at FreeBSD.org
Tue Jul 31 19:55:19 UTC 2012


Author: gmiller
Date: Tue Jul 31 19:55:16 2012
New Revision: 239968
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=239968

Log:
   r240024 at FreeBSD-dev:  root | 2012-07-24 08:43:51 -0500
   Add child and sibling information to pthread_lockorder_np structure.

Modified:
  soc2012/gmiller/locking-head/   (props changed)
  soc2012/gmiller/locking-head/include/pthread_np.h
  soc2012/gmiller/locking-head/lib/libwitness/lockinfo.c

Modified: soc2012/gmiller/locking-head/include/pthread_np.h
==============================================================================
--- soc2012/gmiller/locking-head/include/pthread_np.h	Tue Jul 31 19:17:25 2012	(r239967)
+++ soc2012/gmiller/locking-head/include/pthread_np.h	Tue Jul 31 19:55:16 2012	(r239968)
@@ -73,6 +73,8 @@
 struct pthread_lockorder_np {
 	struct _pthread_lockorder_private *_pvt;
 	void		*lock;
+	void		*child;
+	void		*sibling;
 };
 
 typedef void	(*pthread_switch_routine_t)(pthread_t, pthread_t);

Modified: soc2012/gmiller/locking-head/lib/libwitness/lockinfo.c
==============================================================================
--- soc2012/gmiller/locking-head/lib/libwitness/lockinfo.c	Tue Jul 31 19:17:25 2012	(r239967)
+++ soc2012/gmiller/locking-head/lib/libwitness/lockinfo.c	Tue Jul 31 19:55:16 2012	(r239968)
@@ -184,6 +184,18 @@
 
 		if (node->_pvt->last_record != NULL) {
 			node->lock = node->_pvt->last_record->lock;
+			if (node->_pvt->last_record->child != NULL) {
+				node->child =
+				    node->_pvt->last_record->child->lock;
+			} else {
+				node->child = NULL;
+			}
+			if (node->_pvt->last_record->sibling != NULL) {
+				node->sibling =
+				    node->_pvt->last_record->sibling->lock;
+			} else {
+				node->sibling = NULL;
+			}
 
 			return (1);
 		}


More information about the svn-soc-all mailing list