[2/3] Add adaptive elision to rwlocks v2
diff mbox

Message ID 20140613225920.GD5714@two.firstfloor.org
State New
Headers show

Commit Message

Andi Kleen June 13, 2014, 10:59 p.m. UTC
On Sat, Jun 14, 2014 at 12:46:33AM +0200, Andi Kleen wrote:
> On Fri, Jun 13, 2014 at 11:17:32PM +0200, Andreas Schwab wrote:
> > Andi Kleen <andi@firstfloor.org> writes:
> > 
> > > @@ -22,6 +22,7 @@
> > >  #include <pthread.h>
> > >  #include <pthreadP.h>
> > >  #include <stap-probe.h>
> > > +#include <elide.h>
> > 
> > pthread_rwlock_rdlock.c:25:19: fatal error: elide.h: No such file or directory
> >  #include <elide.h>
> 
> On what platform is that? Perhaps the fallback file got lost.

This patch should fix it.

Ok to commit?


Author: Andi Kleen <ak@linux.intel.com>
Date:   Fri Jun 13 15:50:45 2014 -0700

    Add fallback file for elide.h
    
    Add the missing fallback file for elide.h to fix non x86 builds.
    Sorry about that. This is just a noop macro file that makes
    all elision code to be optimized out.
    
    2014-06-13 Andi Kleen  <ak@linux.intel.com>
    
    	* sysdeps/generic/elide.h
    	(ELIDE_LOCK, ELIDE_TRYLOCK, ELIDE_UNLOCK): Add fallback macros.

Comments

Andreas Schwab June 14, 2014, 7:05 a.m. UTC | #1
Andi Kleen <andi@firstfloor.org> writes:

>     2014-06-13 Andi Kleen  <ak@linux.intel.com>
>     
>     	* sysdeps/generic/elide.h
>     	(ELIDE_LOCK, ELIDE_TRYLOCK, ELIDE_UNLOCK): Add fallback macros.

This is a new file, so write that.

Andreas.
Andi Kleen June 14, 2014, 4:28 p.m. UTC | #2
On Sat, Jun 14, 2014 at 09:05:43AM +0200, Andreas Schwab wrote:
> Andi Kleen <andi@firstfloor.org> writes:
> 
> >     2014-06-13 Andi Kleen  <ak@linux.intel.com>
> >     
> >     	* sysdeps/generic/elide.h
> >     	(ELIDE_LOCK, ELIDE_TRYLOCK, ELIDE_UNLOCK): Add fallback macros.
> 
> This is a new file, so write that.

Thanks. I pushed the commit now with this change, to unbreak everyone's
build.
-Andi

Patch
diff mbox

diff --git a/sysdeps/generic/elide.h b/sysdeps/generic/elide.h
new file mode 100644
index 0000000..180e632
--- /dev/null
+++ b/sysdeps/generic/elide.h
@@ -0,0 +1,25 @@ 
+/* elide.h: Fallback noop lock elision support.
+   Copyright (C) 2014 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+#ifndef ELIDE_H
+#define ELIDE_H 1
+
+#define ELIDE_LOCK(adapt_count, is_lock_free) 0
+#define ELIDE_TRYLOCK(adapt_count, is_lock_free, write) 0
+#define ELIDE_UNLOCK(is_lock_free) 0
+
+#endif