#ifndef _DISK_H
#define _DISK_H
#include "../h/types.h"
#include "../h/supconst.h"
typedef struct dreq_t {
int dr_op;
int dr_unused;
int dr_track;
int dr_sector;
} dreq_t;
typedef struct diskq_t {
struct diskq_t *dq_next;
thr_t *dq_client; /* thread che ha richiesto il servizio */
int dq_sector; /* numero del settore */
int dq_track; /* numero di traccia */
int dq_op; /* operazione: READ o WRITE */
} diskq_t;
#define initDiskQueue() (dqfp = initQueue(diskqTable, MAXDISKQ, sizeof(diskq_t)))
#define allocDiskQueue() ((diskq_t *) AllocQueue(&dqfp))
#define freeDiskQueue(p) freeQueue(p, &dqfp)
#define outDiskQueue(p) outQueue(&dreq_queue, p)
#define nextDiskQueue(p) ( ((p) == (p)->dq_next) ? ((diskq_t *)NULL) : (p)->dq_next )
#define NO_OP -1
#endif