看板 DFBSD_commit 關於我們 聯絡資訊
commit 328161bd22eeafdb109345d38e56c3e8948a7ad6 Author: Matthew Dillon <dillon@apollo.backplane.com> Date: Mon Jun 29 15:38:53 2009 -0700 libthread_xu - implement pshared for sem_init Implement the pshared flag, creating a semaphore in shared memory that works across fork(). No additional kernel support is needed, our umtx* system calls work on the underlying physical memory and thus work just fine with shared memory. sem_alloc() uses mmap() to allocate a page of shared memory. Currently sem_destroy() does not recover the allocated memory for shared semaphores as it is unclear how one is supposed to do so in a fork()ed environment. Requested-by: Hasso Tepper <hasso@estpak.ee> Summary of changes: lib/libthread_xu/thread/thr_sem.c | 61 +++++++++++++++++++++++++----------- 1 files changed, 42 insertions(+), 19 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/328161bd22eeafdb109345d38e56c3e8948a7ad6 -- DragonFly BSD source repository