next up previous contents index Search
Next: 0.7.2 Dekker's Algorithm for Up: 0.7.1 Dijkstra's Banker's Algorithm Previous: 0.7.1 Dijkstra's Banker's Algorithm

0.7.1.1 Source Code

The following code is taken from one of my OS projects and is incomplete in that it makes calls to a system module that is not included. The queue module which is called heavily is, however, included with this implementation:



/* -- banker.h -- */



/*---------------------------------------------------------------------------*\
 
 $Id: banker.h,v 1.4 1997/02/20 17:56:20 scott Exp scott $
 
 $Log: banker.h,v $
 Revision 1.4  1997/02/20 17:56:20  scott
 Final version.
 
 Revision 1.3  1997/02/20 00:21:04  scott
 Total rewrite...
 
 Revision 1.2  1997/02/19 18:58:44  scott
 This may still be buggy.
 
 Revision 1.1  1997/02/18 19:18:59  scott
 Initial revision
 
 \*---------------------------------------------------------------------------*/
 
 #ifndef __BANKER__
 #define __BANKER__
 
 bool bank_approves(int pid, int current, int deltam, int max, int freenow);
 
 #endif




Scott Gasch
1999-07-09