mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-29 06:42:45 +00:00
Enable mutex inheritance code in mutex_fork, I forgot to turn on it.
while here, add some comments about process shared mutex.
This commit is contained in:
parent
e5bc0aa3c3
commit
add2da0db1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154350
@ -261,12 +261,22 @@ _mutex_reinit(pthread_mutex_t *mutex)
|
||||
void
|
||||
_mutex_fork(struct pthread *curthread)
|
||||
{
|
||||
#if 0
|
||||
TAILQ_INIT(&curthread->mutexq);
|
||||
TAILQ_INIT(&curthread->pri_mutexq);
|
||||
curthread->priority_mutex_count = 0;
|
||||
#if 0
|
||||
#else
|
||||
struct pthread_mutex *m;
|
||||
|
||||
/*
|
||||
* Fix mutex ownership for child process.
|
||||
* note that process shared mutex should not
|
||||
* be inherited because owner is forking thread
|
||||
* which is in parent process, they should be
|
||||
* removed from the owned mutex list, current
|
||||
* process shared mutex is not supported, so I
|
||||
* am not worried.
|
||||
*/
|
||||
TAILQ_FOREACH(m, &curthread->mutexq, m_qe) {
|
||||
m->m_lock = (umtx_t)curthread->tid;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user