Lines Matching defs:svr

64 static void _EatData32 ( FSServer *svr, unsigned long n );
131 _FSFlush(register FSServer *svr)
138 size = todo = svr->bufptr - svr->buffer;
139 bufindex = svr->bufptr = svr->buffer;
147 write_stat = _FSTransWrite(svr->trans_conn, bufindex, (int) todo);
153 _FSWaitForWritable(svr);
159 _FSWaitForWritable(svr);
164 (*_FSIOErrorFunction) (svr);
167 svr->last_req = (char *) &_dummy_request;
174 _FSReadEvents(register FSServer *svr)
185 if (_FSTransBytesReadable(svr->trans_conn, &pend_not_register) < 0)
186 (*_FSIOErrorFunction) (svr);
197 int qlen = svr->qlen;
199 _FSFlush(svr);
200 if (qlen != svr->qlen)
212 _FSRead(svr, buf, (long)pend);
218 _FSError(svr, (fsError *) ev);
220 _FSEnq(svr, ev);
223 } while (svr->head == NULL);
232 register FSServer *svr,
246 while ((bytes_read = _FSTransRead(svr->trans_conn, data, (int) size))
254 _FSWaitForReadable(svr);
260 (*_FSIOErrorFunction) (svr);
264 (*_FSIOErrorFunction) (svr);
277 register FSServer *svr,
299 while ((bytes_read = readv(svr->trans_conn->fd, iov, 2)) != size) {
315 _FSWaitForReadable(svr);
321 (*_FSIOErrorFunction) (svr);
325 (*_FSIOErrorFunction) (svr);
337 register FSServer *svr,
345 long svrbufsize = (svr->bufptr - svr->buffer);
392 InsertIOV(svr->buffer, svrbufsize)
397 if ((len = _FSTransWritev(svr->trans_conn, iov, i)) >= 0) {
402 _FSWaitForWritable(svr);
408 _FSWaitForWritable(svr);
411 (*_FSIOErrorFunction) (svr);
415 svr->bufptr = svr->buffer;
416 svr->last_req = (char *) &_dummy_request;
426 _FSAllocID(register FSServer *svr)
428 return (svr->resource_base + (svr->resource_id++ << svr->resource_shift));
437 * svr->last_request_read <= rep->sequenceNumber <= svr->request
444 register FSServer *svr,
450 newseq = (svr->last_request_read & ~((unsigned long) 0xffff)) |
452 lastseq = svr->last_request_read;
455 if (newseq > svr->request) {
458 newseq, svr->request,
465 svr->last_request_read = newseq;
476 register FSServer *svr,
487 unsigned long cur_request = svr->request;
490 _FSFlush(svr);
492 _FSRead(svr, (char *) rep, (long) SIZEOF(fsReply));
501 svr->last_request_read = cur_request;
503 (void) _FSSetLastRequestRead(svr, &rep->generic);
509 _EatData32(svr, rem_length);
517 _FSRead(svr, (char *) NEXTPTR(rep, fsReply), ((long) extra) << 2);
522 _FSRead(svr, (char *) NEXTPTR(rep, fsReply), ((long) extra) << 2);
524 _EatData32(svr, rem_length - extra);
532 _FSRead(svr, (char *) NEXTPTR(rep, fsReply), rem_length << 2);
533 (*_FSIOErrorFunction) (svr);
548 _FSRead(svr, (char *) &err + SIZEOF(fsReply),
550 serial = _FSSetLastRequestRead(svr, (fsGenericReply *) rep);
561 _FSRead(svr, (char *) &err_data, 4);
564 _FSRead(svr, (char *) &err_data, 4);
573 ext = svr->ext_procs;
577 (svr, &err, &ext->codes, &ret_code);
584 _FSError(svr, &err);
590 _FSEnq(svr, (fsEvent *) rep);
601 FSServer *svr,
610 _FSRead(svr, buf, bytes_read);
621 FSServer *svr,
624 _FSEatData(svr, n << 2);
635 register FSServer *svr,
647 (*_FSIOErrorFunction) (svr);
651 if ((*svr->event_vec[event->type & 0177]) (svr, &qelt->event, event)) {
652 if (svr->tail)
653 svr->tail->next = qelt;
655 svr->head = qelt;
657 svr->tail = qelt;
658 svr->qlen++;
673 register FSServer *svr, /* pointer to display structure */
682 event->type, svr);
691 register FSServer *svr, /* pointer to display structure */
700 re->type, svr);
724 _FSDefaultIOError(FSServer *svr)
734 FSServerString(svr) ? FSServerString(svr) : "");
737 FSNextRequest(svr) - 1, FSLastKnownRequestProcessed(svr),
738 FSQLength(svr));
754 FSServer *svr,
764 event.server = svr;
766 event.serial = _FSSetLastRequestRead(svr, (fsGenericReply *) rep);
771 return ((*_FSErrorFunction) (svr, &event));
784 FSServer *svr,
794 (void) FSGetErrorText(svr, event->error_code, buffer, BUFSIZ);
795 (void) FSGetErrorDatabaseText(svr, mtype, "FSError", "FS Error", mesg,
798 (void) FSGetErrorDatabaseText(svr, mtype, "MajorCode",
803 (void) FSGetErrorDatabaseText(svr, "FSRequest", number, "", buffer,
806 for (ext = svr->ext_procs;
819 (void) FSGetErrorDatabaseText(svr, mtype, "MinorCode",
824 (void) FSGetErrorDatabaseText(svr, "FSRequest", mesg, "", buffer,
829 (void) FSGetErrorDatabaseText(svr, mtype, "ResourceID", "ResourceID 0x%x",
833 (void) FSGetErrorDatabaseText(svr, mtype, "ErrorSerial", "Error Serial #%d",
837 (void) FSGetErrorDatabaseText(svr, mtype, "CurrentSerial",
839 (void) fprintf(fp, mesg, svr->request);
850 FSServer *svr,
853 if (_FSPrintDefaultError(svr, event, stderr) == 0)
879 FSServer *svr,
883 if (svr->bufptr + (len) <= svr->bufmax) {
884 memmove(svr->bufptr, data, len);
885 svr->bufptr += ((len) + 3) & ~3;
887 _FSSend(svr, data, len);