~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to debian/patches/01-armel-tas.patch

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-39rdwwu19bi24cw5
Tags: 9.1~beta1-2
* debian/control: Add missing ${misc:Depends} to -dbg.
* Bump Standards-Version to 3.9.2 (no changes necessary).
* debian/rules: Fix FTBFS with only-binary (-B) builds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: use gcc intrinsics rather than assembler to implement tas
 
2
Author: Alexander Sack <asac@ubuntu.com>
 
3
Bug-Ubuntu: https://launchpad.net/bugs/497331
 
4
 
 
5
--- postgresql-8.4-8.4.2/src/include/storage/s_lock.h   2010-01-04 14:21:40.789729336 +0100
 
6
+++ postgresql-8.4-8.4.2.new/src/include/storage/s_lock.h       2010-01-04 14:23:46.918690895 +0100
 
7
@@ -262,14 +262,7 @@
 
8
 static __inline__ int
 
9
 tas(volatile slock_t *lock)
 
10
 {
 
11
-       register slock_t _res = 1;
 
12
-
 
13
-       __asm__ __volatile__(
 
14
-               "       swpb    %0, %0, [%2]    \n"
 
15
-:              "+r"(_res), "+m"(*lock)
 
16
-:              "r"(lock)
 
17
-:              "memory");
 
18
-       return (int) _res;
 
19
+       return __sync_lock_test_and_set (lock, 1);
 
20
 }
 
21
 
 
22
 #endif  /* __arm__ */