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  __dev_t;
  11 typedef unsigned long   __ino_t;
  12 typedef unsigned short  __mode_t;
  13 typedef unsigned short  __nlink_t;
  14 typedef long            __off_t;
  15 typedef int             __pid_t;
  16 typedef unsigned short  __uid_t;
  17 typedef unsigned short  __gid_t;
  18 typedef unsigned int    __size_t;
  19 typedef int             __ssize_t;
  20 typedef int             __ptrdiff_t;
  21 typedef long            __time_t;
  22 typedef long            __clock_t;
  23 typedef int             __daddr_t;
  24 typedef char *          __caddr_t;
  25 
  26 #undef  __FD_SET
  27 #define __FD_SET(fd,fdsetp) \
  28                 __asm__ __volatile__("btsl %1,%0": \
  29                         "=m" (*(fd_set *) (fdsetp)):"r" ((int) (fd)))
  30 
  31 #undef  __FD_CLR
  32 #define __FD_CLR(fd,fdsetp) \
  33                 __asm__ __volatile__("btrl %1,%0": \
  34                         "=m" (*(fd_set *) (fdsetp)):"r" ((int) (fd)))
  35 
  36 #undef  __FD_ISSET
  37 #define __FD_ISSET(fd,fdsetp) (__extension__ ({ \
  38                 unsigned char __result; \
  39                 __asm__ __volatile__("btl %1,%2 ; setb %0" \
  40                         :"=q" (__result) :"r" ((int) (fd)), \
  41                         "m" (*(fd_set *) (fdsetp))); \
  42                 __result; }))
  43 
  44 #undef  __FD_ZERO
  45 #define __FD_ZERO(fdsetp) \
  46                 __asm__ __volatile__("cld ; rep ; stosl" \
  47                         :"=m" (*(fd_set *) (fdsetp)) \
  48                         :"a" (0), "c" (__FDSET_INTS), \
  49                         "D" ((fd_set *) (fdsetp)) :"cx","di")
  50 
  51 #endif

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