XlPrivateRequests.mesa
Copyright Ó 1990, 1991 by Xerox Corporation. All rights reserved.
Christian Jacobi, December 17, 1990 4:46:22 pm PST
Christian Jacobi, February 27, 1992 2:12 pm PST
DIRECTORY Basics, IO, Xl, XlPrivate;
XlPrivateRequests:
CEDAR
DEFINITIONS
IMPORTS Basics, IO, XlPrivate
SHARES Xl, XlPrivate
~ BEGIN OPEN Xl;
An alternate way to generate requests
crazyByteSwapped:
BOOL =
BYTES[
INT]=2;
--recognize dorado because of crazy byteswapping
Next:
PROC [c: Connection] =
INLINE {
Advances the sequence number.
c.sequenceNumber ¬ Basics.LowHalf[c.sequenceNumber+1];
};
RequestWithDetails:
UNSAFE
PROC [c: Connection, p:
LONG
POINTER, byteCount:
INT, details: Details] =
INLINE {
Makes complete request without waiting for a reply.
Assumes p to be completely set up, and, already byte swapped.
Next[c];
IO.UnsafePutBlock[c.xmit, [base: LOOPHOLE[p], startIndex: 0, count: byteCount]];
XlPrivate.FinishWithDetails[c, details];
};
RequestWithReply:
UNSAFE
PROC [c: Connection, p:
LONG
POINTER, byteCount:
INT]
RETURNS [reply: XlPrivate.Reply ¬
NIL] =
INLINE {
Makes complete request and returns a reply.
Assumes p to be completely set up, and, already byte swapped.
Next[c];
IO.UnsafePutBlock[c.xmit, [base: LOOPHOLE[p], startIndex: 0, count: byteCount]];
reply ¬ XlPrivate.FinishWithReply[c]
};
RequestIncomplete:
UNSAFE
PROC [c: Connection, p:
LONG
POINTER, byteCount:
INT] =
INLINE {
Starts a request but doesnt finish it.
Assumes p to be already byte swapped.
Next[c];
IO.UnsafePutBlock[c.xmit, [base: LOOPHOLE[p], startIndex: 0, count: byteCount]];
};
FinishRequestWithDetails:
PROC [c: Connection, details: Details] =
INLINE {
Mumbo jumbo to finish a request started with RequestIncomplete.
XlPrivate.FinishWithDetails[c, details];
};
FinishRequestWithReply:
PROC [c: Connection]
RETURNS [reply: XlPrivate.Reply ¬
NIL] =
INLINE {
Mumbo jumbo to finish a request started with RequestIncomplete.
reply ¬ XlPrivate.FinishWithReply[c]
};
END.