Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1107 → Rev 1106

/kernel/trunk/arch/ia64/include/atomic.h
29,6 → 29,10
#ifndef __ia64_ATOMIC_H__
#define __ia64_ATOMIC_H__
 
#include <arch/types.h>
#include <typedefs.h>
 
 
/** Atomic addition.
*
* @param val Atomic value.
/kernel/trunk/arch/ppc32/include/atomic.h
29,9 → 29,12
#ifndef __ppc32_ATOMIC_H__
#define __ppc32_ATOMIC_H__
 
#include <arch/types.h>
#include <typedefs.h>
 
static inline void atomic_inc(atomic_t *val)
{
long tmp;
__u32 tmp;
 
asm __volatile__ (
"1:\n"
46,7 → 49,7
 
static inline void atomic_dec(atomic_t *val)
{
long tmp;
__u32 tmp;
 
asm __volatile__(
"1:\n"
/kernel/trunk/arch/mips32/include/atomic.h
29,6 → 29,9
#ifndef __mips32_ATOMIC_H__
#define __mips32_ATOMIC_H__
 
#include <arch/types.h>
#include <typedefs.h>
 
#define atomic_inc(x) ((void) atomic_add(x, 1))
#define atomic_dec(x) ((void) atomic_add(x, -1))
 
/kernel/trunk/generic/include/atomic.h
29,11 → 29,12
#ifndef __ATOMIC_H__
#define __ATOMIC_H__
 
typedef struct atomic {
struct atomic {
volatile long count;
} atomic_t;
};
 
#include <arch/atomic.h>
#include <typedefs.h>
 
static inline void atomic_set(atomic_t *val, long i)
{
/kernel/trunk/generic/include/typedefs.h
61,7 → 61,6
typedef enum rwlock_type rwlock_type_t;
typedef struct condvar condvar_t;
typedef struct waitq waitq_t;
typedef struct futex futex_t;
 
typedef struct chunk chunk_t;
 
93,4 → 92,6
typedef struct btree_node btree_node_t;
typedef struct btree btree_t;
 
typedef struct atomic atomic_t;
 
#endif