www.pudn.com > OSDemo.rar > SafeCheck.cpp
// SafeCheck.cpp: implementation of the SafeCheck class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "OSDemo.h"
#include "SafeCheck.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
SafeChecker::SafeChecker()
{
}
void SafeChecker::SetMatrix(int *alloc,int *need,int *available,int procnum,int resnum)
{
this->m_alloc=alloc;
this->m_need=need;
this->m_available=available;
this->m_procnum=procnum;
this->m_resnum=resnum;
this->buff="";
this->m_list=new int[procnum];
for(int i=0;i",m_list[h]+1);
buff+=buf;
}
buff+="Finish!\r\n";
}
}
else{
for(h=0;hm_resnum];
for(int i=0;iwork[j])
return 0;
}
for(j=0;j