~ubuntu-branches/ubuntu/lucid/rsyslog/lucid-updates

« back to all changes in this revision

Viewing changes to runtime/atomic.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2009-06-23 12:12:43 UTC
  • mfrom: (1.1.11 upstream) (3.2.8 sid)
  • Revision ID: james.westby@ubuntu.com-20090623121243-d2fejarzidywnn17
Tags: 4.2.0-1
* New upstream release of the now stable v4 branch.
  - Fix warnings when /etc/rsyslog.d/ is empty. Closes: #530228
* debian/patches/imudp_multiple_udp_sockets.patch
  - Removed, merged upstream.
* debian/rsyslog.default
  - Set default compat mode to '4'.
* debian/rsyslog.logcheck.ignore.server
  - Update logcheck rules files to also ignore rsyslogd and imklog stop
    messages.
* debian/control
  - Bump Standards-Version to 3.8.2. No further changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
 */
43
43
#ifdef HAVE_ATOMIC_BUILTINS
44
44
#       define ATOMIC_INC(data) ((void) __sync_fetch_and_add(&(data), 1))
 
45
#       define ATOMIC_DEC(data) ((void) __sync_sub_and_fetch(&(data), 1))
45
46
#       define ATOMIC_DEC_AND_FETCH(data) __sync_sub_and_fetch(&(data), 1)
46
47
#       define ATOMIC_FETCH_32BIT(data) ((unsigned) __sync_fetch_and_and(&(data), 0xffffffff))
47
48
#       define ATOMIC_STORE_1_TO_32BIT(data) __sync_lock_test_and_set(&(data), 1)
55
56
         */
56
57
#       warning "atomic builtins not available, using nul operations - rsyslogd will probably be racy!"
57
58
#       define ATOMIC_INC(data) (++(data))
 
59
#       define ATOMIC_DEC(data) (--(data))
58
60
#       define ATOMIC_DEC_AND_FETCH(data) (--(data))
59
61
#       define ATOMIC_FETCH_32BIT(data) (data)
60
62
#       define ATOMIC_STORE_1_TO_32BIT(data) (data) = 1