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

Bug#394021: jack-audio-connection-kit: and here is the patch



Package: jack-audio-connection-kit
Followup-For: Bug #394021

sorry

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: ia64
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12
Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1)
diff -uN jack-audio-connection-kit-0.101.1/config/cpu/ia64/atomicity.h /tmp/jack-audio-connection-kit-0.101.1-new/build-tree/jack-audio-connection-kit-0.101.1/config/cpu/ia64/atomicity.h
--- jack-audio-connection-kit-0.101.1/config/cpu/ia64/atomicity.h	2004-03-26 06:31:43.000000000 +1100
+++ /tmp/jack-audio-connection-kit-0.101.1-new/build-tree/jack-audio-connection-kit-0.101.1/config/cpu/ia64/atomicity.h	2006-10-19 13:20:32.000000000 +1000
@@ -1,51 +1,20 @@
-// Low-level functions for atomic operations: IA64 version  -*- C++ -*-
+/*
+ * IA64 atomicity functions for jack.
+ * Mostly clagged from glibc by Ian Wienand <ianw@gelato.unsw.edu.au>
+ */
 
-// Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This 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 General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
+#ifndef _IA64_ATOMICITY_H
+#define _IA64_ATOMICITY_H
 
-#ifndef _GLIBCXX_ATOMICITY_H
-#define _GLIBCXX_ATOMICITY_H       1
-
-#include <sysdeps/ia64intrin.h>
+#include <ia64intrin.h>
 
 typedef int _Atomic_word;
 
-static inline _Atomic_word 
-__attribute__ ((__unused__))
-__exchange_and_add(volatile _Atomic_word* __mem, int __val)
-{
-  return __sync_fetch_and_add(__mem, __val);
-}
-
-static inline void
-__attribute__ ((__unused__))
-__atomic_add(volatile _Atomic_word* __mem, int __val)
-{
-  __sync_fetch_and_add(__mem, __val);
-}
+#define __exchange_and_add(mem, value) \
+  ({ __typeof (*mem) __result;                                                \
+     __result = __sync_fetch_and_add ((mem), (int) (value));                  \
+     __result; })
+
+# define __atomic_add(mem, value) (void) __exchange_and_add ((mem), (value))
 
-#endif /* atomicity.h */
+#endif
Common subdirectories: jack-audio-connection-kit-0.101.1/config/cpu/ia64/CVS and /tmp/jack-audio-connection-kit-0.101.1-new/build-tree/jack-audio-connection-kit-0.101.1/config/cpu/ia64/CVS
diff -uN jack-audio-connection-kit-0.101.1/config/cpu/ia64/cycles.h /tmp/jack-audio-connection-kit-0.101.1-new/build-tree/jack-audio-connection-kit-0.101.1/config/cpu/ia64/cycles.h
--- jack-audio-connection-kit-0.101.1/config/cpu/ia64/cycles.h	2004-03-26 06:31:44.000000000 +1100
+++ /tmp/jack-audio-connection-kit-0.101.1-new/build-tree/jack-audio-connection-kit-0.101.1/config/cpu/ia64/cycles.h	1970-01-01 10:00:00.000000000 +1000
@@ -1,36 +0,0 @@
-/*
-    Copyright (C) 2001 Paul Davis
-    Code derived from various headers from the Linux kernel
-    
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program 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 General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-    $Id: cycles.h,v 1.2 2004/03/25 19:31:44 joq Exp $
-*/
-
-#ifndef __jack_cycles_h__
-#define __jack_cycles_h__
-
-/* ia64 */
-
-typedef unsigned long cycles_t;
-static inline cycles_t
-get_cycles (void)
-{
-	cycles_t ret;
-	__asm__ __volatile__ ("mov %0=ar.itc" : "=r"(ret));
-	return ret;
-}
-
-#endif /* __jack_cycles_h__ */
diff -uN jack-audio-connection-kit-0.101.1/config/cpu/ia64/ia64intrin.h /tmp/jack-audio-connection-kit-0.101.1-new/build-tree/jack-audio-connection-kit-0.101.1/config/cpu/ia64/ia64intrin.h
--- jack-audio-connection-kit-0.101.1/config/cpu/ia64/ia64intrin.h	2004-03-26 06:31:44.000000000 +1100
+++ /tmp/jack-audio-connection-kit-0.101.1-new/build-tree/jack-audio-connection-kit-0.101.1/config/cpu/ia64/ia64intrin.h	1970-01-01 10:00:00.000000000 +1000
@@ -1,130 +0,0 @@
-#ifndef _IA64INTRIN_H_INCLUDED
-#define _IA64INTRIN_H_INCLUDED
-
-/* Actually, everything is a compiler builtin, but just so
-   there's no confusion...  */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern void __sync_synchronize (void);
-
-extern int __sync_val_compare_and_swap_si (int *, int, int);
-extern long __sync_val_compare_and_swap_di (long *, long, long);
-#define __sync_val_compare_and_swap(PTR, OLD, NEW)			\
- ((sizeof (*(PTR)) == sizeof(int))					\
-  ? (__typeof__(*(PTR)))						\
-    __sync_val_compare_and_swap_si((int *)(PTR),(int)(OLD),(int)(NEW))	\
-  : (__typeof__(*(PTR)))						\
-    __sync_val_compare_and_swap_di((long *)(PTR),(long)(OLD),(long)(NEW)))
-
-extern int __sync_bool_compare_and_swap_si (int *, int, int);
-extern int __sync_bool_compare_and_swap_di (long *, long, long);
-#define __sync_bool_compare_and_swap(PTR, OLD, NEW)			\
- ((sizeof (*(PTR)) == sizeof(int))					\
-  ? __sync_bool_compare_and_swap_si((int *)(PTR),(int)(OLD),(int)(NEW))	\
-  : __sync_bool_compare_and_swap_di((long *)(PTR),(long)(OLD),(long)(NEW)))
-
-extern void __sync_lock_release_si (int *);
-extern void __sync_lock_release_di (long *);
-#define __sync_lock_release(PTR)		\
-  ((sizeof (*(PTR)) == sizeof(int))		\
-   ? __sync_lock_release_si((int *)(PTR))	\
-   : __sync_lock_release_di((long *)(PTR)))
-
-extern int __sync_lock_test_and_set_si (int *, int);
-extern long __sync_lock_test_and_set_di (long *, long);
-#define __sync_lock_test_and_set(PTR,VAL)				\
- ((sizeof (*(PTR)) == sizeof(int))					\
-  ? (__typeof__(*(PTR))) __sync_lock_test_and_set_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_lock_test_and_set_di((long *)(PTR),(long)(VAL)))
-
-extern int __sync_fetch_and_add_si (int *, int);
-extern long __sync_fetch_and_add_di (long *, long);
-#define __sync_fetch_and_add(PTR,VAL)					\
- ((sizeof (*(PTR)) == sizeof(int))					\
-  ? (__typeof__(*(PTR))) __sync_fetch_and_add_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_fetch_and_add_di((long *)(PTR),(long)(VAL)))
-
-extern int __sync_fetch_and_sub_si (int *, int);
-extern long __sync_fetch_and_sub_di (long *, long);
-#define __sync_fetch_and_sub(PTR,VAL)					\
- ((sizeof (*(PTR)) == sizeof(int))					\
-  ? (__typeof__(*(PTR))) __sync_fetch_and_sub_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_fetch_and_sub_di((long *)(PTR),(long)(VAL)))
-
-extern int __sync_fetch_and_and_si (int *, int);
-extern long __sync_fetch_and_and_di (long *, long);
-#define __sync_fetch_and_and(PTR,VAL)					\
- ((sizeof (*(PTR)) == sizeof(int))					\
-  ? (__typeof__(*(PTR))) __sync_fetch_and_and_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_fetch_and_and_di((long *)(PTR),(long)(VAL)))
-
-extern int __sync_fetch_and_or_si (int *, int);
-extern long __sync_fetch_and_or_di (long *, long);
-#define __sync_fetch_and_or(PTR,VAL)					\
- ((sizeof (*(PTR)) == sizeof(int))					\
-  ? (__typeof__(*(PTR))) __sync_fetch_and_or_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_fetch_and_or_di((long *)(PTR),(long)(VAL)))
-
-extern int __sync_fetch_and_xor_si (int *, int);
-extern long __sync_fetch_and_xor_di (long *, long);
-#define __sync_fetch_and_xor(PTR,VAL)					\
- ((sizeof (*(PTR)) == sizeof(int))					\
-  ? (__typeof__(*(PTR))) __sync_fetch_and_xor_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_fetch_and_xor_di((long *)(PTR),(long)(VAL)))
-
-extern int __sync_fetch_and_nand_si (int *, int);
-extern long __sync_fetch_and_nand_di (long *, long);
-#define __sync_fetch_and_nand(PTR,VAL)					\
- ((sizeof (*(PTR)) == sizeof(int))					\
-  ? (__typeof__(*(PTR))) __sync_fetch_and_nand_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_fetch_and_nand_di((long *)(PTR),(long)(VAL)))
-
-extern int __sync_add_and_fetch_si (int *, int);
-extern long __sync_add_and_fetch_di (long *, long);
-#define __sync_add_and_fetch(PTR,VAL)					\
- ((sizeof (*(PTR)) == sizeof(int))					\
-  ? (__typeof__(*(PTR))) __sync_add_and_fetch_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_add_and_fetch_di((long *)(PTR),(long)(VAL)))
-
-extern int __sync_sub_and_fetch_si (int *, int);
-extern long __sync_sub_and_fetch_di (long *, long);
-#define __sync_sub_and_fetch(PTR,VAL)					\
- ((sizeof (*(PTR)) == sizeof(int))					\
-  ? (__typeof__(*(PTR))) __sync_sub_and_fetch_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_sub_and_fetch_di((long *)(PTR),(long)(VAL)))
-
-extern int __sync_and_and_fetch_si (int *, int);
-extern long __sync_and_and_fetch_di (long *, long);
-#define __sync_and_and_fetch(PTR,VAL)					\
- ((sizeof (*(PTR)) == sizeof(int))					\
-  ? (__typeof__(*(PTR))) __sync_and_and_fetch_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_and_and_fetch_di((long *)(PTR),(long)(VAL)))
-
-extern int __sync_or_and_fetch_si (int *, int);
-extern long __sync_or_and_fetch_di (long *, long);
-#define __sync_or_and_fetch(PTR,VAL)					\
- ((sizeof (*(PTR)) == sizeof(int))					\
-  ? (__typeof__(*(PTR))) __sync_or_and_fetch_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_or_and_fetch_di((long *)(PTR),(long)(VAL)))
-
-extern int __sync_xor_and_fetch_si (int *, int);
-extern long __sync_xor_and_fetch_di (long *, long);
-#define __sync_xor_and_fetch(PTR,VAL)					\
- ((sizeof (*(PTR)) == sizeof(int))					\
-  ? (__typeof__(*(PTR))) __sync_xor_and_fetch_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_xor_and_fetch_di((long *)(PTR),(long)(VAL)))
-
-extern int __sync_nand_and_fetch_si (int *, int);
-extern long __sync_nand_and_fetch_di (long *, long);
-#define __sync_nand_and_fetch(PTR,VAL)					\
- ((sizeof (*(PTR)) == sizeof(int))					\
-  ? (__typeof__(*(PTR))) __sync_nand_and_fetch_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_nand_and_fetch_di((long *)(PTR),(long)(VAL)))
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif

Reply to: