Stop using eventhandler to invoke umtx_exec hook.
There is no point in dynamic registration, umtx hook is there always. Reviewed by: mjg Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D27303
This commit is contained in:
parent
b3718e2d7e
commit
74a093eb98
@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/sysent.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/umtx.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/wait.h>
|
||||
#ifdef KTRACE
|
||||
@ -1047,8 +1048,8 @@ exec_new_vmspace(struct image_params *imgp, struct sysentvec *sv)
|
||||
imgp->sysent = sv;
|
||||
|
||||
sigfastblock_clear(td);
|
||||
umtx_exec(p);
|
||||
|
||||
/* May be called with Giant held */
|
||||
EVENTHANDLER_DIRECT_INVOKE(process_exec, p, imgp);
|
||||
|
||||
/*
|
||||
|
@ -446,8 +446,6 @@ umtxq_sysinit(void *arg __unused)
|
||||
umtx_init_profiling();
|
||||
#endif
|
||||
mtx_init(&umtx_lock, "umtx lock", NULL, MTX_DEF);
|
||||
EVENTHANDLER_REGISTER(process_exec, umtx_exec_hook, NULL,
|
||||
EVENTHANDLER_PRI_ANY);
|
||||
umtx_shm_init();
|
||||
}
|
||||
|
||||
@ -4356,12 +4354,11 @@ umtx_thread_alloc(struct thread *td)
|
||||
* exec() hook.
|
||||
*
|
||||
* Clear robust lists for all process' threads, not delaying the
|
||||
* cleanup to thread_exit hook, since the relevant address space is
|
||||
* cleanup to thread exit, since the relevant address space is
|
||||
* destroyed right now.
|
||||
*/
|
||||
static void
|
||||
umtx_exec_hook(void *arg __unused, struct proc *p,
|
||||
struct image_params *imgp __unused)
|
||||
void
|
||||
umtx_exec(struct proc *p)
|
||||
{
|
||||
struct thread *td;
|
||||
|
||||
@ -4383,7 +4380,7 @@ umtx_exec_hook(void *arg __unused, struct proc *p,
|
||||
}
|
||||
|
||||
/*
|
||||
* thread_exit() hook.
|
||||
* thread exit hook.
|
||||
*/
|
||||
void
|
||||
umtx_thread_exit(struct thread *td)
|
||||
|
@ -188,6 +188,7 @@ umtx_key_match(const struct umtx_key *k1, const struct umtx_key *k2)
|
||||
}
|
||||
|
||||
int umtx_copyin_timeout(const void *, struct timespec *);
|
||||
void umtx_exec(struct proc *p);
|
||||
int umtx_key_get(const void *, int, int, struct umtx_key *);
|
||||
void umtx_key_release(struct umtx_key *);
|
||||
struct umtx_q *umtxq_alloc(void);
|
||||
|
Loading…
Reference in New Issue
Block a user