version 1.83, 2010/11/12 17:46:09 |
version 1.84, 2010/11/15 20:31:41 |
Line 378 puffs_msg_enqueue(struct puffs_mount *pm |
|
Line 378 puffs_msg_enqueue(struct puffs_mount *pm |
|
if (__predict_false((park->park_flags & PARKFLAG_WANTREPLY) |
if (__predict_false((park->park_flags & PARKFLAG_WANTREPLY) |
&& (park->park_flags & PARKFLAG_CALL) == 0 |
&& (park->park_flags & PARKFLAG_CALL) == 0 |
&& (l->l_flag & LW_PENDSIG) != 0 && sigispending(l, 0))) { |
&& (l->l_flag & LW_PENDSIG) != 0 && sigispending(l, 0))) { |
park->park_flags |= PARKFLAG_HASERROR; |
sigset_t ss; |
preq->preq_rv = EINTR; |
|
if (PUFFSOP_OPCLASS(preq->preq_opclass) == PUFFSOP_VN |
/* |
&& (preq->preq_optype == PUFFS_VN_INACTIVE |
* see the comment about signals in puffs_msg_wait. |
|| preq->preq_optype == PUFFS_VN_RECLAIM)) { |
*/ |
park->park_preq->preq_opclass |= PUFFSOPFLAG_FAF; |
sigpending1(l, &ss); |
park->park_flags &= ~PARKFLAG_WANTREPLY; |
if (sigismember(&ss, SIGINT) || |
DPRINTF(("puffs_msg_enqueue: converted to FAF %p\n", |
sigismember(&ss, SIGTERM) || |
park)); |
sigismember(&ss, SIGKILL) || |
} else { |
sigismember(&ss, SIGHUP) || |
return; |
sigismember(&ss, SIGQUIT)) { |
|
park->park_flags |= PARKFLAG_HASERROR; |
|
preq->preq_rv = EINTR; |
|
if (PUFFSOP_OPCLASS(preq->preq_opclass) == PUFFSOP_VN |
|
&& (preq->preq_optype == PUFFS_VN_INACTIVE |
|
|| preq->preq_optype == PUFFS_VN_RECLAIM)) { |
|
park->park_preq->preq_opclass |= |
|
PUFFSOPFLAG_FAF; |
|
park->park_flags &= ~PARKFLAG_WANTREPLY; |
|
DPRINTF(("puffs_msg_enqueue: " |
|
"converted to FAF %p\n", park)); |
|
} else { |
|
return; |
|
} |
} |
} |
} |
} |
|
|
Line 426 puffs_msg_enqueue(struct puffs_mount *pm |
|
Line 439 puffs_msg_enqueue(struct puffs_mount *pm |
|
int |
int |
puffs_msg_wait(struct puffs_mount *pmp, struct puffs_msgpark *park) |
puffs_msg_wait(struct puffs_mount *pmp, struct puffs_msgpark *park) |
{ |
{ |
|
lwp_t *l = curlwp; |
|
proc_t *p = l->l_proc; |
struct puffs_req *preq = park->park_preq; /* XXX: hmmm */ |
struct puffs_req *preq = park->park_preq; /* XXX: hmmm */ |
|
sigset_t ss; |
|
sigset_t oss; |
int error = 0; |
int error = 0; |
int rv; |
int rv; |
|
|
|
/* |
|
* block unimportant signals. |
|
* |
|
* The set of "important" signals here was chosen to be same as |
|
* nfs interruptible mount. |
|
*/ |
|
sigfillset(&ss); |
|
sigdelset(&ss, SIGINT); |
|
sigdelset(&ss, SIGTERM); |
|
sigdelset(&ss, SIGKILL); |
|
sigdelset(&ss, SIGHUP); |
|
sigdelset(&ss, SIGQUIT); |
|
mutex_enter(p->p_lock); |
|
sigprocmask1(l, SIG_BLOCK, &ss, &oss); |
|
mutex_exit(p->p_lock); |
|
|
mutex_enter(&pmp->pmp_lock); |
mutex_enter(&pmp->pmp_lock); |
puffs_mp_reference(pmp); |
puffs_mp_reference(pmp); |
mutex_exit(&pmp->pmp_lock); |
mutex_exit(&pmp->pmp_lock); |
Line 503 puffs_msg_wait(struct puffs_mount *pmp, |
|
Line 536 puffs_msg_wait(struct puffs_mount *pmp, |
|
puffs_mp_release(pmp); |
puffs_mp_release(pmp); |
mutex_exit(&pmp->pmp_lock); |
mutex_exit(&pmp->pmp_lock); |
|
|
|
mutex_enter(p->p_lock); |
|
sigprocmask1(l, SIG_SETMASK, &oss, NULL); |
|
mutex_exit(p->p_lock); |
|
|
return rv; |
return rv; |
} |
} |
|
|