segment.h 474 B

12345678910111213141516171819202122
  1. #ifndef _ASM_SCORE_SEGMENT_H
  2. #define _ASM_SCORE_SEGMENT_H
  3. #ifndef __ASSEMBLY__
  4. typedef struct {
  5. unsigned long seg;
  6. } mm_segment_t;
  7. #define KERNEL_DS ((mm_segment_t){0})
  8. #define USER_DS KERNEL_DS
  9. # define get_ds() (KERNEL_DS)
  10. # define get_fs() (current_thread_info()->addr_limit)
  11. # define set_fs(x) \
  12. do { current_thread_info()->addr_limit = (x); } while (0)
  13. # define segment_eq(a, b) ((a).seg == (b).seg)
  14. # endif /* __ASSEMBLY__ */
  15. #endif /* _ASM_SCORE_SEGMENT_H */