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

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