Hello, Agustina Arzille, on Thu 05 May 2016 23:02:35 -0300, wrote: > Here's the first of the patches to replace spin-locks in glibc with locks > based > on gnumach's gsync.
Cool :) > I ran into a lot of troubles to compile glibc, mostly because the filesystem > kept freezing and / or crashing. That's worrying, and surprising to me since buildds keep building stuff for days without too many issues. How are you running your Hurd system? I usually run with kvm -drive cache=writeback > I had to modify several makefiles for a few libs because the new locks use > RPCs > that are implemented in libmachuser. This is strictly for gnumach, obviously, > so it should be probably be edited out for other platforms (Linux), or be > included as a patch in Debian's package. Any help with this will be greatly > appreciated :) See how this is done in sysdeps/mach/hurd/Makefile for instance: ifeq ($(subdirs),sunrpc) sysdep_headers += nfs/nfs.h endif You can add similar lines in sysdeps/mach/Makefile (since that's Mach-specific but not Hurd-specific) to add the -lmachuser flag to LDLIBS-crypt.so etc. > +#ifndef __MACH_LOWLEVELLOCK_H__ > +#define __MACH_LOWLEVELLOCK_H__ 1 > + > +#include <mach/gnumach.h> > +#include <atomic.h> > + > +/* Gsync flags. */ > +#define GSYNC_SHARED 0x01 > +#define GSYNC_QUAD 0x02 > +#define GSYNC_TIMED 0x04 > +#define GSYNC_BROADCAST 0x08 > +#define GSYNC_MUTATE 0x10 Don't we install a mach header to define these? If not yet, we really should. > diff --git a/mach/spin-lock.h b/mach/spin-lock.h > index fc21b1e..535191a 100644 > --- a/mach/spin-lock.h > +++ b/mach/spin-lock.h > @@ -1,5 +1,5 @@ > /* Definitions of user-visible names for spin locks. > - Copyright (C) 1994-2014 Free Software Foundation, Inc. > + Copyright (C) 1994-2016 Free Software Foundation, Inc. > This file is part of the GNU C Library. > > The GNU C Library is free software; you can redistribute it and/or Take care, this wasn't actually modified :) That's it for now with a quick review, it looks good and not intrusive overall. I guess you have tested it ? Samuel