linux-old/include/asm-i386/posix_types.h
<<
>>
Prefs
   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
  10typedef unsigned short  __kernel_dev_t;
  11typedef unsigned long   __kernel_ino_t;
  12typedef unsigned short  __kernel_mode_t;
  13typedef unsigned short  __kernel_nlink_t;
  14typedef long            __kernel_off_t;
  15typedef int             __kernel_pid_t;
  16typedef unsigned short  __kernel_uid_t;
  17typedef unsigned short  __kernel_gid_t;
  18typedef unsigned int    __kernel_size_t;
  19typedef int             __kernel_ssize_t;
  20typedef int             __kernel_ptrdiff_t;
  21typedef long            __kernel_time_t;
  22typedef long            __kernel_clock_t;
  23typedef int             __kernel_daddr_t;
  24typedef char *          __kernel_caddr_t;
  25
  26#ifdef __GNUC__
  27typedef long long       __kernel_loff_t;
  28#endif
  29
  30typedef struct {
  31#if defined(__KERNEL__) || defined(__USE_ALL)
  32        int     val[2];
  33#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
  34        int     __val[2];
  35#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
  36} __kernel_fsid_t;
  37
  38#undef  __FD_SET
  39#define __FD_SET(fd,fdsetp) \
  40                __asm__ __volatile__("btsl %1,%0": \
  41                        "=m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd)))
  42
  43#undef  __FD_CLR
  44#define __FD_CLR(fd,fdsetp) \
  45                __asm__ __volatile__("btrl %1,%0": \
  46                        "=m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd)))
  47
  48#undef  __FD_ISSET
  49#define __FD_ISSET(fd,fdsetp) (__extension__ ({ \
  50                unsigned char __result; \
  51                __asm__ __volatile__("btl %1,%2 ; setb %0" \
  52                        :"=q" (__result) :"r" ((int) (fd)), \
  53                        "m" (*(__kernel_fd_set *) (fdsetp))); \
  54                __result; }))
  55
  56#undef  __FD_ZERO
  57#define __FD_ZERO(fdsetp) \
  58                __asm__ __volatile__("cld ; rep ; stosl" \
  59                        :"=m" (*(__kernel_fd_set *) (fdsetp)) \
  60                        :"a" (0), "c" (__FDSET_LONGS), \
  61                        "D" ((__kernel_fd_set *) (fdsetp)) :"cx","di")
  62
  63#endif
  64
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.