root/include/asm-i386/posix_types.h

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

INCLUDED FROM


   1 #ifndef __ARCH_I386_POSIX_TYPES_H
   2 #define __ARCH_I386_POSIX_TYPES_H
   3 
   4 /*
   5  * This file is generally used by user-level software, so you need to
   6  * be a little careful about namespace pollution etc.  Also, we cannot
   7  * assume GCC is being used.
   8  */
   9 
  10 typedef unsigned short  __kernel_dev_t;
  11 typedef unsigned long   __kernel_ino_t;
  12 typedef unsigned short  __kernel_mode_t;
  13 typedef unsigned short  __kernel_nlink_t;
  14 typedef long            __kernel_off_t;
  15 typedef int             __kernel_pid_t;
  16 typedef unsigned short  __kernel_uid_t;
  17 typedef unsigned short  __kernel_gid_t;
  18 typedef unsigned int    __kernel_size_t;
  19 typedef int             __kernel_ssize_t;
  20 typedef int             __kernel_ptrdiff_t;
  21 typedef long            __kernel_time_t;
  22 typedef long            __kernel_clock_t;
  23 typedef int             __kernel_daddr_t;
  24 typedef char *          __kernel_caddr_t;
  25 
  26 #ifdef __GNUC__
  27 typedef long long       __kernel_loff_t;
  28 #endif
  29 
  30 #undef  __FD_SET
  31 #define __FD_SET(fd,fdsetp) \
  32                 __asm__ __volatile__("btsl %1,%0": \
  33                         "=m" (*(fd_set *) (fdsetp)):"r" ((int) (fd)))
  34 
  35 #undef  __FD_CLR
  36 #define __FD_CLR(fd,fdsetp) \
  37                 __asm__ __volatile__("btrl %1,%0": \
  38                         "=m" (*(fd_set *) (fdsetp)):"r" ((int) (fd)))
  39 
  40 #undef  __FD_ISSET
  41 #define __FD_ISSET(fd,fdsetp) (__extension__ ({ \
  42                 unsigned char __result; \
  43                 __asm__ __volatile__("btl %1,%2 ; setb %0" \
  44                         :"=q" (__result) :"r" ((int) (fd)), \
  45                         "m" (*(fd_set *) (fdsetp))); \
  46                 __result; }))
  47 
  48 #undef  __FD_ZERO
  49 #define __FD_ZERO(fdsetp) \
  50                 __asm__ __volatile__("cld ; rep ; stosl" \
  51                         :"=m" (*(fd_set *) (fdsetp)) \
  52                         :"a" (0), "c" (__FDSET_INTS), \
  53                         "D" ((fd_set *) (fdsetp)) :"cx","di")
  54 
  55 #endif

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