Print this page
    
    
      
        | Split | 
	Close | 
      
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/uts/common/sys/signalfd.h
          +++ new/usr/src/uts/common/sys/signalfd.h
   1    1  /*
   2    2   * This file and its contents are supplied under the terms of the
   3    3   * Common Development and Distribution License ("CDDL"), version 1.0.
   4    4   * You may only use this file in accordance with the terms of version
   5    5   * 1.0 of the CDDL.
   6    6   *
   7    7   * A full copy of the text of the CDDL should have accompanied this
   8    8   * source.  A copy of the CDDL is also available via the Internet at
   9    9   * http://www.illumos.org/license/CDDL.
  10   10   */
  11   11  
  12   12  /*
  13   13   * Copyright 2016 Joyent, Inc.
  14   14   */
  15   15  
  16   16  /*
  17   17   * Header file to support the signalfd facility. Note that this facility
  18   18   * is designed to be binary compatible with the Linux signalfd facility, modulo
  19   19   * the signals themselves; values for constants here should therefore exactly
  20   20   * match those found in Linux, and this facility shouldn't be extended
  21   21   * independently of Linux.
  22   22   */
  23   23  
  24   24  #ifndef _SYS_SIGNALFD_H
  25   25  #define _SYS_SIGNALFD_H
  26   26  
  27   27  #include <sys/types.h>
  28   28  
  29   29  #ifdef  __cplusplus
  30   30  extern "C" {
  31   31  #endif
  32   32  
  33   33  /*
  34   34   * To assure binary compatibility with Linux, these values are fixed at their
  35   35   * Linux equivalents, not their native ones.
  36   36   */
  37   37  #define SFD_CLOEXEC             02000000                /* LX_O_CLOEXEC */
  38   38  #define SFD_NONBLOCK            04000                   /* LX_O_NONBLOCK */
  39   39  
  40   40  /*
  41   41   * These ioctl values are specific to the native implementation; applications
  42   42   * shouldn't be using them directly, and they should therefore be safe to
  43   43   * change without breaking apps.
  44   44   */
  45   45  #define SIGNALFDIOC             (('s' << 24) | ('f' << 16) | ('d' << 8))
  46   46  #define SIGNALFDIOC_MASK        (SIGNALFDIOC | 1)       /* set mask */
  47   47  
  48   48  typedef struct signalfd_siginfo {
  49   49          uint32_t ssi_signo;     /* signal from signal.h */
  50   50          int32_t  ssi_errno;     /* error from errno.h */
  51   51          int32_t  ssi_code;      /* signal code */
  52   52          uint32_t ssi_pid;       /* PID of sender */
  53   53          uint32_t ssi_uid;       /* real UID of sender */
  54   54          int32_t  ssi_fd;        /* File descriptor (SIGIO) */
  55   55          uint32_t ssi_tid;       /* unused */
  56   56          uint32_t ssi_band;      /* band event (SIGIO) */
  57   57          uint32_t ssi_overrun;   /* unused */
  58   58          uint32_t ssi_trapno;    /* trap number that caused signal */
  59   59          int32_t  ssi_status;    /* exit status or signal (SIGCHLD) */
  60   60          int32_t  ssi_int;       /* unused */
  61   61          uint64_t ssi_ptr;       /* unused */
  62   62          uint64_t ssi_utime;     /* user CPU time consumed (SIGCHLD) */
  63   63          uint64_t ssi_stime;     /* system CPU time consumed (SIGCHLD) */
  64   64          uint64_t ssi_addr;      /* address that generated signal */
  65   65          uint8_t  ssi_pad[48];   /* Pad size to 128 bytes to allow for */
  66   66                                  /* additional fields in the future. */
  67   67  } signalfd_siginfo_t;
  68   68  
  69   69  #ifndef _KERNEL
  70   70  
  71   71  extern int signalfd(int, const sigset_t *, int);
  72   72  
  73   73  #else
  74   74  
  75   75  #define SIGNALFDMNRN_SIGNALFD   0
  76   76  #define SIGNALFDMNRN_CLONE      1
  77   77  
  78   78  /*
  79   79   * This holds the proc_t state for a process which is using signalfd.
  80   80   * Its presence and contents are protected by p_lock.
  81   81   */
  82   82  typedef struct sigfd_proc_state {
  83   83          void (*sigfd_pollwake_cb)(void *, int);
  84   84          list_t sigfd_list;
  85   85  } sigfd_proc_state_t;
  86   86  
  87   87  
  88   88  extern void (*sigfd_exit_helper)();
  89   89  
  90   90  #endif /* _KERNEL */
  91   91  
  92   92  #ifdef  __cplusplus
  93   93  }
  94   94  #endif
  95   95  
  96   96  #endif  /* _SYS_SIGNALFD_H */
  
    | 
      ↓ open down ↓ | 
    96 lines elided | 
    
      ↑ open up ↑ | 
  
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX