Chapter Contents

Previous

Next
WAIT

WAIT



Wait for the POST of One or More ECB's

Portability: SAS/C extension


SYNOPSIS
DESCRIPTION
CAUTION
EXAMPLE
RELATED FUNCTIONS


SYNOPSIS

#include <ostask.h>

void WAIT1(unsigned *ecbaddr);

void WAITM(int n, unsigned **ecblist);


DESCRIPTION

The SAS/C WAIT macros implement the functionality of the OS/390 Assembler WAIT macro.

WAIT1 waits for a single ECB to be posted. The ecbaddr argument addresses the ECB.

WAITM waits for one or more of a list of ECBs to be posted. The argument n to WAITM specifies the number of ECBs which must be posted before execution resumes. The argument ecblist points to a list of ECB addresses to be waited on. The last address in the list must be flagged by turning on the high-order bit of the address.


CAUTION

WAIT1 and WAITM can be used in either an SPE environment or a full run-time library environment. However, when using the full library, you should consider using ecbsuspend to wait for an ECB POST because this also allows the wait to be interrupted by a C signal.


EXAMPLE

#include <ostask.h>

unsigned myecb = 0, yourecb = 0, theirecb = 0;

unsigned *ecblist[3];

ecblist[0] = &myecb;
ecblist[1] = &yourecb;
ecblist[2] = (unsigned *) (0x80000000 | (unsigned) &theirecb));
WAITM(1, ecblist);                   /* Wait on one of three ECBs. */


RELATED FUNCTIONS

ecbsuspend , POST


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.