summaryrefslogtreecommitdiff
path: root/pfinet/asm/segment.h
blob: 34c35b96bdc84316f00d4a6087eedd20606fe810 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef _HACK_ASM_SEGMENT_H_
#define _HACK_ASM_SEGMENT_H_

#include <sys/types.h>

#define get_fs_long(addr) (*(long *)(addr))
#define get_user_long(addr) (*(long *)(addr))

#define get_fs_byte(addr) (*(char *)(addr))
#define get_user_byte(addr) (*(char *)(addr))

#define put_fs_long(x,addr) (*(long *)(addr) = (x))
#define put_user_long(x,addr) (*(long *)(addr) = (x)

#define put_fs_byte(x,addr) (*(char *)(addr) = (x))
#define put_user_byte(x,addr) (*(char *)(addr) = (x))

#define memcpy_fromfs(a,b,s) (memcpy (a, b, s))
#define memcpy_tofs(a,b,s) (memcpy (a, b, s))

#endif