segment.h File Reference

Go to the source code of this file.

Defines

#define get_fs_byte(addr)   get_user_byte((char *)(addr))
#define get_fs_word(addr)   get_user_word((short *)(addr))
#define get_fs_long(addr)   get_user_long((int *)(addr))
#define put_fs_byte(x, addr)   put_user_byte((x),(char *)(addr))
#define put_fs_word(x, addr)   put_user_word((x),(short *)(addr))
#define put_fs_long(x, addr)   put_user_long((x),(int *)(addr))
#define COMMON(x)
#define COMMON(x)
#define memcpy_fromfs(to, from, n)
#define memcpy_tofs(to, from, n)

Functions

static unsigned char get_user_byte (const char *addr)
static unsigned short get_user_word (const short *addr)
static unsigned long get_user_long (const int *addr)
static void put_user_byte (char val, char *addr)
static void put_user_word (short val, short *addr)
static void put_user_long (unsigned long val, int *addr)
static void __generic_memcpy_tofs (void *to, const void *from, unsigned long n)
static void __constant_memcpy_tofs (void *to, const void *from, unsigned long n)
static void __generic_memcpy_fromfs (void *to, const void *from, unsigned long n)
static void __constant_memcpy_fromfs (void *to, const void *from, unsigned long n)
static unsigned long get_fs (void)
static unsigned long get_ds (void)
static void set_fs (unsigned long val)


Define Documentation

#define COMMON (  ) 

Value:

__asm__("cld\n\t" \
        "rep ; fs ; movsl\n\t" \
        x \

#define COMMON (  ) 

Value:

__asm__("cld\n\t" \
        "push %%es\n\t" \
        "push %%fs\n\t" \
        "pop %%es\n\t" \
        "rep ; movsl\n\t" \
        x \
        "pop %%es" \

Referenced by __constant_memcpy_fromfs(), and __constant_memcpy_tofs().

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

Definition at line 12 of file segment.h.

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

Definition at line 32 of file segment.h.

#define get_fs_word ( addr   )     get_user_word((short *)(addr))

Definition at line 22 of file segment.h.

#define memcpy_fromfs ( to,
from,
n   ) 

Value:

(__builtin_constant_p(n) ? \
 __constant_memcpy_fromfs((to),(from),(n)) : \
 __generic_memcpy_fromfs((to),(from),(n)))

Definition at line 193 of file segment.h.

#define memcpy_tofs ( to,
from,
n   ) 

Value:

(__builtin_constant_p(n) ? \
 __constant_memcpy_tofs((to),(from),(n)) : \
 __generic_memcpy_tofs((to),(from),(n)))

Definition at line 198 of file segment.h.

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

Definition at line 41 of file segment.h.

#define put_fs_long ( x,
addr   )     put_user_long((x),(int *)(addr))

Definition at line 59 of file segment.h.

#define put_fs_word ( x,
addr   )     put_user_word((x),(short *)(addr))

Definition at line 50 of file segment.h.


Function Documentation

static void __constant_memcpy_fromfs ( void *  to,
const void *  from,
unsigned long  n 
) [inline, static]

Definition at line 147 of file segment.h.

References COMMON, get_user_byte(), get_user_long(), and get_user_word().

static void __constant_memcpy_tofs ( void *  to,
const void *  from,
unsigned long  n 
) [inline, static]

Definition at line 81 of file segment.h.

References COMMON, put_user_byte(), put_user_long(), and put_user_word().

static void __generic_memcpy_fromfs ( void *  to,
const void *  from,
unsigned long  n 
) [inline, static]

< no outputs

Definition at line 131 of file segment.h.

static void __generic_memcpy_tofs ( void *  to,
const void *  from,
unsigned long  n 
) [inline, static]

< no outputs

Definition at line 61 of file segment.h.

static unsigned long get_ds ( void   )  [inline, static]

Definition at line 221 of file segment.h.

static unsigned long get_fs ( void   )  [inline, static]

Someone who knows GNU asm better than I should double check the followig. It seems to work, but I don't know if I'm doing something subtly wrong. --- TYT, 11/24/91 [ nothing wrong here, Linus: I just changed the ax to be any reg ]

Definition at line 214 of file segment.h.

static unsigned char get_user_byte ( const char *  addr  )  [inline, static]

Definition at line 4 of file segment.h.

Referenced by __constant_memcpy_fromfs().

static unsigned long get_user_long ( const int *  addr  )  [inline, static]

Definition at line 24 of file segment.h.

Referenced by __constant_memcpy_fromfs().

static unsigned short get_user_word ( const short *  addr  )  [inline, static]

Definition at line 14 of file segment.h.

Referenced by __constant_memcpy_fromfs().

static void put_user_byte ( char  val,
char *  addr 
) [inline, static]

Definition at line 34 of file segment.h.

Referenced by __constant_memcpy_tofs().

static void put_user_long ( unsigned long  val,
int *  addr 
) [inline, static]

Definition at line 52 of file segment.h.

Referenced by __constant_memcpy_tofs().

static void put_user_word ( short  val,
short *  addr 
) [inline, static]

Definition at line 43 of file segment.h.

Referenced by __constant_memcpy_tofs().

static void set_fs ( unsigned long  val  )  [inline, static]

Definition at line 228 of file segment.h.


Generated on Mon May 1 21:47:00 2006 for KernelAPI by  doxygen 1.4.6-5