root/include/asm-sparc/segment.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. get_user_byte
  2. get_user_word
  3. get_user_long
  4. get_user_quad
  5. put_user_byte
  6. put_user_word
  7. put_user_long
  8. put_user_quad
  9. get_fs
  10. get_ds
  11. set_fs

   1 #ifndef _ASM_SEGMENT_H
   2 #define _ASM_SEGMENT_H
   3 
   4 #define KERNEL_CS   0x0
   5 #define KERNEL_DS   0x0
   6 
   7 #define USER_CS     0x1
   8 #define USER_DS     0x1
   9 
  10 #include <linux/string.h>
  11 
  12 static inline unsigned char get_user_byte(const char * addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  13 {
  14         return *addr;
  15 }
  16 
  17 #define get_fs_byte(addr) get_user_byte((char *)(addr))
  18 
  19 static inline unsigned short get_user_word(const short *addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  20 {
  21         return *addr;
  22 }
  23 
  24 #define get_fs_word(addr) get_user_word((short *)(addr))
  25 
  26 static inline unsigned long get_user_long(const int *addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  27 {
  28         return *addr;
  29 }
  30 
  31 #define get_fs_long(addr) get_user_long((int *)(addr))
  32 
  33 static inline unsigned long get_user_quad(const long *addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  34 {
  35         return *addr;
  36 }
  37 
  38 #define get_fs_quad(addr) get_user_quad((long *)(addr))
  39 
  40 static inline void put_user_byte(char val,char *addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  41 {
  42         *addr = val;
  43 }
  44 
  45 #define put_fs_byte(x,addr) put_user_byte((x),(char *)(addr))
  46 
  47 static inline void put_user_word(short val,short * addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  48 {
  49         *addr = val;
  50 }
  51 
  52 #define put_fs_word(x,addr) put_user_word((x),(short *)(addr))
  53 
  54 static inline void put_user_long(unsigned long val,int * addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  55 {
  56         *addr = val;
  57 }
  58 
  59 #define put_fs_long(x,addr) put_user_long((x),(int *)(addr))
  60 
  61 static inline void put_user_quad(unsigned long val,long * addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  62 {
  63         *addr = val;
  64 }
  65 
  66 #define put_fs_quad(x,addr) put_user_quad((x),(long *)(addr))
  67 
  68 #define memcpy_fromfs(to, from, n) memcpy((to),(from),(n))
  69 
  70 #define memcpy_tofs(to, from, n) memcpy((to),(from),(n))
  71 
  72 static inline unsigned long get_fs(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  73 {
  74         return 0;
  75 }
  76 
  77 static inline unsigned long get_ds(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  78 {
  79         return 0;
  80 }
  81 
  82 static inline void set_fs(unsigned long val)
     /* [previous][next][first][last][top][bottom][index][help] */
  83 {
  84 }
  85 
  86 #endif /* _ASM_SEGMENT_H */

/* [previous][next][first][last][top][bottom][index][help] */