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

r6329 - in glibc-package/trunk/debian: . patches patches/hurd-i386



Author: sthibault
Date: 2014-11-07 14:21:13 +0000 (Fri, 07 Nov 2014)
New Revision: 6329

Added:
   glibc-package/trunk/debian/patches/hurd-i386/libpthread_spin-lock.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
patches/hurd-i386/libpthread_spin-lock.diff: New patch to fix spin-lock.h inclusion order.


Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2014-11-06 20:56:08 UTC (rev 6328)
+++ glibc-package/trunk/debian/changelog	2014-11-07 14:21:13 UTC (rev 6329)
@@ -1,3 +1,11 @@
+glibc (2.19-14) UNRELEASED; urgency=medium
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/libpthread_spin-lock.diff: New patch to fix spin-lock.h
+    inclusion order.
+
+ -- Samuel Thibault <sthibault@debian.org>  Fri, 07 Nov 2014 13:48:08 +0000
+
 glibc (2.19-13) unstable; urgency=medium
 
   [ Aurelien Jarno ]

Added: glibc-package/trunk/debian/patches/hurd-i386/libpthread_spin-lock.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/libpthread_spin-lock.diff	                        (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/libpthread_spin-lock.diff	2014-11-07 14:21:13 UTC (rev 6329)
@@ -0,0 +1,299 @@
+Move libpthread/sysdeps/i386/bits/spin-lock{,-inline}.h into
+libpthread/sysdeps/mach/i386/bits, otherwise the mach-generic versions will
+get included instead of the i386 generic versions, due to the glibc include
+ordering, which is different from the hurd tree include ordering.
+
+Index: glibc-2.19/libpthread/sysdeps/i386/bits/spin-lock-inline.h
+===================================================================
+--- glibc-2.19.orig/libpthread/sysdeps/i386/bits/spin-lock-inline.h
++++ /dev/null
+@@ -1,98 +0,0 @@
+-/* Machine-specific definitions for spin locks.  i386 version.
+-   Copyright (C) 2000, 2005, 2008, 2009 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 Library General Public License as
+-   published by the Free Software Foundation; either version 2 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
+-   Library General Public License for more details.
+-
+-   You should have received a copy of the GNU Library General Public
+-   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+-   Boston, MA 02111-1307, USA.  */
+-
+-/*
+- * Never include this file directly; use <pthread.h> or <cthreads.h> instead.
+- */
+-
+-#ifndef _BITS_SPIN_LOCK_INLINE_H
+-#define _BITS_SPIN_LOCK_INLINE_H	1
+-
+-#include <features.h>
+-#include <bits/spin-lock.h>
+-
+-__BEGIN_DECLS
+-
+-#if defined __USE_EXTERN_INLINES || defined _FORCE_INLINES
+-
+-# ifndef __EBUSY
+-#  include <errno.h>
+-#  define __EBUSY EBUSY
+-# endif
+-
+-# ifndef __PT_SPIN_INLINE
+-#  define __PT_SPIN_INLINE __extern_inline
+-# endif
+-
+-__PT_SPIN_INLINE int __pthread_spin_destroy (__pthread_spinlock_t *__lock);
+-
+-__PT_SPIN_INLINE int
+-__pthread_spin_destroy (__pthread_spinlock_t *__lock)
+-{
+-  return 0;
+-}
+-
+-__PT_SPIN_INLINE int __pthread_spin_init (__pthread_spinlock_t *__lock,
+-					  int __pshared);
+-
+-__PT_SPIN_INLINE int
+-__pthread_spin_init (__pthread_spinlock_t *__lock, int __pshared)
+-{
+-  *__lock = __PTHREAD_SPIN_LOCK_INITIALIZER;
+-  return 0;
+-}
+-
+-__PT_SPIN_INLINE int __pthread_spin_trylock (__pthread_spinlock_t *__lock);
+-
+-__PT_SPIN_INLINE int
+-__pthread_spin_trylock (__pthread_spinlock_t *__lock)
+-{
+-  int __locked;
+-  __asm__ __volatile ("xchgl %0, %1"
+-		      : "=&r" (__locked), "=m" (*__lock) : "0" (1) : "memory");
+-  return __locked ? __EBUSY : 0;
+-}
+-
+-__extern_inline int __pthread_spin_lock (__pthread_spinlock_t *__lock);
+-extern int _pthread_spin_lock (__pthread_spinlock_t *__lock);
+-
+-__extern_inline int
+-__pthread_spin_lock (__pthread_spinlock_t *__lock)
+-{
+-  if (__pthread_spin_trylock (__lock))
+-    return _pthread_spin_lock (__lock);
+-  return 0;
+-}
+-
+-__PT_SPIN_INLINE int __pthread_spin_unlock (__pthread_spinlock_t *__lock);
+-
+-__PT_SPIN_INLINE int
+-__pthread_spin_unlock (__pthread_spinlock_t *__lock)
+-{
+-  int __unlocked;
+-  __asm__ __volatile ("xchgl %0, %1"
+-		      : "=&r" (__unlocked), "=m" (*__lock) : "0" (0) : "memory");
+-  return 0;
+-}
+-
+-#endif /* Use extern inlines or force inlines.  */
+-
+-__END_DECLS
+-
+-#endif /* bits/spin-lock.h */
+Index: glibc-2.19/libpthread/sysdeps/i386/bits/spin-lock.h
+===================================================================
+--- glibc-2.19.orig/libpthread/sysdeps/i386/bits/spin-lock.h
++++ /dev/null
+@@ -1,39 +0,0 @@
+-/* Machine-specific definitions for spin locks.  i386 version.
+-   Copyright (C) 2000, 2005, 2008, 2009 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 Library General Public License as
+-   published by the Free Software Foundation; either version 2 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
+-   Library General Public License for more details.
+-
+-   You should have received a copy of the GNU Library General Public
+-   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+-   Boston, MA 02111-1307, USA.  */
+-
+-/*
+- * Never include this file directly; use <pthread.h> or <cthreads.h> instead.
+- */
+-
+-#ifndef _BITS_SPIN_LOCK_H
+-#define _BITS_SPIN_LOCK_H	1
+-
+-#include <features.h>
+-
+-__BEGIN_DECLS
+-
+-/* The type of a spin lock object.  */
+-typedef __volatile int __pthread_spinlock_t;
+-
+-/* Initializer for a spin lock object.  */
+-# define __PTHREAD_SPIN_LOCK_INITIALIZER ((__pthread_spinlock_t) 0)
+-
+-__END_DECLS
+-
+-#endif /* bits/spin-lock.h */
+Index: glibc-2.19/libpthread/sysdeps/mach/i386/bits/spin-lock-inline.h
+===================================================================
+--- /dev/null
++++ glibc-2.19/libpthread/sysdeps/mach/i386/bits/spin-lock-inline.h
+@@ -0,0 +1,98 @@
++/* Machine-specific definitions for spin locks.  i386 version.
++   Copyright (C) 2000, 2005, 2008, 2009 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 Library General Public License as
++   published by the Free Software Foundation; either version 2 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
++   Library General Public License for more details.
++
++   You should have received a copy of the GNU Library General Public
++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++   Boston, MA 02111-1307, USA.  */
++
++/*
++ * Never include this file directly; use <pthread.h> or <cthreads.h> instead.
++ */
++
++#ifndef _BITS_SPIN_LOCK_INLINE_H
++#define _BITS_SPIN_LOCK_INLINE_H	1
++
++#include <features.h>
++#include <bits/spin-lock.h>
++
++__BEGIN_DECLS
++
++#if defined __USE_EXTERN_INLINES || defined _FORCE_INLINES
++
++# ifndef __EBUSY
++#  include <errno.h>
++#  define __EBUSY EBUSY
++# endif
++
++# ifndef __PT_SPIN_INLINE
++#  define __PT_SPIN_INLINE __extern_inline
++# endif
++
++__PT_SPIN_INLINE int __pthread_spin_destroy (__pthread_spinlock_t *__lock);
++
++__PT_SPIN_INLINE int
++__pthread_spin_destroy (__pthread_spinlock_t *__lock)
++{
++  return 0;
++}
++
++__PT_SPIN_INLINE int __pthread_spin_init (__pthread_spinlock_t *__lock,
++					  int __pshared);
++
++__PT_SPIN_INLINE int
++__pthread_spin_init (__pthread_spinlock_t *__lock, int __pshared)
++{
++  *__lock = __PTHREAD_SPIN_LOCK_INITIALIZER;
++  return 0;
++}
++
++__PT_SPIN_INLINE int __pthread_spin_trylock (__pthread_spinlock_t *__lock);
++
++__PT_SPIN_INLINE int
++__pthread_spin_trylock (__pthread_spinlock_t *__lock)
++{
++  int __locked;
++  __asm__ __volatile ("xchgl %0, %1"
++		      : "=&r" (__locked), "=m" (*__lock) : "0" (1) : "memory");
++  return __locked ? __EBUSY : 0;
++}
++
++__extern_inline int __pthread_spin_lock (__pthread_spinlock_t *__lock);
++extern int _pthread_spin_lock (__pthread_spinlock_t *__lock);
++
++__extern_inline int
++__pthread_spin_lock (__pthread_spinlock_t *__lock)
++{
++  if (__pthread_spin_trylock (__lock))
++    return _pthread_spin_lock (__lock);
++  return 0;
++}
++
++__PT_SPIN_INLINE int __pthread_spin_unlock (__pthread_spinlock_t *__lock);
++
++__PT_SPIN_INLINE int
++__pthread_spin_unlock (__pthread_spinlock_t *__lock)
++{
++  int __unlocked;
++  __asm__ __volatile ("xchgl %0, %1"
++		      : "=&r" (__unlocked), "=m" (*__lock) : "0" (0) : "memory");
++  return 0;
++}
++
++#endif /* Use extern inlines or force inlines.  */
++
++__END_DECLS
++
++#endif /* bits/spin-lock.h */
+Index: glibc-2.19/libpthread/sysdeps/mach/i386/bits/spin-lock.h
+===================================================================
+--- /dev/null
++++ glibc-2.19/libpthread/sysdeps/mach/i386/bits/spin-lock.h
+@@ -0,0 +1,39 @@
++/* Machine-specific definitions for spin locks.  i386 version.
++   Copyright (C) 2000, 2005, 2008, 2009 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 Library General Public License as
++   published by the Free Software Foundation; either version 2 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
++   Library General Public License for more details.
++
++   You should have received a copy of the GNU Library General Public
++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++   Boston, MA 02111-1307, USA.  */
++
++/*
++ * Never include this file directly; use <pthread.h> or <cthreads.h> instead.
++ */
++
++#ifndef _BITS_SPIN_LOCK_H
++#define _BITS_SPIN_LOCK_H	1
++
++#include <features.h>
++
++__BEGIN_DECLS
++
++/* The type of a spin lock object.  */
++typedef __volatile int __pthread_spinlock_t;
++
++/* Initializer for a spin lock object.  */
++# define __PTHREAD_SPIN_LOCK_INITIALIZER ((__pthread_spinlock_t) 0)
++
++__END_DECLS
++
++#endif /* bits/spin-lock.h */

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series	2014-11-06 20:56:08 UTC (rev 6328)
+++ glibc-package/trunk/debian/patches/series	2014-11-07 14:21:13 UTC (rev 6329)
@@ -111,6 +111,7 @@
 hurd-i386/tg-hurdsig-fixes-2.diff
 hurd-i386/tg-hooks.diff
 hurd-i386/cvs-libpthread.diff
+hurd-i386/libpthread_spin-lock.diff
 hurd-i386/tg-aio_misc.diff
 hurd-i386/libpthread_build.diff
 hurd-i386/libpthread_sigmask.diff


Reply to: