~ubuntu-branches/ubuntu/quantal/jackd2/quantal

« back to all changes in this revision

Viewing changes to linux/JackAtomic_os.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler, Adrian Knoth, Reinhard Tartler, Jonas Smedegaard
  • Date: 2010-06-19 18:54:29 UTC
  • Revision ID: james.westby@ubuntu.com-20100619185429-zhbhh0mqvukgzx0l
Tags: 1.9.5~dfsg-15
[ Adrian Knoth ]
* Also provide the shlibs file for libjack-jackd2-0
* Fix FTBFS on sparc64 (Closes: #586257)

[ Reinhard Tartler ]
* jackd must not be a virtual package, use 'jack-daemon' for that
* add breaks/replaces on old libjack0
* change shlibsfile to prefer jackd2's libjack
* use conflicts instead of breaks. libjack-jackd2-0 has file conflicts
  with libjack0 and will keep it

[ Jonas Smedegaard ]
* Update control file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
        "1:                     \n"
43
43
        "   li      %0, 0       \n"
44
44
        "2:                     \n"
45
 
    : "=r" (result)
46
 
                : "r" (addr), "r" (value), "r" (newvalue), "r" (tmp)
47
 
            );
 
45
        : "=r" (result)
 
46
        : "r" (addr), "r" (value), "r" (newvalue), "r" (tmp)
 
47
        );
48
48
    return result;
49
49
}
50
50
 
61
61
        "# CAS \n\t"
62
62
        LOCK "cmpxchg %2, (%1) \n\t"
63
63
        "sete %0               \n\t"
64
 
    : "=a" (ret)
65
 
                : "c" (addr), "d" (newvalue), "a" (value)
66
 
            );
 
64
        : "=a" (ret)
 
65
        : "c" (addr), "d" (newvalue), "a" (value)
 
66
        );
67
67
    return ret;
68
68
}
69
69
 
70
70
#endif
71
71
 
 
72
#if !defined(__i386__) && !defined(__x86_64__)  && !defined(__PPC__)
 
73
#warning using builtin gcc (version > 4.1) atomic
 
74
 
 
75
static inline char CAS(volatile UInt32 value, UInt32 newvalue, volatile void* addr)
 
76
{
 
77
    return __sync_bool_compare_and_swap (&addr, value, newvalue);
 
78
}
 
79
#endif
 
80
 
 
81
 
72
82
#endif
73
83