home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
TIMEXSRC.ZIP
/
BA_TIMEX.H
< prev
next >
Wrap
Text File
|
1990-03-26
|
2KB
|
61 lines
/* ba_timex.h -- Definitions for timexba, the background agent.
1990 M. Mallett, Personal Workstation Magazine
*/
#ifndef H_BA_TIMEX /* Let multiple inclusions work */
#define H_BA_TIMEX
/* Version information */
#define BAVERMAJ 1 /* Major version */
#define BAVERMIN 0 /* Minor version */
/* Configuration and control constants */
#define EVSTACKSIZE 8192 /* Size of event thread stack */
#define HZ 60 /* Resolution of times() clock */
#define SLEEPINCR ((LONG)60*1000) /* Maximum sleep interval (ms) */
/* Semaphore names */
#define EVSEMNAME "\\SEM\\TXBAEVNT"
/* Error codes */
#define EC_UNKACTION (EC_OTHER+1) /* Unknown action */
#define EC_SEMAPHORE (EC_OTHER+2) /* Semaphore problem */
/*
*//* structures */
typedef /* pending event structure */
struct pevent {
struct pevent *pe_nextP; /* Ptr to next one */
struct pevent *pe_prevP; /* Ptr to previous one */
time_t pe_ntime; /* Next fire time */
EVENT *pe_eventP; /* Standard event stuff */
} PEVENT;
/* Prototypes for common functions used in TIMEXBA */
void get_sem( char *facP, char *itemP, HSEM sem );
void log( char *fmtP, ... );
void process_request( void );
void rel_sem( char *facP, char *itemP, HSEM sem );
void schedule( PEVENT *eventP );
void schedule_events( void );
void set_priority( TID tid, int class, int value );
int stscheck1( int status, char *funcnameP, char *argP );
void unschedule( PEVENT *eventP );
#endif /* H_BA_TIMEX */