summaryrefslogtreecommitdiff
path: root/hurd/sysvshm.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-08-23 20:05:04 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-08-23 20:06:06 +0200
commitf0df4a42a77d15d4edfc95bb45035e81cb1bdbaa (patch)
tree88b352f9beb446566e08b531accd7f798205d314 /hurd/sysvshm.c
parentbde3bfa9f8d1b1c183e0ca66703b2fa3215eec21 (diff)
Introduce gsync-based locks to glibc.
From: Agustina Arzille <avarzille@riseup.net> * hurd/Makefile: Add hurdlock. * hurd/Versions: Added new entry to export the above interface. * hurd/hurdlock.c: New file. * hurd/hurdlock.h: New file. * hurd/hurdpid.c: Include <lowlevellock.h> (_S_msg_proc_newids): Use lll_wait to synchronize. * hurd/hurdsig.c: (reauth_proc): Use __mutex_lock and __mutex_unlock. * hurd/setauth.c: Include <hurdlock.h>, use integer for synchronization. * hurd/sysvshm.c: Include <hurdlock.h>, use integer for synchronization. * mach/Makefile: Remove unneeded file * mach/lock-intern.h: Use lll to implement spinlocks. * mach/lowlevellock.h: New file * mach/mutex-init.c: Rewrite mutex initialization. * sysdeps/mach/Makefile: Add libmachuser as dependencies for some libs. * sysdeps/mach/bits/libc-lock.h: Reimplemented libc internal locks with lll, cleanup routines now use gcc's cleanup attribute * sysdeps/mach/hurd/bits/errno.h: New errno values. * sysdeps/mach/hurd/bits/libc-lock.h: Removed file. * sysdeps/mach/hurd/malloc-machine.h: Reimplemented malloc locks. * sysdeps/mach/hurd/setpgid.c: (setpgid): Use gsync for synchronization. * sysdeps/mach/hurd/setsid.c: (setsid): Likewise.
Diffstat (limited to 'hurd/sysvshm.c')
-rw-r--r--hurd/sysvshm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hurd/sysvshm.c b/hurd/sysvshm.c
index 5d538a6373..e049345135 100644
--- a/hurd/sysvshm.c
+++ b/hurd/sysvshm.c
@@ -26,6 +26,7 @@
#include <dirent.h>
#include <sys/stat.h>
#include <sys/shm.h>
+#include <hurdlock.h>
/* Description of an shm attachment. */
@@ -45,7 +46,7 @@ struct sysvshm_attach
static struct sysvshm_attach *sysvshm_list;
/* A lock to protect the linked list of shared memory attachments. */
-static struct mutex sysvshm_lock = MUTEX_INITIALIZER;
+static unsigned int sysvshm_lock = LLL_INITIALIZER;
/* Adds a segment attachment. */