?? dllist-driver.cc
字號(hào):
#include "dllist.h"
#include "system.h"
//#include "time.h"#include "synch-sleep.h"#include "synch-sem.h"//LockSem *lock = new LockSem("dllist lock");//ConditionSem *listEmpty = new ConditionSem("list empty cond");//Lock *lock = new Lock("dllist lock");//Condition *listEmpty = new Condition("list empty cond");//------------------------------------------
void
Creat(int N,DLList *q)
{void *item=NULL;
//int sortKey;
for(int i = 0; i < N; i++)
{ //srand(time(0)); //currentThread->Yield();
//sortKey=(int)((rand())%10); //lock->Acquire();
q->SortedInsert(item,i); //listEmpty->Signal(lock); //lock->Release();
}
}
void
Destory(int N,DLList *q)
{int * keyPtr; //void *item; keyPtr=new int;
for(int i = 0; i < N; i++)
{ //lock->Acquire(); //while(q->IsEmpty())listEmpty->Wait(lock);
q->Remove(keyPtr); //lock->Release(); } //item=q->SortedRemove(3);
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -