Listing 2 Constants for semaphore class

//**************************************************
//  Listing 2
//
//  FILE NAME   : defines.h
//  AUTHOR      : Matt Weisfeld
//
//  DESCRIPTION : constants for semaphore class
//**************************************************
#ifndef DEFINES_H
#define DEFINES_H

#ifdef UNIX
#define FILENAME "file.txt"
#endif
#ifdef DOS
#define FILENAME "g:\\file.txt"
#endif

const ORIGIN=0;          // used for fseek() call
const MAX_NODES=10;       // the maximum number of nodes
const FILE_LENGTH=200;   // the maximum file name length

enum cs_state {     // possible critical section states
   IDLE,          // process is currently idle
   WANT_IN,       // process wants to enter critical section
   IN_CS          // process is currently in critical section
};

enum cs_condition {      // return state from critical section
   NORMAL,       // objective not completed in critical section
   STOP          // objective completed in critical section
}:

enum cs_status {        // status flags possible states
   CLEAR,          // clear the appropriate flag - not ready
   READY          // mark the flag as ready
};
#endif
/* End of File */