summaryrefslogtreecommitdiff
path: root/pfinet/glue-include/asm/system.h
blob: 1a5d61cd6066a065a972103115c0f6776cb59a1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef _HACK_ASM_SYSTEM_H
#define _HACK_ASM_SYSTEM_H

/* We don't need atomicity in the Linux code because we serialize all
   entries to it.  */

#include <stdint.h>

#define xchg(ptr, x)							      \
  ({									      \
    __typeof__ (*(ptr)) *_ptr = (ptr), _x = *_ptr;			      \
    (uintptr_t) *_ptr = (x); _x;					      \
  })

#define mb()	((void) 0)	/* memory barrier */
#define rmb()	mb()
#define wmb()	mb()


#endif