diff options
author | faith <faith> | 2000-02-12 10:52:50 +0000 |
---|---|---|
committer | faith <faith> | 2000-02-12 10:52:50 +0000 |
commit | 13d0f42734769a5d77ded61e3fa51753f22ed016 (patch) | |
tree | c06dcaf2d49e6905e5cc33912ec633fba7f8a694 | |
parent | b3198a045e30ec5c76807c53988d9ba85489a0b1 (diff) |
Add XF86SmtWrapPointer and XF86SmtSyncPointer functions
to synchronize early wrapping of circular buffer pointers.
-rw-r--r-- | xc/programs/Xserver/Xext/xf86smt.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/xc/programs/Xserver/Xext/xf86smt.c b/xc/programs/Xserver/Xext/xf86smt.c index 9baf42682..13903beaa 100644 --- a/xc/programs/Xserver/Xext/xf86smt.c +++ b/xc/programs/Xserver/Xext/xf86smt.c @@ -75,6 +75,8 @@ extern void XFree86SMTWriteBufferEmptyEvent(ClientPtr client, static DISPATCH_PROC(ProcXF86SMTDispatch); static DISPATCH_PROC(ProcXF86SMTQueryVersion); static DISPATCH_PROC(ProcXF86SMTOpen); +static DISPATCH_PROC(ProcXF86SMTWrapPointer); +static DISPATCH_PROC(ProcXF86SMTSyncPointer); static DISPATCH_PROC(SProcXF86SMTDispatch); static void XF86SMTResetProc (ExtensionEntry *extEntry) @@ -143,6 +145,12 @@ void XFree86SMTWriteBufferEmptyEvent(ClientPtr client, int sequenceNumber) ev.type = XF86SmtEventBase + XF86SmtBufferEmptyEvent; ev.sequenceNumber = sequenceNumber; +#if 1 /* FIXME: for debugging only */ + ev.pad2 = 0; + ev.pad3 = 33335555; + ev.pad4 = 12344321; + ev.pad6 = 20202020; +#endif WriteEventsToClient(client, 1, (xEvent *)&ev); /* Cast to OsCommPtr for LBX #define. */ FlushClient(client, (OsCommPtr)client->osPrivate, NULL, 0); @@ -201,6 +209,29 @@ static int ProcXF86SMTOpen(ClientPtr client) return client->noClientException; } +static int ProcXF86SMTWrapPointer(ClientPtr client) +{ + REQUEST(xXF86SmtWrapPointerReq); + + REQUEST_SIZE_MATCH(xXF86SmtWrapPointerReq); + _XSERVTransSmtWrapPointer(((OsCommPtr)client->osPrivate)->trans_conn); + return client->noClientException; +} + +static int ProcXF86SMTSyncPointer(ClientPtr client) +{ + xXF86SmtSyncPointerReply rep; + REQUEST(xXF86SmtSyncPointerReq); + + REQUEST_SIZE_MATCH(xXF86SmtSyncPointerReq); + _XSERVTransSmtWrapPointer(((OsCommPtr)client->osPrivate)->trans_conn); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + WriteToClient(client, sizeof(xXF86SmtSyncPointerReply), (char *)&rep); + return client->noClientException; +} + static int SProcXF86SMTDispatch (ClientPtr client) { return XF86SmtErrorBase + XF86SmtClientNotLocal; @@ -216,6 +247,8 @@ static int ProcXF86SMTDispatch (ClientPtr client) switch (stuff->data){ case X_XF86SmtQueryVersion: return ProcXF86SMTQueryVersion(client); case X_XF86SmtOpen: return ProcXF86SMTOpen(client); + case X_XF86SmtWrapPointer: return ProcXF86SMTWrapPointer(client); + case X_XF86SmtSyncPointer: return ProcXF86SMTSyncPointer(client); default: return BadRequest; } |