CURSIG() is not a macro so rename it cursig().

Obtained from:	KSE tree
This commit is contained in:
julian 2002-05-29 23:44:32 +00:00
parent 2c79ab496a
commit 304195369e
6 changed files with 18 additions and 18 deletions

View File

@ -133,17 +133,17 @@ cv_switch_catch(struct thread *td)
/*
* We put ourselves on the sleep queue and start our timeout before
* calling CURSIG, as we could stop there, and a wakeup or a SIGCONT (or
* calling cursig, as we could stop there, and a wakeup or a SIGCONT (or
* both) could occur while we were stopped. A SIGCONT would cause us to
* be marked as SSLEEP without resuming us, thus we must be ready for
* sleep when CURSIG is called. If the wakeup happens while we're
* stopped, td->td_wchan will be 0 upon return from CURSIG.
* sleep when cursig is called. If the wakeup happens while we're
* stopped, td->td_wchan will be 0 upon return from cursig.
*/
td->td_flags |= TDF_SINTR;
mtx_unlock_spin(&sched_lock);
p = td->td_proc;
PROC_LOCK(p);
sig = CURSIG(p); /* XXXKSE */
sig = cursig(p); /* XXXKSE */
mtx_lock_spin(&sched_lock);
PROC_UNLOCK(p);
if (sig != 0) {
@ -286,7 +286,7 @@ cv_wait_sig(struct cv *cvp, struct mtx *mp)
PROC_LOCK(p);
if (sig == 0)
sig = CURSIG(p); /* XXXKSE */
sig = cursig(p); /* XXXKSE */
if (sig != 0) {
if (SIGISMEMBER(p->p_sigacts->ps_sigintr, sig))
rval = EINTR;
@ -443,7 +443,7 @@ cv_timedwait_sig(struct cv *cvp, struct mtx *mp, int timo)
PROC_LOCK(p);
if (sig == 0)
sig = CURSIG(p);
sig = cursig(p);
if (sig != 0) {
if (SIGISMEMBER(p->p_sigacts->ps_sigintr, sig))
rval = EINTR;

View File

@ -172,7 +172,7 @@ static int sigproptbl[NSIG] = {
* MP SAFE.
*/
int
CURSIG(struct proc *p)
cursig(struct proc *p)
{
PROC_LOCK_ASSERT(p, MA_OWNED);
@ -1530,10 +1530,10 @@ psignal(p, sig)
* Stop signals with default action are processed immediately, then cleared;
* they aren't returned. This is checked after each entry to the system for
* a syscall or trap (though this can usually be done without calling issignal
* by checking the pending signal masks in the CURSIG macro.) The normal call
* by checking the pending signal masks in cursig.) The normal call
* sequence is
*
* while (sig = CURSIG(curproc))
* while (sig = cursig(curproc))
* postsig(sig);
*/
int

View File

@ -468,12 +468,12 @@ msleep(ident, mtx, priority, wmesg, timo)
callout_reset(&td->td_slpcallout, timo, endtsleep, td);
/*
* We put ourselves on the sleep queue and start our timeout
* before calling CURSIG, as we could stop there, and a wakeup
* before calling cursig, as we could stop there, and a wakeup
* or a SIGCONT (or both) could occur while we were stopped.
* A SIGCONT would cause us to be marked as SSLEEP
* without resuming us, thus we must be ready for sleep
* when CURSIG is called. If the wakeup happens while we're
* stopped, td->td_wchan will be 0 upon return from CURSIG.
* when cursig is called. If the wakeup happens while we're
* stopped, td->td_wchan will be 0 upon return from cursig.
*/
if (catch) {
CTR3(KTR_PROC, "msleep caught: proc %p (pid %d, %s)", p,
@ -481,7 +481,7 @@ msleep(ident, mtx, priority, wmesg, timo)
td->td_flags |= TDF_SINTR;
mtx_unlock_spin(&sched_lock);
PROC_LOCK(p);
sig = CURSIG(p);
sig = cursig(p);
mtx_lock_spin(&sched_lock);
PROC_UNLOCK(p);
if (sig != 0) {
@ -524,8 +524,8 @@ msleep(ident, mtx, priority, wmesg, timo)
if (rval == 0 && catch) {
PROC_LOCK(p);
/* XXX: shouldn't we always be calling CURSIG() */
if (sig != 0 || (sig = CURSIG(p))) {
/* XXX: shouldn't we always be calling cursig() */
if (sig != 0 || (sig = cursig(p))) {
if (SIGISMEMBER(p->p_sigacts->ps_sigintr, sig))
rval = EINTR;
else

View File

@ -200,7 +200,7 @@ ast(framep)
if (sflag & PS_NEEDSIGCHK) {
mtx_lock(&Giant);
PROC_LOCK(p);
while ((sig = CURSIG(p)) != 0)
while ((sig = cursig(p)) != 0)
postsig(sig);
PROC_UNLOCK(p);
mtx_unlock(&Giant);

View File

@ -249,7 +249,7 @@ ncp_sock_rselect(struct socket *so,struct proc *p, struct timeval *tv, int event
PROC_UNLOCK(p);
done_noproclock:
if (error == ERESTART) {
/* printf("Signal: %x", CURSIG(p));*/
/* printf("Signal: %x", cursig(p));*/
error = 0;
}
return (error);

View File

@ -234,7 +234,7 @@ extern struct mtx sigio_lock;
/*
* Machine-independent functions:
*/
int CURSIG(struct proc *p);
int cursig(struct proc *p);
void execsigs(struct proc *p);
void gsignal(int pgid, int sig);
int issignal(struct proc *p);