DragonFly commits List (threaded) for 2009-06
DragonFly BSD
DragonFly commits List (threaded) for 2009-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 29 Jun 2009 15:42:08 -0700 (PDT)

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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]