/*-------- To: ssc-vax!uw-beaver!info-iris@SUMEX-AIM.arpa Date: Mon, 20 Oct 86 14:59:59 PDT From: ssc-vax!voodoo!bhagwan@beaver.cs.washington.edu (A. L. McPherson) Subject: Some queue problems. X-Mailer: ELM [version 1.2] Greetings, I've been playing with queued devices on my 2400T lately and have run into some problems. I'm posting them for general info but if anyone has a fix or workaround I'd like to hear it. SGI has been notified of these problems. Problem 1: GL2 has a limit of 50 queue entries. This is undocumented as far as I can tell. When the queue is full there is no notification of it. Queued device interaction is lost until something is removed from the queue. Problem 2: Qreset doesn't appear to work as documented. It is supposed to clear all entries from the queue. It does and it doesn't. See the following short test program: --------*/ /* * Title: qt - test some possible bugs in the IRIS queues * * Description: IRIS queued devices appear to have some problems. * The following program tries to duplicate errors * I've recently experienced. It appears to be a * timimg problem. */ #include "gl.h" #include "device.h" main () { Device dev, val; long i; winopen ("qt"); qdevice (MIDDLEMOUSE); printf ("\nTest started\n\n"); /* * The next statement will print the RIGHTMOUSE hit that attached * to the process */ printf ("%d: dev = %d, val = %d\n", i++, dev = qread (&val), val); /* * Now, while waiting for the LEFTMOUSE hit, press BPAD0 a few times * to get some entries into the queue */ while (!getbutton (LEFTMOUSE)); /* This will print the first queue entry. Val is wrong. Should be 0 * since the first entry is the button "down" or "press" */ printf ("%d: dev = %d, val = %d\n", i++, dev = qread (&val), val); /* * Now, reset the queue. */ qreset (); /* * The next statement blocks for queue entries (as it should). * So, press it once to move on. "val" is wrong here too, as above. */ printf ("%d: dev = %d, val = %d\n", i++, dev = qread (&val), val); printf ("%d: dev = %d, val = %d\n", i++, dev = qread (&val), val); /* * OK, things are almost correct to this point (except for the incorrect * "val" above. * * The queue should be empty but let's reset it just to be sure. */ qreset (); /* The following should wait for a queue entry. Press and release * MIDDLEMOUSE rapidly. */ printf ("%d: dev = %d, val = %d\n", i++, dev = qread (&val), val); /* * OK, reset the queue (should empty the "up" or "release" entry) */ qreset (); /* Alas, that entry is still there. THIS STATEMENT DOES NOT BLOCK. * It should. */ printf ("%d: dev = %d, val = %d\n", i++, dev = qread (&val), val); printf ("\nTest ended\n"); gexit (); } /*-------- This is the output the above code produced on my 2400T: Test started 0: dev = 534, val = 0 1: dev = 102, val = 1 2: dev = 102, val = 1 3: dev = 102, val = 1 4: dev = 102, val = 0 5: dev = 102, val = 1 Test ended Well, that's it. Any help would be appreciated. Otherwise, watch out for queued IO in your applications. Al McPherson Voodoo Graphics Project Boeing Computer Services ....uw-beaver!ssc-vax!voodoo!bhagwan Everett, Washington (206) 342-1442 --------*/