Chapter Contents

Previous

Next
STIMERM...

STIMERM...



Define, Test, or Cancel a Real Time Interval

Portability: SAS/C extension


SYNOPSIS
DESCRIPTION
RETURN VALUE
CAUTIONS
RELATED FUNCTIONS


SYNOPSIS

#include <spetask.h>

int STIMERM_SET(void *exit, void *parm, unsigned *idaddr, unit,
                void *intvl, wait);

int STIMERM_TEST(unsigned *idaddr, unit, void *intvl);

int STIMERM_CANCEL(unsigned *idaddr, unit, void *intvl);


DESCRIPTION

The SAS/C STIMERM macros implement the functionality of the OS/390 Assembler STIMERM macro. These macros are supported only with the Systems Programming Environment (SPE).

STIMER_SET
specifies a real-time interval and how its expiration is to be handled. The exit argument is the address of code to be called as a timer exit when the interval is complete. The exit argument should ordinarily be specified as a call to the bldexit function, whose first argument is the address of the C function which is to be defined as the exit. The parm argument is a pointer to be made available to the exit routine when it runs. The idaddr argument is the address of an unsigned area where an id value can be stored by the STIMERM SVC. The unit argument must TUINTVL , BINTVL , MICVL , DINTVL , GMT , or TOD . The intvl argument should be a pointer to an area specifying the time interval or time of expiration. The size and interpretation of this data depends on the unit, as described in the IBM publication Services for Assembler Language Programs. The wait argument indicates whether the program should be suspended until the interval expires and must be either WAIT or NOWAIT . If you specify WAIT , the exit argument should be 0 .

STIMER_TEST
tests the amount of time remaining of a real-time interval defined by STIMERM_SET . The idaddr argument specifies the address of an unsigned area containing the ID of the interval to be tested. The unit argument indicates the format in which the remaining time is to be stored and must be either TU or MIC . The intvl argument specifies the address where the amount of time remaining should be stored. The size and interpretation of this data depends on the unit, as described in the IBM publication Application Development Reference: Services for Assembler Language Programs.

STIMERM_CANCEL
cancels one or more time intervals established with STIMERM_SET . The idaddr argument specifies the address of an area containing the ID of the timer interval to be cancelled. idaddr may also be specified as 0 to cancel all intervals. The unit argument specifies the form in which the remaining time is to be stored and must be either TU or MIC . The intvl address specifies the address where the amount of time remaining in the cancelled interval should be stored. It should be specified as 0 if idaddr is also 0 . The size and interpretation of the intvl data depends on the unit, as described in the IBM publication Application Development Reference: Services for Assembler Language.


RETURN VALUE

The STIMERM macros return the value that is returned in register 15 by the assembler STIMERM macro.


CAUTIONS

The STIMERM macros should not be used in code that runs with the full library since the bldexit function cannot be used in such programs.

Similar functionality to STIMERM can be obtained with the full library using the functions alarm or sleep .


RELATED FUNCTIONS

STIMER , TTIMER , alarm , sleep


Chapter Contents

Previous

Next

Top of Page

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