PERFORCE change 71049 for review
David Xu
davidxu at FreeBSD.org
Mon Feb 14 03:05:14 PST 2005
http://perforce.freebsd.org/chv.cgi?CH=71049
Change 71049 by davidxu at 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
More information about the p4-projects
mailing list