Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ev_pop(S) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought


 ev_pop(S)                      6 January 1993                      ev_pop(S)


 Name

    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

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

    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 evpop 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, evpop returns -1.

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

 Diagnostics

    evpop 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

    evblock(S), evclose(S), evcount(S), evflush(S), evgetdev(S),
    evgetemask(S), evgindev(S), evinit(S), evopen(S), evread(S),
    evresume(S), evsetemask(S), evsuspend(S)

 Standards conformance

    evpop is not part of any currently supported standard; it is an exten-
    sion of AT&T System V provided by the Santa Cruz Operation.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026