Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64202
b: refs/heads/master
c: c51b962
h: refs/heads/master
v: v3
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Aug 22, 2007
1 parent b023eca commit 0761630
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9c5f225f1a2c67c57ff5dfbe0589de20c5706a16
refs/heads/master: c51b9621796c31810fb66509ea1faee4597d9c03
26 changes: 22 additions & 4 deletions trunk/include/asm-s390/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,17 @@ typedef struct {

#endif /* __GNUC__ */

#define atomic_read(v) ((v)->counter)
#define atomic_set(v,i) (((v)->counter) = (i))
static inline int atomic_read(const atomic_t *v)
{
barrier();
return v->counter;
}

static inline void atomic_set(atomic_t *v, int i)
{
v->counter = i;
barrier();
}

static __inline__ int atomic_add_return(int i, atomic_t * v)
{
Expand Down Expand Up @@ -182,8 +191,17 @@ typedef struct {

#endif /* __GNUC__ */

#define atomic64_read(v) ((v)->counter)
#define atomic64_set(v,i) (((v)->counter) = (i))
static inline long long atomic64_read(const atomic64_t *v)
{
barrier();
return v->counter;
}

static inline void atomic64_set(atomic64_t *v, long long i)
{
v->counter = i;
barrier();
}

static __inline__ long long atomic64_add_return(long long i, atomic64_t * v)
{
Expand Down

0 comments on commit 0761630

Please sign in to comment.