root/include/asm-mips/types.h

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

INCLUDED FROM


   1 #ifndef __ASM_MIPS_TYPES_H
   2 #define __ASM_MIPS_TYPES_H
   3 
   4 #ifndef _SIZE_T
   5 #define _SIZE_T
   6 typedef unsigned long size_t;
   7 #endif
   8 
   9 #ifndef _SSIZE_T
  10 #define _SSIZE_T
  11 typedef long ssize_t;
  12 #endif
  13 
  14 #ifndef _PTRDIFF_T
  15 #define _PTRDIFF_T
  16 typedef long ptrdiff_t;
  17 #endif
  18 
  19 /*
  20  * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  21  * header files exported to user space
  22  */
  23 
  24 typedef __signed__ char __s8;
  25 typedef unsigned char __u8;
  26 
  27 typedef __signed__ short __s16;
  28 typedef unsigned short __u16;
  29 
  30 typedef __signed__ int __s32;
  31 typedef unsigned int __u32;
  32 
  33 #if ((~0UL) == 0xffffffff)
  34 
  35 #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
  36 typedef __signed__ long long __s64;
  37 typedef unsigned long long __u64;
  38 #endif
  39   
  40 #else
  41   
  42 typedef __signed__ long __s64;
  43 typedef unsigned long __u64;
  44 
  45 #endif
  46 
  47 /*
  48  * These aren't exported outside the kernel to avoid name space clashes
  49  */
  50 #ifdef __KERNEL__
  51 
  52 typedef __signed char s8;
  53 typedef unsigned char u8;
  54 
  55 typedef __signed short s16;
  56 typedef unsigned short u16;
  57 
  58 typedef __signed long s32;
  59 typedef unsigned long u32;
  60 
  61 #if ((~0UL) == 0xffffffff)
  62 
  63 #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
  64 typedef __signed__ long long s64;
  65 typedef unsigned long long u64;
  66 #endif
  67   
  68 #else
  69   
  70 typedef __signed__ long s64;
  71 typedef unsigned long u64;
  72 
  73 #endif
  74 
  75 #endif /* __KERNEL__ */
  76 
  77 /*
  78  * These definitions double the definitions from <gnu/types.h>.
  79  */
  80 #undef  __FDELT
  81 #define __FDELT(d)      ((d) / __NFDBITS)
  82 #undef  __FDMASK
  83 #define __FDMASK(d)     (1 << ((d) % __NFDBITS))
  84 #undef  __FD_SET
  85 #define __FD_SET(d, set)        ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
  86 #undef  __FD_CLR
  87 #define __FD_CLR(d, set)        ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
  88 #undef  __FD_ISSET
  89 #define __FD_ISSET(d, set)      ((set)->fds_bits[__FDELT(d)] & __FDMASK(d))
  90 #undef  __FD_ZERO
  91 #define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
  92 
  93 #endif /* __ASM_MIPS_TYPES_H */

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