H A D | uipc_sem.c | 590f242c Fri Feb 25 19:10:51 GMT 2005 Robert Watson <rwatson@FreeBSD.org> Add an exit hook, sem_forkhook(), which walks the list of POSIX semaphores owned by a process when it forks, and creates a matching set of references for the child process, as prescribed by POSIX.
In order to avoid races with other threads in the parent process during fork(), it is necessary to allocate a temporary reference list while holding the sem_lock, then transfer those references to the new process once the sem_lock is released. The implementation is inefficient but appears functional; in order to improve the efficiency, it will be necessary to modify the existing structures and logic, which generally rely on O(n) operations over the global set of semaphores. 590f242c Fri Feb 25 19:10:51 GMT 2005 Robert Watson <rwatson@FreeBSD.org> Add an exit hook, sem_forkhook(), which walks the list of POSIX semaphores owned by a process when it forks, and creates a matching set of references for the child process, as prescribed by POSIX.
In order to avoid races with other threads in the parent process during fork(), it is necessary to allocate a temporary reference list while holding the sem_lock, then transfer those references to the new process once the sem_lock is released. The implementation is inefficient but appears functional; in order to improve the efficiency, it will be necessary to modify the existing structures and logic, which generally rely on O(n) operations over the global set of semaphores. 590f242c Fri Feb 25 19:10:51 GMT 2005 Robert Watson <rwatson@FreeBSD.org> Add an exit hook, sem_forkhook(), which walks the list of POSIX semaphores owned by a process when it forks, and creates a matching set of references for the child process, as prescribed by POSIX.
In order to avoid races with other threads in the parent process during fork(), it is necessary to allocate a temporary reference list while holding the sem_lock, then transfer those references to the new process once the sem_lock is released. The implementation is inefficient but appears functional; in order to improve the efficiency, it will be necessary to modify the existing structures and logic, which generally rely on O(n) operations over the global set of semaphores. 590f242c Fri Feb 25 19:10:51 GMT 2005 Robert Watson <rwatson@FreeBSD.org> Add an exit hook, sem_forkhook(), which walks the list of POSIX semaphores owned by a process when it forks, and creates a matching set of references for the child process, as prescribed by POSIX.
In order to avoid races with other threads in the parent process during fork(), it is necessary to allocate a temporary reference list while holding the sem_lock, then transfer those references to the new process once the sem_lock is released. The implementation is inefficient but appears functional; in order to improve the efficiency, it will be necessary to modify the existing structures and logic, which generally rely on O(n) operations over the global set of semaphores. 590f242c Fri Feb 25 19:10:51 GMT 2005 Robert Watson <rwatson@FreeBSD.org> Add an exit hook, sem_forkhook(), which walks the list of POSIX semaphores owned by a process when it forks, and creates a matching set of references for the child process, as prescribed by POSIX.
In order to avoid races with other threads in the parent process during fork(), it is necessary to allocate a temporary reference list while holding the sem_lock, then transfer those references to the new process once the sem_lock is released. The implementation is inefficient but appears functional; in order to improve the efficiency, it will be necessary to modify the existing structures and logic, which generally rely on O(n) operations over the global set of semaphores. 590f242c Fri Feb 25 19:10:51 GMT 2005 Robert Watson <rwatson@FreeBSD.org> Add an exit hook, sem_forkhook(), which walks the list of POSIX semaphores owned by a process when it forks, and creates a matching set of references for the child process, as prescribed by POSIX.
In order to avoid races with other threads in the parent process during fork(), it is necessary to allocate a temporary reference list while holding the sem_lock, then transfer those references to the new process once the sem_lock is released. The implementation is inefficient but appears functional; in order to improve the efficiency, it will be necessary to modify the existing structures and logic, which generally rely on O(n) operations over the global set of semaphores. 590f242c Fri Feb 25 19:10:51 GMT 2005 Robert Watson <rwatson@FreeBSD.org> Add an exit hook, sem_forkhook(), which walks the list of POSIX semaphores owned by a process when it forks, and creates a matching set of references for the child process, as prescribed by POSIX.
In order to avoid races with other threads in the parent process during fork(), it is necessary to allocate a temporary reference list while holding the sem_lock, then transfer those references to the new process once the sem_lock is released. The implementation is inefficient but appears functional; in order to improve the efficiency, it will be necessary to modify the existing structures and logic, which generally rely on O(n) operations over the global set of semaphores. 590f242c Fri Feb 25 19:10:51 GMT 2005 Robert Watson <rwatson@FreeBSD.org> Add an exit hook, sem_forkhook(), which walks the list of POSIX semaphores owned by a process when it forks, and creates a matching set of references for the child process, as prescribed by POSIX.
In order to avoid races with other threads in the parent process during fork(), it is necessary to allocate a temporary reference list while holding the sem_lock, then transfer those references to the new process once the sem_lock is released. The implementation is inefficient but appears functional; in order to improve the efficiency, it will be necessary to modify the existing structures and logic, which generally rely on O(n) operations over the global set of semaphores.
|