~ubuntu-branches/ubuntu/trusty/syslog-ng/trusty-proposed

« back to all changes in this revision

Viewing changes to lib/atomic.h

  • Committer: Package Import Robot
  • Author(s): Laszlo Boszormenyi (GCS), Gergely Nagy
  • Date: 2011-10-11 14:30:48 UTC
  • mfrom: (1.3.7)
  • Revision ID: package-import@ubuntu.com-20111011143048-r1iljux9xbvj3lwh
Tags: 3.3.1.dfsg-1
* New upstream release with important fixes from upstream git tree with
  non-free manpages removed.
* Drop syslog-ng.conf(5) (closes: #496521).
* syslog-ng(8) is generated, and does not mention -Q anymore
  (closes: #616069).
* Supports CAP_SYSLOG on recent kernels (closes: #630172).
* Does not use g_timeout_add_seconds anymore (closes: #609154).

[ Gergely Nagy <algernon@madhouse-project.org> ]
* Update debian/copyright to DEP-5 format.
* Simplified the logrotate file by merging identical entries.
* Include local configuration files from /etc/syslog-ng/conf.d/ (Closes:
  #609050).
* Update syslog-ng.conf to be fully 3.3 compliant.
* Compress both source and binaries (except the syslog-ng meta
  package) with xz, instead of gzip.
* Use dpkg triggers to restart syslog-ng when appropriate.
* Include DFSG-free manual pages for all binaries.
* Build with Hardening enabled.
* Mention syslog(3) in /etc/default/syslog-ng, instead of
  <linux/kernel.h> (Closes: #608605)
* Support 'status' in the init script.
  Patch from Peter Eisentraut <petere@debian.org> (Closes: #644458)
* Build-Depend on libevtlog-dev (>= 0.2.12-5~) for correct shlibs.
* Use [linux-any] in Build-Depends instead of hardcoded links.
  (Closes: #634715)
* Use $SYSLOGNG_OPTS in the init script when reloading syslog-ng.
  (Closes: #589081)

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#define ATOMIC_H_INCLUDED
27
27
 
28
28
 
29
 
#if ENABLE_THREADS
30
29
typedef struct
31
30
{
32
31
  gint counter;
51
50
}
52
51
 
53
52
static inline gint
 
53
g_atomic_counter_exchange_and_add(GAtomicCounter *c, gint val)
 
54
{
 
55
  return g_atomic_int_exchange_and_add(&c->counter, val);
 
56
}
 
57
 
 
58
static inline gint
54
59
g_atomic_counter_racy_get(GAtomicCounter *c)
55
60
{
56
61
  return c->counter;
68
73
  c->counter = value;
69
74
}
70
75
 
71
 
#else
72
 
typedef guint32 GAtomicCounter;
73
 
 
74
 
static inline void
75
 
g_atomic_counter_inc(GAtomicCounter *c)
76
 
{
77
 
  (*c)++;
78
 
}
79
 
 
80
 
static inline gboolean
81
 
g_atomic_counter_dec_and_test(GAtomicCounter *c)
82
 
{
83
 
  (*c)--;
84
 
  return (*c) == 0;
85
 
}
86
 
 
87
 
static inline gint
88
 
g_atomic_counter_get(GAtomicCounter *c)
89
 
{
90
 
  return *c;
91
 
}
92
 
 
93
 
static inline gint
94
 
g_atomic_counter_racy_get(GAtomicCounter *c)
95
 
{
96
 
  return *c;
97
 
}
98
 
 
99
 
static inline void
100
 
g_atomic_counter_set(GAtomicCounter *c, gint value)
101
 
{
102
 
  *c = value;
103
 
}
104
 
 
105
 
#endif
106
 
 
107
76
#endif