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

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