mirror of
https://github.com/opnsense/src.git
synced 2026-04-15 14:29:58 -04:00
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
57848b8f65
commit
8a412f314e
2 changed files with 8 additions and 2 deletions
|
|
@ -689,14 +689,16 @@ again:
|
|||
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 a new issue