mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-13 14:40:22 +00:00
Convert use of p_siglist and old SIG*() macros to use <sys/ksiginfo.h>
prototyped functions to get a sigset_t, and further to check for any queued signals, rather than an empty signal set, to go with the move to signal queues rather than signal sets.
This commit is contained in:
parent
425f8660a7
commit
70d4d0c0f5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104235
@ -42,6 +42,7 @@
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/ksiginfo.h>
|
||||
|
||||
#include <netipx/ipx.h>
|
||||
#include <netipx/ipx_var.h>
|
||||
@ -80,10 +81,10 @@ ncp_chkintr(struct ncp_conn *conn, struct proc *p)
|
||||
|
||||
if (p == NULL)
|
||||
return 0;
|
||||
tmpset = p->p_siglist;
|
||||
ksiginfo_to_sigset_t(p, &tmpset);
|
||||
SIGSETNAND(tmpset, p->p_sigmask);
|
||||
SIGSETNAND(tmpset, p->p_sigignore);
|
||||
if (SIGNOTEMPTY(p->p_siglist) && NCP_SIGMASK(tmpset))
|
||||
if (signal_queued(p, 0) && NCP_SIGMASK(tmpset))
|
||||
return EINTR;
|
||||
return 0;
|
||||
}
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/signalvar.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/ksiginfo.h>
|
||||
|
||||
#include <sys/iconv.h>
|
||||
|
||||
@ -75,10 +76,10 @@ smb_proc_intr(struct proc *p)
|
||||
|
||||
if (p == NULL)
|
||||
return 0;
|
||||
tmpset = p->p_siglist;
|
||||
ksiginfo_to_sigset_t(p, &tmpset);
|
||||
SIGSETNAND(tmpset, p->p_sigmask);
|
||||
SIGSETNAND(tmpset, p->p_sigignore);
|
||||
if (SIGNOTEMPTY(p->p_siglist) && SMB_SIGMASK(tmpset))
|
||||
if (signal_queued(p, 0) && SMB_SIGMASK(tmpset))
|
||||
return EINTR;
|
||||
return 0;
|
||||
}
|
||||
|
@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/syslog.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/ksiginfo.h>
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
@ -1239,10 +1240,10 @@ nfs_sigintr(struct nfsmount *nmp, struct nfsreq *rep, struct thread *td)
|
||||
return (0);
|
||||
|
||||
p = td->td_proc;
|
||||
tmpset = p->p_siglist;
|
||||
ksiginfo_to_sigset_t(p, &tmpset);
|
||||
SIGSETNAND(tmpset, p->p_sigmask);
|
||||
SIGSETNAND(tmpset, p->p_sigignore);
|
||||
if (SIGNOTEMPTY(p->p_siglist) && NFSINT_SIGMASK(tmpset))
|
||||
if (signal_queued(p, 0) && NFSINT_SIGMASK(tmpset))
|
||||
return (EINTR);
|
||||
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user