Move the process_fork event out from under Giant. This one is easy,
since there are no consumers in the tree. Document this.
This commit is contained in:
parent
066f7934c6
commit
963c36c195
@ -689,14 +689,16 @@ fork1(td, flags, pages, procp)
|
||||
cnt.v_rforkpages += p2->p_vmspace->vm_dsize +
|
||||
p2->p_vmspace->vm_ssize;
|
||||
}
|
||||
mtx_unlock(&Giant);
|
||||
|
||||
/*
|
||||
* Both processes are set up, now check if any loadable modules want
|
||||
* to adjust anything.
|
||||
* What if they have an error? XXX
|
||||
*
|
||||
* Handlers must be MPSAFE, or aquire Giant themselves if not.
|
||||
*/
|
||||
EVENTHANDLER_INVOKE(process_fork, p1, p2, flags);
|
||||
mtx_unlock(&Giant);
|
||||
|
||||
/*
|
||||
* Set the child start time and mark the process as being complete.
|
||||
|
@ -156,7 +156,11 @@ typedef void (*vm_lowmem_handler_t)(void *, int);
|
||||
#define LOWMEM_PRI_DEFAULT EVENTHANDLER_PRI_FIRST
|
||||
EVENTHANDLER_DECLARE(vm_lowmem, vm_lowmem_handler_t);
|
||||
|
||||
/* Process events */
|
||||
/*
|
||||
* Process events
|
||||
* process_fork handlers are called without Giant.
|
||||
* exit/exec handlers are called with Giant.
|
||||
*/
|
||||
struct proc;
|
||||
|
||||
typedef void (*exitlist_fn)(void *, struct proc *);
|
||||
|
Loading…
Reference in New Issue
Block a user