Sun Microsystems 800-1256-04 — Sun Microsystems 800-1256-04 SunCGI Reference Manual PDF (EN)

96 SunCGI Reference Manual 0 from the head of the event queue. typedef enum { NOT_VALID, EMPTY, NON_EMPTY, ALMOST_FULL, FULL Cqtype; qstat is set to EMPTY if the event queue has no pending events. qstat is set to NON_EMPTY if the evem queue has events pending, but is not FULL or ALMOST_FULL. qstat is set to ALMOST_FUUifthere is room for only one more event on the evem queue. qstat is set to FULL if there is no room for more events on the event queue. The argument overflow indicates whether the event queue has overflowed or not. The enumerated type Ceqflow contains the following values: typedef enum NO_OFLO, OFLO Ceqflow; Errors ENOTVSAC [4] CGI not in proper state:

CGI shall be in state VSAC. 0 EINQOVFL [97] Input queue has overflowed. Flush Event Queue Cerror flush_event_queue() flush_event_queue discards all events in the evemqueue. The purpose of flush_event_queue is to return the event queue to a stable state (NO_OFLO). flush_event_queue does not affect the state of input devices. This function should be used carefully to avoid throwing away mouse-ahead or type-ahead inputs. Errors ENOTOPOP [5] CGI not in proper state CGI shall be in either in state VDOP, VSOP, or VSAC.

Selective Flush of Event Queue Cerror selective_flush_of_event_queue(devclass, devnum) Cdevoff devclass; /* device type*/ Cint devnum; /* device number*/ selective_flush_of_event_queue discards all events in the event queue which were generated by a specified device. selective flush of event queue does not affect the state of the specified input device.- devclass and devnum must refer to an existing and ini- tialized device or an error is produced. However, no error is returned if no events from the specified device are pending. 0 Errors ENOTOPOP [5] CGI not in proper state CGI shall be in either in state VDOP, VSOP, or VSAC. Version C of 17 March 1986