timer.h


/*************************************************************************
*                                                                        *
*   Header: timer.h                                                      *
*                                                                        *
*   realizzato dal Gruppo 17 di Lab2 Anno Accademico 1995/96             *
*                                                                        *
*   Lorenzo     Claudio       Valerio    Riccardo    Emiliano            *
*   Coronati    Lanconelli    Paolini    Solmi       Trentini            *
*                                                                        *
**************************************************************************/

#ifndef _TIMER_H
#define _TIMER_H

#include "../h/const.h"
#include "../h/supconst.h"
#include "../h/queue.e"

#define TICKPERSEC  (SECOND / CLOCKINTERVAL)

typedef struct timeq_t {
    struct timeq_t *tq_next;
    thr_t *tq_client;
    long tq_alarm;
} timeq_t;

#define initTimeQueue() (tqfp = initQueue(timeqTable, MAXTIMEQ, sizeof(timeq_t)))
#define allocTimeQueue() ((timeq_t *) AllocQueue(&tqfp))
#define freeTimeQueue(p) freeQueue(p, &tqfp)

#endif


[INDICE CODICE]