~ubuntu-branches/ubuntu/saucy/jack-audio-connection-kit/saucy

« back to all changes in this revision

Viewing changes to config/cpu/generic/atomicity.h

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2008-12-06 11:05:15 UTC
  • mfrom: (4.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20081206110515-xa9v9pajr9jqvfvg
Tags: 0.115.6-1ubuntu1
* Merge from Debian unstable, remaining Ubuntu changes:
  - Redirect stderr in bash completion (Debian #504488).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Low-level functions for atomic operations.  Stub version.
 
2
   Copyright (C) 1997,2001 Free Software Foundation, Inc.
 
3
   This file is part of the GNU C Library.
 
4
 
 
5
   The GNU C Library is free software; you can redistribute it and/or
 
6
   modify it under the terms of the GNU Lesser General Public
 
7
   License as published by the Free Software Foundation; either
 
8
   version 2.1 of the License, or (at your option) any later version.
 
9
 
 
10
   The GNU C Library is distributed in the hope that it will be useful,
 
11
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
13
   Lesser General Public License for more details.
 
14
 
 
15
   You should have received a copy of the GNU Lesser General Public
 
16
   License along with the GNU C Library; if not, write to the Free
 
17
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 
18
   02111-1307 USA.  */
 
19
 
 
20
#ifndef _ATOMICITY_H
 
21
#define _ATOMICITY_H    1
 
22
 
 
23
#warning "stub atomicity functions are not atomic on this platform"
 
24
 
 
25
typedef int _Atomic_word;
 
26
 
 
27
static inline _Atomic_word 
 
28
__attribute__ ((__unused__))
 
29
__exchange_and_add(volatile _Atomic_word* mem, int val)
 
30
{
 
31
  int result = *mem;
 
32
  *mem += val;
 
33
  return result;
 
34
}
 
35
 
 
36
static inline void
 
37
__attribute__ ((__unused__))
 
38
__atomic_add(volatile _Atomic_word* mem, int val)
 
39
{
 
40
  *mem += val;
 
41
}
 
42
 
 
43
#endif /* atomicity.h */