Lines Matching refs:sr
98 smb_notify_common(smb_request_t *sr, mbuf_chain_t *mbc,
105 if (sr->fid_ofile == NULL)
108 node = sr->fid_ofile->f_node;
119 nc = &sr->sr_ncr;
128 smb_node_fcn_subscribe(node, sr);
137 mutex_enter(&sr->sr_mutex);
138 if (sr->sr_state == SMB_REQ_STATE_ACTIVE)
139 sr->sr_state = SMB_REQ_STATE_WAITING_EVENT;
140 while (sr->sr_state == SMB_REQ_STATE_WAITING_EVENT) {
141 cv_wait(&nc->nc_cv, &sr->sr_mutex);
143 if (sr->sr_state == SMB_REQ_STATE_EVENT_OCCURRED)
144 sr->sr_state = SMB_REQ_STATE_ACTIVE;
145 mutex_exit(&sr->sr_mutex);
150 smb_node_fcn_unsubscribe(node, sr);
155 switch (sr->sr_state) {
188 status = smb_notify_encode_action(sr, mbc,
219 smb_notify_encode_action(struct smb_request *sr, mbuf_chain_t *mbc,
233 if (smb_mbc_encodef(mbc, "%lllU", sr,
250 smb_request_t *sr;
260 sr = smb_slist_head(list);
261 while (sr) {
262 SMB_REQ_VALID(sr);
263 if (sr->sr_state == SMB_REQ_STATE_WAITING_EVENT &&
264 sr->fid_ofile == of) {
265 smb_request_cancel(sr);
267 sr = smb_slist_next(list, sr);
310 smb_request_t *sr;
321 sr = list_head(&fcn->fcn_watchers);
322 while (sr) {
323 smb_notify_sr(sr, action, name);
324 sr = list_next(&fcn->fcn_watchers, sr);
393 smb_notify_sr(smb_request_t *sr, uint_t action, const char *name)
398 SMB_REQ_VALID(sr);
399 ncr = &sr->sr_ncr;
408 mutex_enter(&sr->sr_mutex);
409 if (sr->sr_state == SMB_REQ_STATE_WAITING_EVENT &&
411 sr->sr_state = SMB_REQ_STATE_EVENT_OCCURRED;
421 mutex_exit(&sr->sr_mutex);