Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Feb 2005 11:05:12 GMT
From:      David Xu <davidxu@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 71049 for review
Message-ID:  <200502141105.j1EB5C9h099867@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=71049

Change 71049 by davidxu@davidxu_tiger on 2005/02/14 11:04:56

	Child process does not own mutexes forked from parent, considering
	a shared mutex, you can not unlocked it, it is owned by parent process!

Affected files ...

.. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_mutex.c#17 edit

Differences ...

==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_mutex.c#17 (text+ko) ====

@@ -260,6 +260,10 @@
 void
 _mutex_fork(struct pthread *curthread)
 {
+	TAILQ_INIT(&curthread->mutexq);
+	TAILQ_INIT(&curthread->pri_mutexq);
+	curthread->priority_mutex_count = 0;
+#if 0
 	struct pthread_mutex *m;
 
 	TAILQ_FOREACH(m, &curthread->mutexq, m_qe) {
@@ -272,6 +276,7 @@
 		_thr_umtx_init(&m->m_lock);
 		TAILQ_INIT(&m->m_queue);
 	}
+#endif
 }
 
 int



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