convert to use <queue.h> and add a lock for siginfo circleq.
XXX: could use STAILQ, but there is no way to remove an element without rescanning the queue. We should really add a special iterator that can do this.
This commit is contained in:
parent
b99a361614
commit
3bb05d4a8c
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: siginfo.h,v 1.3 2003/09/14 07:00:45 christos Exp $ */
|
/* $NetBSD: siginfo.h,v 1.4 2003/09/16 12:04:58 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||||
|
@ -40,6 +40,7 @@
|
||||||
#define _SYS_SIGINFO_H_
|
#define _SYS_SIGINFO_H_
|
||||||
|
|
||||||
#include <machine/signal.h> /* XXX: __HAVE_SIGINFO */
|
#include <machine/signal.h> /* XXX: __HAVE_SIGINFO */
|
||||||
|
#include <sys/queue.h>
|
||||||
|
|
||||||
typedef union sigval {
|
typedef union sigval {
|
||||||
int sival_int;
|
int sival_int;
|
||||||
|
@ -79,8 +80,7 @@ struct ksiginfo {
|
||||||
int _fd;
|
int _fd;
|
||||||
} _poll;
|
} _poll;
|
||||||
} _reason;
|
} _reason;
|
||||||
struct ksiginfo *ksi_next;
|
CIRCLEQ_ENTRY(ksiginfo) _list;
|
||||||
struct ksiginfo *ksi_prev;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef union siginfo {
|
typedef union siginfo {
|
||||||
|
@ -125,6 +125,8 @@ typedef struct ksiginfo ksiginfo_t;
|
||||||
|
|
||||||
#define ksi_band _reason._poll._band
|
#define ksi_band _reason._poll._band
|
||||||
#define ksi_fd _reason._poll._fd
|
#define ksi_fd _reason._poll._fd
|
||||||
|
|
||||||
|
#define ksi_list _list
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** si_code */
|
/** si_code */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: signalvar.h,v 1.43 2003/09/14 07:00:46 christos Exp $ */
|
/* $NetBSD: signalvar.h,v 1.44 2003/09/16 12:04:58 christos Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1991, 1993
|
* Copyright (c) 1991, 1993
|
||||||
|
@ -34,6 +34,8 @@
|
||||||
#ifndef _SYS_SIGNALVAR_H_ /* tmp for user.h */
|
#ifndef _SYS_SIGNALVAR_H_ /* tmp for user.h */
|
||||||
#define _SYS_SIGNALVAR_H_
|
#define _SYS_SIGNALVAR_H_
|
||||||
|
|
||||||
|
#include <sys/lock.h>
|
||||||
|
#include <sys/queue.h>
|
||||||
/*
|
/*
|
||||||
* Kernel signal definitions and data structures,
|
* Kernel signal definitions and data structures,
|
||||||
* not exported to user programs.
|
* not exported to user programs.
|
||||||
|
@ -61,7 +63,8 @@ struct sigctx {
|
||||||
char ps_sigcheck; /* May have deliverable signals. */
|
char ps_sigcheck; /* May have deliverable signals. */
|
||||||
int ps_sigwaited; /* Delivered signal from wait set */
|
int ps_sigwaited; /* Delivered signal from wait set */
|
||||||
sigset_t ps_sigwait; /* Signals being waited for */
|
sigset_t ps_sigwait; /* Signals being waited for */
|
||||||
struct ksiginfo *ps_siginfo; /* for SA_SIGINFO */
|
struct simplelock ps_silock; /* Lock for ps_siginfo */
|
||||||
|
CIRCLEQ_HEAD(, ksiginfo) ps_siginfo;/* for SA_SIGINFO */
|
||||||
|
|
||||||
/* This should be copied on fork */
|
/* This should be copied on fork */
|
||||||
#define ps_startcopy ps_sigstk
|
#define ps_startcopy ps_sigstk
|
||||||
|
|
Loading…
Reference in New Issue