DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

ev_pop(S-osr5)


ev_pop -- pop the next event off the queue

Syntax

cc . . . -levent

#include  <sys/types.h>
#include  <sys/param.h>
#include  <sys/sysmacros.h>
#include  <sys/page.h>
#include  <sys/event.h>
#include  <mouse.h>

int ev_pop()

Description

ev_pop clears the next event off the queue and returns the number of events that were lost due to queue overrun since the last ev_pop call. An event queue must have been opened with ev_init and ev_open.

After an application is done with an event, the event is popped off the queue. The queue is of fixed size, so if events are not popped fast enough some might be lost due to overrun. A counter maintains the number of lost events. When ev_pop is called, it clears the top event off of the queue, clears the counter and returns the number of lost events. This should always be zero, unless a program stops reading its event queue. If the queue is empty, ev_pop returns -1.

When ev_pop is called, the most recent pointer returned by ev_read must be considered invalid, since that storage may be overwritten by the event driver.

Diagnostics

ev_pop returns -1 if there is not an open event queue. It returns -2 if there is nothing to pop because the queue is empty.

See also

ev_block(S-osr5), ev_close(S-osr5), ev_count(S-osr5), ev_flush(S-osr5), ev_getdev(S-osr5), ev_getemask(S-osr5), ev_gindev(S-osr5), ev_init(S-osr5), ev_open(S-osr5), ev_read(S-osr5), ev_resume(S-osr5), ev_setemask(S-osr5), ev_suspend(S-osr5)

Standards conformance

ev_pop is not part of any currently supported standard; it is an extension of AT&T System V provided by the Santa Cruz Operation.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005