Delete struct proc p_mtx lock

Usage of this lock is highly dangerous since agents may assume that this
lock is actually used for process management.  There is only one process
in RTEMS.
This commit is contained in:
Sebastian Huber
2013-10-10 14:33:05 +02:00
parent 0bcf34156b
commit 3842b81723
4 changed files with 6 additions and 5 deletions

View File

@@ -662,9 +662,7 @@ kern_sendit(td, s, mp, flags, control, segflg)
/* Generation of SIGPIPE can be controlled per socket */
if (error == EPIPE && !(so->so_options & SO_NOSIGPIPE) &&
!(flags & MSG_NOSIGNAL)) {
PROC_LOCK(td->td_proc);
killinfo(td->td_proc->p_pid, SIGPIPE, NULL);
PROC_UNLOCK(td->td_proc);
killinfo(td->td_proc->p_pid, SIGPIPE, NULL);
}
}
if (error == 0)

View File

@@ -216,7 +216,6 @@ rtems_bsd_threads_init(void *arg __unused)
FIXME_ucred.cr_ngroups = 1; /* group 0 */
FIXME_proc.p_ucred = crhold(&FIXME_ucred);
mtx_init(&FIXME_proc.p_mtx, "process lock", NULL, MTX_DEF | MTX_DUPOK);
FIXME_proc.p_pid = getpid();
FIXME_proc.p_fibnum = 0;
}