Operating-System-Simulator / Sim01 / datatypes.h
datatypes.h
Raw
#ifndef DATATYPES_H
#define DATATYPES_H

#include <stdio.h>

typedef struct OpCodeType
{
 int pid;               // pid, added when PCB is created
 char command[ 5 ];     // three letter command quantity
 char inOutArg[ 5 ];    // for device in/out
 char strArg1[ 15 ];    // arg 1 descriptor, up to 12 chars
 int intArg2;           // cycles or memory, assumes 4 byte int
 int intArg3;           // memory, assumes 4 byte int
                        // also non/preemption indicator
 double opEndTime;      // size of time string returned from accessTimer
 struct OpCodeType *nextNode; // pointer to next node as needed
}OpCodeType;

typedef struct ConfigDataType
{
 double version;
 char *metaDataFileName[ 100 ];
 int cpuSchedCode;
 int quantumCycles;
 int memAvailable;
 int procCycleRate;
 int ioCycleRate;
 int logToCode;
 char *logToFileName[ 100 ];
}ConfigDataType;

#endif // DATATYPES.h