gtpc2m1zC/C++ Language Support User's Guide

evnwc-Wait for Event Completion

This function waits for the completion of a named event. It is used with the evntc and postc functions.

Format

#include  <tpfapi.h>
int       evnwc(struct ev0bk *evninf, enum t_evn_typ type);

evninf
A pointer to the evnwc parameter block. For more information about the evnwc parameter block, see struct ev0bk and struct tpf_ev0bk_list_data.

type
The type of event being completed. The argument must belong to the enumerated type t_evn_typ, defined in tpfapi.h. Use one of the predefined terms:

EVENT_MSK
for mask events

EVENT_CNT
for count events

EVENT_CB_Dx
where x is a single hexadecimal digit (0-F) for core events

EVENT_LIST
for list events.

Normal Return

An integer value of zero.

Error Return

One of the following:

Programming Considerations

Examples

The following example creates an event and waits for the event to complete.

#include <tpfeq.h>
struct ev0bk   event_blk;
enum t_evn_typ event_type;
char           caller_provided_name;
int            event_timeout;
enum t_state   event_state;

·
·
·
evntc(&event_blk, event_type, caller_provided_name, event_timeout, event_state); evnwc(&event_blk, event_type);

Related Information