DragonFly-2.3.1.552.g32816 master lib/libthread_xu/thread thr_sem.c

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Jun 29 15:44:08 PDT 2009


commit 328161bd22eeafdb109345d38e56c3e8948a7ad6
Author: Matthew Dillon <dillon at 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 at 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





More information about the Commits mailing list