Hi, I'm a student on Computer Science, and I need an help. For my
experiments I need to trace the requests which arrive to the X server.
I need to know where is the right point when the server schedule the
requests. <br>
After the study of the 7.2 version code I try to put my function in that point:<br>1. create a client:<br>I put it in xorg-server/os/connection.c:<br>static ClientPtr AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time){
<br>...<br>trc_creation(client->index<div id="mb_0">,GetTimeInMillis());<br>return client;<br>}<br><br>2 .activation of a task(client):<br>xorg-server/os/WaitFor.c:<br>int<br>WaitForSomething(int *pClientsReady){<br>...
<br>while (clientsReadable.fds_bits
[i])<br> {<br> int client_priority, client_index;<br><br> curclient = ffs (clientsReadable.fds_bits[i]) - 1;<br> client_index = /* raphael: modified */<br> ConnectionTranslation[curclient + (i * (sizeof(fd_mask) * 8))];
<br> trc_begin(client_index,GetTimeInMillis());<br> ....<br>}<br><br><br>3. schedule and deschedule the request of a client<br>xorg-server/dix/dispatch.c:<br>I think that this two call are in the correct place..
<br><br>4. deactivation of the task(client)<br>xorg-server/dix/dispatch.c:<br>I put it before the break statement on the loop in the dispatch function:<br>void Dispatch(void)<br>{<br>while (!isItTimeToYield){<br>...<br>if (result <= 0)
<br> {<br> trc_end(client->index,GetTimeInMillis()); <br> if (result < 0)<br> CloseDownClient(client);<br> break;<br> }<br>...<br>}<br><br>Is it the correct way to trace the requests?
<br>Thanks a lot<br>Nicola M.</div>