Print this page
3830 SIGQUEUE_MAX's limit of 32 is too low


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  28 /*        All Rights Reserved   */
  29 
  30 /*
  31  * University Copyright- Copyright (c) 1982, 1986, 1988
  32  * The Regents of the University of California
  33  * All Rights Reserved
  34  *
  35  * University Acknowledgment- Portions of this document are derived from
  36  * software developed by the University of California, Berkeley, and its
  37  * contributors.
  38  */
  39 
  40 #ifndef _SYS_SIGNAL_H
  41 #define _SYS_SIGNAL_H
  42 
  43 #include <sys/feature_tests.h>
  44 #include <sys/iso/signal_iso.h>


 286 #define sigktou(ks, us)         ((us)->__sigbits[0] = (ks)->__sigbits[0], \
 287                                 (us)->__sigbits[1] = (ks)->__sigbits[1], \
 288                                 (us)->__sigbits[2] = (ks)->__sigbits[2], \
 289                                 (us)->__sigbits[3] = 0)
 290 typedef struct {
 291         int     sig;                            /* signal no.           */
 292         int     perm;                           /* flag for EPERM       */
 293         int     checkperm;                      /* check perm or not    */
 294         int     sicode;                         /* has siginfo.si_code  */
 295         union sigval value;                     /* user specified value */
 296 } sigsend_t;
 297 
 298 typedef struct {
 299         sigqueue_t      sn_sigq;        /* sigq struct for notification */
 300         u_longlong_t    sn_snid;        /* unique id for notification   */
 301 } signotifyq_t;
 302 
 303 
 304 typedef struct sigqhdr {                /* sigqueue pool header         */
 305         sigqueue_t      *sqb_free;      /* free sigq struct list        */
 306         uchar_t         sqb_count;      /* sigq free count              */
 307         uchar_t         sqb_maxcount;   /* sigq max free count          */
 308         ushort_t        sqb_size;       /* size of header+free structs  */
 309         uchar_t         sqb_pexited;    /* process has exited           */
 310         uchar_t         sqb_sent;       /* number of sigq sent          */
 311         kcondvar_t      sqb_cv;         /* waiting for a sigq struct    */
 312         kmutex_t        sqb_lock;       /* lock for sigq pool           */
 313 } sigqhdr_t;
 314 
 315 #define _SIGQUEUE_MAX   32






 316 #define _SIGNOTIFY_MAX  32
 317 
 318 extern  void    setsigact(int, void (*)(int), const k_sigset_t *, int);
 319 extern  void    sigorset(k_sigset_t *, const k_sigset_t *);
 320 extern  void    sigandset(k_sigset_t *, const k_sigset_t *);
 321 extern  void    sigdiffset(k_sigset_t *, const k_sigset_t *);
 322 extern  void    sigintr(k_sigset_t *, int);
 323 extern  void    sigunintr(k_sigset_t *);
 324 extern  void    sigreplace(k_sigset_t *, k_sigset_t *);
 325 
 326 extern  int     kill(pid_t, int);
 327 
 328 #endif /* _KERNEL */
 329 
 330 #ifdef  __cplusplus
 331 }
 332 #endif
 333 
 334 #endif /* _SYS_SIGNAL_H */


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright (c) 1988, 2012, Oracle and/or its affiliates. All rights reserved.

  24  */
  25 
  26 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  27 /*        All Rights Reserved   */
  28 
  29 /*
  30  * University Copyright- Copyright (c) 1982, 1986, 1988
  31  * The Regents of the University of California
  32  * All Rights Reserved
  33  *
  34  * University Acknowledgment- Portions of this document are derived from
  35  * software developed by the University of California, Berkeley, and its
  36  * contributors.
  37  */
  38 
  39 #ifndef _SYS_SIGNAL_H
  40 #define _SYS_SIGNAL_H
  41 
  42 #include <sys/feature_tests.h>
  43 #include <sys/iso/signal_iso.h>


 285 #define sigktou(ks, us)         ((us)->__sigbits[0] = (ks)->__sigbits[0], \
 286                                 (us)->__sigbits[1] = (ks)->__sigbits[1], \
 287                                 (us)->__sigbits[2] = (ks)->__sigbits[2], \
 288                                 (us)->__sigbits[3] = 0)
 289 typedef struct {
 290         int     sig;                            /* signal no.           */
 291         int     perm;                           /* flag for EPERM       */
 292         int     checkperm;                      /* check perm or not    */
 293         int     sicode;                         /* has siginfo.si_code  */
 294         union sigval value;                     /* user specified value */
 295 } sigsend_t;
 296 
 297 typedef struct {
 298         sigqueue_t      sn_sigq;        /* sigq struct for notification */
 299         u_longlong_t    sn_snid;        /* unique id for notification   */
 300 } signotifyq_t;
 301 
 302 
 303 typedef struct sigqhdr {                /* sigqueue pool header         */
 304         sigqueue_t      *sqb_free;      /* free sigq struct list        */
 305         int             sqb_count;      /* sigq free count              */
 306         uint_t          sqb_maxcount;   /* sigq max free count          */
 307         size_t          sqb_size;       /* size of header+free structs  */
 308         uchar_t         sqb_pexited;    /* process has exited           */
 309         uint_t          sqb_sent;       /* number of sigq sent          */
 310         kcondvar_t      sqb_cv;         /* waiting for a sigq struct    */
 311         kmutex_t        sqb_lock;       /* lock for sigq pool           */
 312 } sigqhdr_t;
 313 
 314 /*
 315  * Limits on maximum number of sigqueue(3C) entries per process.
 316  */
 317 #define _SIGQSZ_DEFAULT         128     /* default number */
 318 #define _SIGQSZ_PRIVILEGED      512     /* privilege required to set abouve */
 319 #define _SIGQSZ_MAX             8192    /* max even with privilege */
 320 
 321 #define _SIGNOTIFY_MAX  32
 322 
 323 extern  void    setsigact(int, void (*)(int), const k_sigset_t *, int);
 324 extern  void    sigorset(k_sigset_t *, const k_sigset_t *);
 325 extern  void    sigandset(k_sigset_t *, const k_sigset_t *);
 326 extern  void    sigdiffset(k_sigset_t *, const k_sigset_t *);
 327 extern  void    sigintr(k_sigset_t *, int);
 328 extern  void    sigunintr(k_sigset_t *);
 329 extern  void    sigreplace(k_sigset_t *, k_sigset_t *);
 330 
 331 extern  int     kill(pid_t, int);
 332 
 333 #endif /* _KERNEL */
 334 
 335 #ifdef  __cplusplus
 336 }
 337 #endif
 338 
 339 #endif /* _SYS_SIGNAL_H */