Пример #1
0
void t1_t1(){
    
    /*checks destroy and create invalid input is handled properly*/
    indexcheck1= CreateLock("abc", -1);
    indexcheck2=DestroyLock(indexcheck1+100);
    indexcheck3=DestroyLock(-100);
    if (indexcheck1==-1 && indexcheck2==-1 && indexcheck3==-1){
        Write("passed: create/destroyLOCK validates input\n", sizeof("passed: create/destroyLOCK validates input\n"), 1);
    }
    else{
        Write("failed: create/destroyLOCK validates input\n", sizeof("failed: create/destroyLOCK validates input\n"), 1);
    }
}
Пример #2
0
int
main() {

    int i, j;
    int lockID, total;

    /*Create the lock*/
    lockID = CreateLock("testLock",8);

    /*Accuire*/
    Acquire(lockID);

    Write("Working...\n",11,ConsoleOutput);

    /*Do some work*/
    for(i = 0;i<LEN;i++){
        for(j = 0;j<LEN;j++){
            total += i*j; /*Just to keep the thread occupied*/
        }
    }

    /*Release*/
    Release(lockID);

    Write("Out of critical section\n",24,ConsoleOutput);

    /*Destroy the lock (really, set its toBeDestroyed bit to true*/
    DestroyLock(lockID);

    /*Send a result to print*/
    Exit(total);

}
Пример #3
0
/* Starts executing here */
int main() {
	Write("Running test of Exec syscall.\n", 30, ConsoleOutput);
  Fork((void *)forkThread1);
  Fork((void *)forkThread2);
	Write("Exec finished forking threads, now trying to create a lock\n", sizeof("Exec finished forking threads, now trying to create a lock\n"), ConsoleOutput);
	lock_1 = CreateLock();
	Print("lock_1 position created at %i\n", lock_1, -1, -1);
	Write("Exec created a lock!\n", sizeof("Exec created a lock!\n"), ConsoleOutput);
	
	/* Testing to make sure none of the syscalls can be called from the wrong process after being created by the 1st process */
	/* Lock */
	Print("Trying to destroy lock 5 from wrong process\n", -1, -1, -1);
	DestroyLock(5);
	/* CV */
	Print("Trying to destroy cv 5 from wrong process\n", -1, -1, -1);
	DestroyCV(5);
	/* Acquire */
	Print("Trying to acquire lock 6 from wrong process\n", -1, -1, -1);
	Acquire(6);
	/* Release */
	Print("Trying to release lock 6 from wrong process\n", -1, -1, -1);
	Release(6);
	/* Wait */
	Print("Trying to wait on cv 6 from wrong process\n", -1, -1, -1);
	Wait(6, 6);
	/* Signal */
	Print("Trying to signal on cv 6 from wrong process\n", -1, -1, -1);
	Signal(6, 6);
	/* Broadcast */
	Print("Trying to broadcast on cv 6 from wrong process\n", -1, -1, -1);
	Broadcast(6, 6);
	
	/* Leave new process after tests */
	Exit(0);
}
void signal_waiter_destroy(){
	int returnValue = 0, i = 0;	
	
	/* Yield to allow other thread to acquire the lock and wait on the CV first. */
	for(i = 0; i < 100; i++){ Yield(); }
	
	Printx("Thread 2 is destroying the lock\n",34,1);
	returnValue = DestroyLock(lock);
	if(returnValue == -1){ 
		Printx("Thread 2 not able to destroy the lock\n",38,1);
	}
	
	Printx("Thread 2 is signalling the waiter using a destroyed lock\n",59,1);
	returnValue = Signal(CV, lock);
	if(returnValue == -1){ 
		Printx("Thread 2 not able to signal on the CV\n",38,1);
	}
	
	Printx("Thread 2 is destroying the CV\n",32,1);
	returnValue = DestroyCondition(CV);
	if(returnValue == -1){ 
		Printx("Thread 2 not able to destroy the CV\n",38,1);
	}
	
	Printx("Thread 2 is signalling the waiter using a destroyed CV\n",57,1);
	returnValue = Signal(CV, lock);
	if(returnValue == -1){ 
		Printx("Thread 2 not able to signal on the CV\n",40,1);
	}
	
	Exit(0);
}
Пример #5
0
int main() {
	
	int rv = 0, index = 0, cvrv = 0;
	int mvVal = 0;
	
	Print_Stmt("Calling start simulation\n");
	StartSimulation();
	Print_Stmt("In halt.c\n");
	
	
	rv = CreateLock("firstLock", 9, 1);
	
	
    rv = CreateLock("secondLock", 10, 1); 
	rv = CreateLock("firstLock", 9, 2); 
 	rv = CreateLock("secondLock", 10, 2);
	rv = CreateLock("firstLock", 9, 3); 
 	rv = CreateLock("secondLock", 10, 3);
	rv = CreateLock("firstLock", 9, 4); 
 	rv = CreateLock("secondLock", 10, 4);
	rv = CreateLock("firstLock", 9, 5); 
 	rv = CreateLock("secondLock", 10, 5);
	rv = CreateLock("firstLock", 9, 6); 
 	rv = CreateLock("secondLock", 10, 6);
	rv = CreateLock("firstLock", 9, 7); 
 	rv = CreateLock("secondLock", 10, 7);
	rv = CreateLock("firstLock", 9, 8); 
 	rv = CreateLock("secondLock", 10, 8);
	rv = CreateLock("firstLock", 9, 9); 
 	rv = CreateLock("secondLock", 10, 9);
	rv = CreateLock("firstLock", 9, 10); 
 	rv = CreateLock("secondLock", 10, 10);
	
	
	Acquire(rv);
 	Release(rv); 
	
	cvrv = CreateCV("firstCV", 7, 0);
 	cvrv = CreateCV("firstCV", 7, 0);
	cvrv = CreateCV("firstCV2", 8, 0);
	cvrv = CreateCV("firstCV3", 8, 0); 
	
 	Wait(cvrv, rv); 
	Signal(cvrv, rv); 
	
	DestroyLock(rv); 
	
	rv = CreateCV("firstCV", 7, 4);  
	CreateMV("firstMV", 7, 0); 
	
 	rv = CreateMV("firstMV", 7, 0);
	SetMV(rv, 3);
	mvVal = GetMV(rv);
	
	Print_1Arg("MV value obtained in halt is %d\n", mvVal); 
	
	Print_Stmt("Exiting in halt.c\n");
	
}
Пример #6
0
int
main()
{
    int l = CreateLock("abc",3);
    DestroyLock(l);
    Print("Destroying lock at index: %i now\n", 34, l * 1000, 0);
    Exit(0);
}
Пример #7
0
int main()
{
  /*   Test1 */
  t2_lock=CreateLock();
  Fork(t2_t1);
  Fork(t2_t2);
  DestroyLock(t2_lock);
  Exit(0);
}
Пример #8
0
void Lockdestroytest()
{
  int lockd,cvd;
  
  lockd=CreateLock("lockd",5);
  DestroyLock(lockd);/* you cannot destroy as client 1 is also using this lock*/
  cvd=CreateCondition("cvd",3);
  DestroyCondition(cvd);
}
Пример #9
0
int
main()
{
     int a=CreateLock("hi",2);
	AcquireLock(a);
	
   ReleaseLock(a);
    DestroyLock(a);
    
}
Пример #10
0
int
main()
{
    int l = CreateLock("abc",3);
    Acquire(l);
    Release(l);
    Print("Releasing lock at index: %i\n", 29, l * 1000, 0);
    DestroyLock(l);
    Exit(0);
}
Пример #11
0
void lockcvdestroytest()
{
   int lockd,cvd;
   
  lockd=CreateLock("lockd",5);
  cvd=CreateCondition("cvd",3);
  DestroyLock(lockd);
  DestroyCondition(cvd);
  
}
Пример #12
0
void t6_t1() {
    /*2nd to acquire lock*/
    test=AcquireLock(indexcheck1);
    test=Wait(LockIndex1, CVIndex1);
    Write("2\n", sizeof("2\n"), 1);
    test=ReleaseLock(indexcheck1);
    test=DestroyLock(indexcheck1);
    test=DestroyCV(CVIndex1);
    Exit(0);
}
Пример #13
0
int
main() {

    /*Create lock, CV*/
    int i,j,total;
    int lockID, cvID;
    lockID = CreateLock("testLock",8);
    cvID = CreateCondition("testCV",6);


    /*Get into critical section*/
    Acquire(lockID);

    Write("Sector 1...\n",12,ConsoleOutput);

    /*Do some work*/
    for(i = 0;i<LEN;i++){
        for(j = 0;j<LEN;j++){
            total += i*j; /*Just to keep the thread occupied*/
        }
    }

    /*Signal and then wait for another signal*/
    Signal(cvID,lockID);
    Wait(cvID,lockID);

    Write("Sector 2...\n",12,ConsoleOutput);

    /*Do some work*/
    for(i = 0;i<LEN;i++){
        for(j = 0;j<LEN;j++){
            total += i*j; /*Just to keep the thread occupied*/
        }
    }

    /*Signal. Even though the last thread will be signalling no one, this is part of the test
     * to allow all threads to finish*/
    Signal(cvID,lockID);

    /*Release*/
    Release(lockID);

    Write("Out of critical section\n",24,ConsoleOutput);

    /*Destroy the lock, cv (really, set its toBeDestroyed bit to true)*/
    DestroyLock(lockID);
    DestroyCondition(cvID);

    /*Send a result to print*/
    Exit(total);



}
Пример #14
0
void positivetestcase1()
{
    int L1,cv1;

    L1=CreateLock("USERLOCK",8);/*LOCK is created*/
    cv1=CreateCondition("USERCV",6);/*CV is created*/
    DestroyLock(L1);/*Lock is destroyed*/
    DestroyCondition(cv1);/*CV is destroyed*/



}
Пример #15
0
int main() {
  Write("Test 5 creates lock and cv\n", sizeof("Test 5 creates lock and cv\n"), ConsoleOutput);
  lock = CreateLock("lock", sizeof("lock"));
  cv = CreateCV("cv", sizeof("cv"));

  for (i = 0; i < 50000; i++) {
    Yield();
  }

  Write("Test 5 destroys lock and cv\n", sizeof("Test 5 destroys lock and cv\n"), ConsoleOutput);
  DestroyLock(lock);
  DestroyCV(cv);
}
Пример #16
0
void negativecase3()
{
    int L2;
    int Lock9,Lock8;
    Acquire(Lock9);/*trying to acquire a lock which is not created*/
    Release(Lock8);/*Releasing a lock which is not created*/
    L2= CreateLock("l2",2);/*LOCK is created*/
    DestroyLock(L2);
    Acquire(L2);/*tring to acquire a lock which is deleted*/
    Release(L2);/*Trying to release a lock which is already deleted*/


}
Пример #17
0
int main()
{
	int lock1;
	int lock2;
	int lock3;
	Write("\n Running locktest3.c\n",22,1);
	Write("\nTESTING: LOCKTEST3.C EXEC-S LOCKTEST4.C AND LOXKTEST4.C TRIES TO ACQUIRE THE LOCK CREATED BY LOCKTEST3.C",105,1);
	lock1=CreateLock();
	Exec("../test/locktest4",17);
	lock2=CreateLock();
	DestroyLock(lock2);
	lock3=CreateLock();
	Exit(0);
}
Пример #18
0
void lockcvdestroytest()
{
    int lockd,cvd;

    lockd=CreateLock("lockd",5);
    cvd=CreateCondition("cvd",3);

    Print("Please press any number after you run client 2, for successfull deletion of the lock and cv\n");
    Scan("%d");
    DestroyLock(lockd);
    DestroyCondition(cvd);


}
Пример #19
0
int test()
{
	int int2=0;
	for (int2=0;int2<550;int2++)
		{	
			i=CreateLock("locksTesting");
			AcquireLock(i);
			ReleaseLock(i);
			Print("New loop is %d\n",int2,-1,-1);
			if (int2 % 10 == 0) 
				DestroyLock(i);
		}
	Exit(0);		
}
Пример #20
0
int main() {
  lock1 = CreateLock("Lock1", 5, 0);
	lock2 = CreateLock("Lock2", 5, 0);
	deadLock1 = CreateLock("deadLock1", 9, 0);
	deadLock2 = CreateLock("deadLock2", 9, 0);
	lockToBeDestroyed = CreateLock("lockToBeDestroyed", 17, 0);

  theLockThatDoesntExist = lock1+10;
	Write("Testing invalid actions for locks\n", 34, ConsoleOutput);
	Write("Acquiring theLockThatDoesntExist, should give error\n", 52, ConsoleOutput);
	Acquire(theLockThatDoesntExist);
	Write("Releasing theLockThatDoesntExist, should give error\n", 52, ConsoleOutput);
	Release(theLockThatDoesntExist);
	Write("Destroying theLockThatDoesntExist, should give error\n", 53, ConsoleOutput);
	DestroyLock(theLockThatDoesntExist);
	Write("Destroying lockToBeDestroyed, should be successful\n", 51, ConsoleOutput);
	DestroyLock(lockToBeDestroyed);
	/*Write("Reacquiring lockToBeDestroyed, should give error\n", 49, ConsoleOutput);
	Acquire(lockToBeDestroyed);*/
	Fork(t1,0);
  Fork(t2,0);
	/*Write("Testing Locks\n", 14, ConsoleOutput)
	lockNum = CreateLock("nameLock");
	Acquire(lockNum);
	condNum = CreateCondition("someCondition");
	Signal(lockNum, condNum);
	Broadcast(lockNum, condNum);
	Release(lockNum);
	DestroyLock(lockNum);
	Write("Locks complete\n", 15, ConsoleOutput);
	Exec("../test/halt");
	Exec("../test/halt");
	*/
	Write("Finshing lockfiles.c\n", 22, ConsoleOutput);
	Exit(0);
}
Пример #21
0
int
main(){
	lockid = CreateLock("LOCK1", 5);
	initlock = CreateLock("LOCK2", 5);
	condid = CreateCondition("COND1", 5);
	initcond = CreateCondition("COND2", 5);

	Write( "test4\n", 6, ConsoleOutput );
	Acquire(initlock);
	Fork(waiter);
	Wait(initcond, initlock);

	Fork(signaller);
	while(i != 2){
		Wait(initcond, initlock);
	}
	Release(initlock);

	DestroyLock(lockid);
	DestroyLock(initlock);
	DestroyCondition(condid);
	DestroyCondition(initcond);
	Exit(0);
}
Пример #22
0
CMemThreadMgr::~CMemThreadMgr()
{
	gs_pInst=NULL;

	if( !m_pThread )
		return;

	AddEndThreadJob();

	delete m_pThread;
	m_pThread=NULL;

	DestroySemaphore(&m_smJobQueue);
	DestroySemaphore(&m_smFetchSymbol);
	DestroyLock(&m_slkJobQueue);
}
Пример #23
0
int main() {

	int lock1 = CreateLock("Lock1", 5);

	int i;
	for(i = 0; i < 10; i++){
		Acquire(lock1);
		Fork((void*)print1, "Print", 5, 1);
		Release(lock1);

		Acquire(lock1);
		Fork((void*)print2, "Increment", 9, 2);
		Release(lock1);
	}
	DestroyLock(lock1);
	Exit(0);
}
Пример #24
0
CTrMirrorBuffer::~CTrMirrorBuffer()
{
	/*
		在删除buffer之前,我们需要清空buffer上面的所有数据
	*/
	for(int i = 0; i < 5; i++)
	{
		SwapWIBuffer();
		SwapRIBuffer();
	}
	

	DeleteTripleBuffer();

	delete m_pDiscardedCmdMgr;

	delete m_pRBPatchMgr;
	delete m_pWBPatchMgr;

	DestroyLock(&m_Lock);
}
void RL2() {
	    char* name = "test";
    int lock;
    int lock2;
    int signal;
    
    	Printx("\nTest4.2 is acquiring lock at index 3\n",38,1);
    	lock2 = Acquire(3);
    	if (lock2 == -1)
   		 Printx("Lock not acquired\n",18,1);
    	else
    		Printx("Lock acquired successfully from index %d\n",41,lock2*10000000);
   	
   	Printx("\nTest4.2 is destroying lock at index 2\n",39,1);		
    	lock = DestroyLock(2);
    if (lock == -1)
   	 Printx("Lock not destroyed\n",19,1);
    else
    	Printx("Lock at index %d successfully set to be destroyed\n",50,lock*10000000);
    	
    	
    	Printx("\nTest4.2 is signaling with CV 0 and Lock 3\n",43,1);
    	signal = Signal(0,3);
    	if (signal == -1)
		Printx("CV did not successfully signal\n",31,1);
	else
		Printx("CV is successfully signaling\n",29,1);
		
	 Printx("\nTest4.2 is releasing lock at index 3\n",38,1);
    lock = Release(3);
    if (lock == -1)
   	 Printx("Lock not released\n",18,1);
    else
    	Printx("Lock at index %d released successfully\n",39,lock*10000000);
    	

Exit(0);
	
}
Пример #26
0
void negativecase2()
{
    int Lock9=-1;
    int Lock1;
    int CV1;
    int CV9=-1;
    DestroyLock(-1);/*InValid Lock Index*/
    DestroyLock(3000);/*InValid Lock Index*/
    DestroyLock(Lock9);/*Cannot delete a lock whic is not created */
    Lock1= CreateLock("USERLOCK",8);
    Acquire(Lock1);
    DestroyLock(Lock1);/*trying to delete a lock whose usage counter is non zero*/
    DestroyCondition(-1);/*InValid CV Index*/
    DestroyCondition(3000);/*InValid CV Index*/
    DestroyCondition(CV9);/*Cannot delete a CV which is not created */
    Release(Lock1);
    DestroyLock(Lock1);
    DestroyLock(Lock1);/* try to delete a lock which is already deleted*/
    CV1=CreateCondition("cv1",3);
    DestroyCondition(CV1);
    DestroyCondition(CV1);/*trying to delete a cv which is already deleted*/


}
Пример #27
0
	/*Default test destroys the create lock in the default create test */
	void destroy_Lock_Test(){
		Write("Testing Destroy Lock syscall. Calling DestroyLock()\n", sizeof("Testing Destroy Lock syscall. Calling DestroyLock()\n"), ConsoleOutput);
		DestroyLock(lock_1);
	}
int DestroyAllLocksCV()
{
	int iInitCntr=0;
	/*Delete all used locks and CVs*/
	DestroyLock(CustDataLock);
	DestroyLock(InventoryLock);
	DestroyLock(MgrCookStatUpdateLock);
	DestroyLock(InventoryLock);
	DestroyLock(SigCustListLock);
	DestroyLock(GrabedFoodLock);
	DestroyLock(EatInCustWaitingForFoodLock);
	DestroyLock(ToGoCustWaitingForFoodLock);
	DestroyLock(ToGoGrabedFoodLock);
	DestroyLock(MgrCookStyleLstLock);
	DestroyLock(MonitorAmtOfMoneyLock);
	DestroyLock(OTStatusUpdateLock);
	DestroyLock(CookedFoodLock); 
	DestroyLock(TableAllotedCustLock); 
	DestroyLock(WaitersQLock); 
	DestroyLock(TotalTablesUpdateLock);
	DestroyLock(TblNeededCustLock); 
	DestroyLock(FoodToBeCookedUpdateLock);
	DestroyLock(CustCountLock);
	DestroyLock(OTCountLock);
	DestroyLock(WaiterCountLock);
	DestroyLock(custLineLock);
	DestroyLock(AliveCustCountLock);
	DestroyLock(SleepingWaiterCountLock);
	DestroyLock(ActiveOTCountLock);
	

	iInitCntr=0;
	for(iInitCntr=0;iInitCntr<MAX_SIZE;iInitCntr++)
	{
	  DestroyLock(NeedInventoryLock[iInitCntr]);
	  DestroyLock(OrderTakerLock[iInitCntr]);
	  DestroyLock(NeedTableLock[iInitCntr]);
	  DestroyLock(NeedWaitersLock[iInitCntr]);
	}
	/*Print1("MAX LOCK COUNT =%d\n",NeedWaitersLock[iInitCntr]);*/
	iInitCntr=0;

	/***************************************************************************************
	Intialization of all Condition Variables
	***************************************************************************************/

	DestroyCondition(CookQCV);  
	DestroyCondition(custWaitingCV);
	DestroyCondition(WaitersCV);
	iInitCntr=0;
	for(iInitCntr=0;iInitCntr<MAX_SIZE;iInitCntr++)
	{
	  DestroyCondition(OTWaitingCV[iInitCntr]);
	  DestroyCondition(NeedInventoryCV[iInitCntr]); 
	  DestroyCondition(NeedTableCV[iInitCntr]);
	  DestroyCondition(NeedWaitersCV[iInitCntr]);
	}
	iInitCntr=0;
	return 1;
	
}
Пример #29
0
	/* Checks to make sure that a bad index will be blocked from reaching the system call */
	void destroy_Lock_Bad_Index_Test(){
		Write("Testing Destroy Lock syscall with a negative index.\n", sizeof("Testing Destroy Lock syscall with a negative index.\n"), ConsoleOutput);
		DestroyLock(-1);
		Write("Testing Destroy Lock sys call with a lock index of 12 (Larger than next index)\n", sizeof("Testing Destroy Lock sys call with a lock index of 12 (Larger than next index)\n"), ConsoleOutput);
		DestroyLock(12);
	}
Пример #30
0
int main()
{
    Print("Stress test begins..\n",-1,-1,-1);
    lock[0] = CreateLock("lock0");
    cv[0] = CreateCV("cv0");
    mv[0] = CreateMV("mv0");
    lock[1] = CreateLock("lock1");
    cv[1] = CreateCV("cv1");
    mv[1] = CreateMV("mv1");
    lock[2] = CreateLock("lock2");
    cv[2] = CreateCV("cv2");
    mv[2] = CreateMV("mv2");
    lock[3] = CreateLock("lock3");
    cv[3] = CreateCV("cv3");
    mv[3] = CreateMV("mv3");
    lock[4] = CreateLock("lock4");
    cv[4] = CreateCV("cv4");
    mv[4] = CreateMV("mv4");
    lock[5] = CreateLock("lock5");
    cv[5] = CreateCV("cv5");
    mv[5] = CreateMV("mv5");
    lock[6] = CreateLock("lock6");
    cv[6] = CreateCV("cv6");
    mv[6] = CreateMV("mv6");
    lock[7] = CreateLock("lock7");
    cv[7] = CreateCV("cv7");
    mv[7] = CreateMV("mv7");
    lock[8] = CreateLock("lock8");
    cv[8] = CreateCV("cv8");
    mv[8] = CreateMV("mv8");
    lock[9] = CreateLock("lock9");
    cv[9] = CreateCV("cv9");
    mv[9] = CreateMV("mv9");
    lock[10] = CreateLock("lock10");
    cv[10] = CreateCV("cv10");
    mv[10] = CreateMV("mv10");
    lock[11] = CreateLock("lock11");
    cv[11] = CreateCV("cv11");
    mv[11] = CreateMV("mv11");
    lock[12] = CreateLock("lock12");
    cv[12] = CreateCV("cv12");
    mv[12] = CreateMV("mv12");
    lock[13] = CreateLock("lock13");
    cv[13] = CreateCV("cv13");
    mv[13] = CreateMV("mv13");
    lock[14] = CreateLock("lock14");
    cv[14] = CreateCV("cv14");
    mv[14] = CreateMV("mv14");
    lock[15] = CreateLock("lock15");
    cv[15] = CreateCV("cv15");
    mv[15] = CreateMV("mv15");
    lock[16] = CreateLock("lock16");
    cv[16] = CreateCV("cv16");
    mv[16] = CreateMV("mv16");
    lock[17] = CreateLock("lock17");
    cv[17] = CreateCV("cv17");
    mv[17] = CreateMV("mv17");
    lock[18] = CreateLock("lock18");
    cv[18] = CreateCV("cv18");
    mv[18] = CreateMV("mv18");
    lock[19] = CreateLock("lock19");
    cv[19] = CreateCV("cv19");
    mv[19] = CreateMV("mv19");
    lock[20] = CreateLock("lock20");
    cv[20] = CreateCV("cv20");
    mv[20] = CreateMV("mv20");
    lock[21] = CreateLock("lock21");
    cv[21] = CreateCV("cv21");
    mv[21] = CreateMV("mv21");
    lock[22] = CreateLock("lock22");
    cv[22] = CreateCV("cv22");
    mv[22] = CreateMV("mv22");
    lock[23] = CreateLock("lock23");
    cv[23] = CreateCV("cv23");
    mv[23] = CreateMV("mv23");
    lock[24] = CreateLock("lock24");
    cv[24] = CreateCV("cv24");
    mv[24] = CreateMV("mv24");
    lock[25] = CreateLock("lock25");
    cv[25] = CreateCV("cv25");
    mv[25] = CreateMV("mv25");
    lock[26] = CreateLock("lock26");
    cv[26] = CreateCV("cv26");
    mv[26] = CreateMV("mv26");
    lock[27] = CreateLock("lock27");
    cv[27] = CreateCV("cv27");
    mv[27] = CreateMV("mv27");
    lock[28] = CreateLock("lock28");
    cv[28] = CreateCV("cv28");
    mv[28] = CreateMV("mv28");
    lock[29] = CreateLock("lock29");
    cv[29] = CreateCV("cv29");
    mv[29] = CreateMV("mv29");
    lock[30] = CreateLock("lock30");
    cv[30] = CreateCV("cv30");
    mv[30] = CreateMV("mv30");
    lock[31] = CreateLock("lock31");
    cv[31] = CreateCV("cv31");
    mv[31] = CreateMV("mv31");
    lock[32] = CreateLock("lock32");
    cv[32] = CreateCV("cv32");
    mv[32] = CreateMV("mv32");
    lock[33] = CreateLock("lock33");
    cv[33] = CreateCV("cv33");
    mv[33] = CreateMV("mv33");
    lock[34] = CreateLock("lock34");
    cv[34] = CreateCV("cv34");
    mv[34] = CreateMV("mv34");
    lock[35] = CreateLock("lock35");
    cv[35] = CreateCV("cv35");
    mv[35] = CreateMV("mv35");
    lock[36] = CreateLock("lock36");
    cv[36] = CreateCV("cv36");
    mv[36] = CreateMV("mv36");
    lock[37] = CreateLock("lock37");
    cv[37] = CreateCV("cv37");
    mv[37] = CreateMV("mv37");
    lock[38] = CreateLock("lock38");
    cv[38] = CreateCV("cv38");
    mv[38] = CreateMV("mv38");
    lock[39] = CreateLock("lock39");
    cv[39] = CreateCV("cv39");
    mv[39] = CreateMV("mv39");
    lock[40] = CreateLock("lock40");
    cv[40] = CreateCV("cv40");
    mv[40] = CreateMV("mv40");
    lock[41] = CreateLock("lock41");
    cv[41] = CreateCV("cv41");
    mv[41] = CreateMV("mv41");
    lock[42] = CreateLock("lock42");
    cv[42] = CreateCV("cv42");
    mv[42] = CreateMV("mv42");
    lock[43] = CreateLock("lock43");
    cv[43] = CreateCV("cv43");
    mv[43] = CreateMV("mv43");
    lock[44] = CreateLock("lock44");
    cv[44] = CreateCV("cv44");
    mv[44] = CreateMV("mv44");
    lock[45] = CreateLock("lock45");
    cv[45] = CreateCV("cv45");
    mv[45] = CreateMV("mv45");
    lock[46] = CreateLock("lock46");
    cv[46] = CreateCV("cv46");
    mv[46] = CreateMV("mv46");
    lock[47] = CreateLock("lock47");
    cv[47] = CreateCV("cv47");
    mv[47] = CreateMV("mv47");
    lock[48] = CreateLock("lock48");
    cv[48] = CreateCV("cv48");
    mv[48] = CreateMV("mv48");
    lock[49] = CreateLock("lock49");
    cv[49] = CreateCV("cv49");
    mv[49] = CreateMV("mv49");
    lock[50] = CreateLock("lock50");
    cv[50] = CreateCV("cv50");
    mv[50] = CreateMV("mv50");
    lock[51] = CreateLock("lock51");
    cv[51] = CreateCV("cv51");
    mv[51] = CreateMV("mv51");
    lock[52] = CreateLock("lock52");
    cv[52] = CreateCV("cv52");
    mv[52] = CreateMV("mv52");
    lock[53] = CreateLock("lock53");
    cv[53] = CreateCV("cv53");
    mv[53] = CreateMV("mv53");
    lock[54] = CreateLock("lock54");
    cv[54] = CreateCV("cv54");
    mv[54] = CreateMV("mv54");
    lock[55] = CreateLock("lock55");
    cv[55] = CreateCV("cv55");
    mv[55] = CreateMV("mv55");
    lock[56] = CreateLock("lock56");
    cv[56] = CreateCV("cv56");
    mv[56] = CreateMV("mv56");
    lock[57] = CreateLock("lock57");
    cv[57] = CreateCV("cv57");
    mv[57] = CreateMV("mv57");
    lock[58] = CreateLock("lock58");
    cv[58] = CreateCV("cv58");
    mv[58] = CreateMV("mv58");
    lock[59] = CreateLock("lock59");
    cv[59] = CreateCV("cv59");
    mv[59] = CreateMV("mv59");
    lock[60] = CreateLock("lock60");
    cv[60] = CreateCV("cv60");
    mv[60] = CreateMV("mv60");
    lock[61] = CreateLock("lock61");
    cv[61] = CreateCV("cv61");
    mv[61] = CreateMV("mv61");
    lock[62] = CreateLock("lock62");
    cv[62] = CreateCV("cv62");
    mv[62] = CreateMV("mv62");
    lock[63] = CreateLock("lock63");
    cv[63] = CreateCV("cv63");
    mv[63] = CreateMV("mv63");
    lock[64] = CreateLock("lock64");
    cv[64] = CreateCV("cv64");
    mv[64] = CreateMV("mv64");
    lock[65] = CreateLock("lock65");
    cv[65] = CreateCV("cv65");
    mv[65] = CreateMV("mv65");
    lock[66] = CreateLock("lock66");
    cv[66] = CreateCV("cv66");
    mv[66] = CreateMV("mv66");
    lock[67] = CreateLock("lock67");
    cv[67] = CreateCV("cv67");
    mv[67] = CreateMV("mv67");
    lock[68] = CreateLock("lock68");
    cv[68] = CreateCV("cv68");
    mv[68] = CreateMV("mv68");
    lock[69] = CreateLock("lock69");
    cv[69] = CreateCV("cv69");
    mv[69] = CreateMV("mv69");
    lock[70] = CreateLock("lock70");
    cv[70] = CreateCV("cv70");
    mv[70] = CreateMV("mv70");
    lock[71] = CreateLock("lock71");
    cv[71] = CreateCV("cv71");
    mv[71] = CreateMV("mv71");
    lock[72] = CreateLock("lock72");
    cv[72] = CreateCV("cv72");
    mv[72] = CreateMV("mv72");
    lock[73] = CreateLock("lock73");
    cv[73] = CreateCV("cv73");
    mv[73] = CreateMV("mv73");
    lock[74] = CreateLock("lock74");
    cv[74] = CreateCV("cv74");
    mv[74] = CreateMV("mv74");
    lock[75] = CreateLock("lock75");
    cv[75] = CreateCV("cv75");
    mv[75] = CreateMV("mv75");
    lock[76] = CreateLock("lock76");
    cv[76] = CreateCV("cv76");
    mv[76] = CreateMV("mv76");
    lock[77] = CreateLock("lock77");
    cv[77] = CreateCV("cv77");
    mv[77] = CreateMV("mv77");
    lock[78] = CreateLock("lock78");
    cv[78] = CreateCV("cv78");
    mv[78] = CreateMV("mv78");
    lock[79] = CreateLock("lock79");
    cv[79] = CreateCV("cv79");
    mv[79] = CreateMV("mv79");
    lock[80] = CreateLock("lock80");
    cv[80] = CreateCV("cv80");
    mv[80] = CreateMV("mv80");
    lock[81] = CreateLock("lock81");
    cv[81] = CreateCV("cv81");
    mv[81] = CreateMV("mv81");
    lock[82] = CreateLock("lock82");
    cv[82] = CreateCV("cv82");
    mv[82] = CreateMV("mv82");
    lock[83] = CreateLock("lock83");
    cv[83] = CreateCV("cv83");
    mv[83] = CreateMV("mv83");
    lock[84] = CreateLock("lock84");
    cv[84] = CreateCV("cv84");
    mv[84] = CreateMV("mv84");
    lock[85] = CreateLock("lock85");
    cv[85] = CreateCV("cv85");
    mv[85] = CreateMV("mv85");
    lock[86] = CreateLock("lock86");
    cv[86] = CreateCV("cv86");
    mv[86] = CreateMV("mv86");
    lock[87] = CreateLock("lock87");
    cv[87] = CreateCV("cv87");
    mv[87] = CreateMV("mv87");
    lock[88] = CreateLock("lock88");
    cv[88] = CreateCV("cv88");
    mv[88] = CreateMV("mv88");
    lock[89] = CreateLock("lock89");
    cv[89] = CreateCV("cv89");
    mv[89] = CreateMV("mv89");
    lock[90] = CreateLock("lock90");
    cv[90] = CreateCV("cv90");
    mv[90] = CreateMV("mv90");
    lock[91] = CreateLock("lock91");
    cv[91] = CreateCV("cv91");
    mv[91] = CreateMV("mv91");
    lock[92] = CreateLock("lock92");
    cv[92] = CreateCV("cv92");
    mv[92] = CreateMV("mv92");
    lock[93] = CreateLock("lock93");
    cv[93] = CreateCV("cv93");
    mv[93] = CreateMV("mv93");
    lock[94] = CreateLock("lock94");
    cv[94] = CreateCV("cv94");
    mv[94] = CreateMV("mv94");
    lock[95] = CreateLock("lock95");
    cv[95] = CreateCV("cv95");
    mv[95] = CreateMV("mv95");
    lock[96] = CreateLock("lock96");
    cv[96] = CreateCV("cv96");
    mv[96] = CreateMV("mv96");
    lock[97] = CreateLock("lock97");
    cv[97] = CreateCV("cv97");
    mv[97] = CreateMV("mv97");
    lock[98] = CreateLock("lock98");
    cv[98] = CreateCV("cv98");
    mv[98] = CreateMV("mv98");
    lock[99] = CreateLock("lock99");
    cv[99] = CreateCV("cv99");
    mv[99] = CreateMV("mv99");
    lock[100] = CreateLock("lock100");
    cv[100] = CreateCV("cv100");
    mv[100] = CreateMV("mv100");
    lock[101] = CreateLock("lock101");
    cv[101] = CreateCV("cv101");
    mv[101] = CreateMV("mv101");
    lock[102] = CreateLock("lock102");
    cv[102] = CreateCV("cv102");
    mv[102] = CreateMV("mv102");
    lock[103] = CreateLock("lock103");
    cv[103] = CreateCV("cv103");
    mv[103] = CreateMV("mv103");
    lock[104] = CreateLock("lock104");
    cv[104] = CreateCV("cv104");
    mv[104] = CreateMV("mv104");
    lock[105] = CreateLock("lock105");
    cv[105] = CreateCV("cv105");
    mv[105] = CreateMV("mv105");
    lock[106] = CreateLock("lock106");
    cv[106] = CreateCV("cv106");
    mv[106] = CreateMV("mv106");
    lock[107] = CreateLock("lock107");
    cv[107] = CreateCV("cv107");
    mv[107] = CreateMV("mv107");
    lock[108] = CreateLock("lock108");
    cv[108] = CreateCV("cv108");
    mv[108] = CreateMV("mv108");
    lock[109] = CreateLock("lock109");
    cv[109] = CreateCV("cv109");
    mv[109] = CreateMV("mv109");
    lock[110] = CreateLock("lock110");
    cv[110] = CreateCV("cv110");
    mv[110] = CreateMV("mv110");
    lock[111] = CreateLock("lock111");
    cv[111] = CreateCV("cv111");
    mv[111] = CreateMV("mv111");
    lock[112] = CreateLock("lock112");
    cv[112] = CreateCV("cv112");
    mv[112] = CreateMV("mv112");
    lock[113] = CreateLock("lock113");
    cv[113] = CreateCV("cv113");
    mv[113] = CreateMV("mv113");
    lock[114] = CreateLock("lock114");
    cv[114] = CreateCV("cv114");
    mv[114] = CreateMV("mv114");
    lock[115] = CreateLock("lock115");
    cv[115] = CreateCV("cv115");
    mv[115] = CreateMV("mv115");
    lock[116] = CreateLock("lock116");
    cv[116] = CreateCV("cv116");
    mv[116] = CreateMV("mv116");
    lock[117] = CreateLock("lock117");
    cv[117] = CreateCV("cv117");
    mv[117] = CreateMV("mv117");
    lock[118] = CreateLock("lock118");
    cv[118] = CreateCV("cv118");
    mv[118] = CreateMV("mv118");
    lock[119] = CreateLock("lock119");
    cv[119] = CreateCV("cv119");
    mv[119] = CreateMV("mv119");
    lock[120] = CreateLock("lock120");
    cv[120] = CreateCV("cv120");
    mv[120] = CreateMV("mv120");
    lock[121] = CreateLock("lock121");
    cv[121] = CreateCV("cv121");
    mv[121] = CreateMV("mv121");
    lock[122] = CreateLock("lock122");
    cv[122] = CreateCV("cv122");
    mv[122] = CreateMV("mv122");
    lock[123] = CreateLock("lock123");
    cv[123] = CreateCV("cv123");
    mv[123] = CreateMV("mv123");
    lock[124] = CreateLock("lock124");
    cv[124] = CreateCV("cv124");
    mv[124] = CreateMV("mv124");
    lock[125] = CreateLock("lock125");
    cv[125] = CreateCV("cv125");
    mv[125] = CreateMV("mv125");
    lock[126] = CreateLock("lock126");
    cv[126] = CreateCV("cv126");
    mv[126] = CreateMV("mv126");
    lock[127] = CreateLock("lock127");
    cv[127] = CreateCV("cv127");
    mv[127] = CreateMV("mv127");
    lock[128] = CreateLock("lock128");
    cv[128] = CreateCV("cv128");
    mv[128] = CreateMV("mv128");
    lock[129] = CreateLock("lock129");
    cv[129] = CreateCV("cv129");
    mv[129] = CreateMV("mv129");
    lock[130] = CreateLock("lock130");
    cv[130] = CreateCV("cv130");
    mv[130] = CreateMV("mv130");
    lock[131] = CreateLock("lock131");
    cv[131] = CreateCV("cv131");
    mv[131] = CreateMV("mv131");
    lock[132] = CreateLock("lock132");
    cv[132] = CreateCV("cv132");
    mv[132] = CreateMV("mv132");
    lock[133] = CreateLock("lock133");
    cv[133] = CreateCV("cv133");
    mv[133] = CreateMV("mv133");
    lock[134] = CreateLock("lock134");
    cv[134] = CreateCV("cv134");
    mv[134] = CreateMV("mv134");
    lock[135] = CreateLock("lock135");
    cv[135] = CreateCV("cv135");
    mv[135] = CreateMV("mv135");
    lock[136] = CreateLock("lock136");
    cv[136] = CreateCV("cv136");
    mv[136] = CreateMV("mv136");
    lock[137] = CreateLock("lock137");
    cv[137] = CreateCV("cv137");
    mv[137] = CreateMV("mv137");
    lock[138] = CreateLock("lock138");
    cv[138] = CreateCV("cv138");
    mv[138] = CreateMV("mv138");
    lock[139] = CreateLock("lock139");
    cv[139] = CreateCV("cv139");
    mv[139] = CreateMV("mv139");
    lock[140] = CreateLock("lock140");
    cv[140] = CreateCV("cv140");
    mv[140] = CreateMV("mv140");
    lock[141] = CreateLock("lock141");
    cv[141] = CreateCV("cv141");
    mv[141] = CreateMV("mv141");
    lock[142] = CreateLock("lock142");
    cv[142] = CreateCV("cv142");
    mv[142] = CreateMV("mv142");
    lock[143] = CreateLock("lock143");
    cv[143] = CreateCV("cv143");
    mv[143] = CreateMV("mv143");
    lock[144] = CreateLock("lock144");
    cv[144] = CreateCV("cv144");
    mv[144] = CreateMV("mv144");
    lock[145] = CreateLock("lock145");
    cv[145] = CreateCV("cv145");
    mv[145] = CreateMV("mv145");
    lock[146] = CreateLock("lock146");
    cv[146] = CreateCV("cv146");
    mv[146] = CreateMV("mv146");
    lock[147] = CreateLock("lock147");
    cv[147] = CreateCV("cv147");
    mv[147] = CreateMV("mv147");
    lock[148] = CreateLock("lock148");
    cv[148] = CreateCV("cv148");
    mv[148] = CreateMV("mv148");
    lock[149] = CreateLock("lock149");
    cv[149] = CreateCV("cv149");
    mv[149] = CreateMV("mv149");
    lock[150] = CreateLock("lock150");
    cv[150] = CreateCV("cv150");
    mv[150] = CreateMV("mv150");
    lock[151] = CreateLock("lock151");
    cv[151] = CreateCV("cv151");
    mv[151] = CreateMV("mv151");
    lock[152] = CreateLock("lock152");
    cv[152] = CreateCV("cv152");
    mv[152] = CreateMV("mv152");
    lock[153] = CreateLock("lock153");
    cv[153] = CreateCV("cv153");
    mv[153] = CreateMV("mv153");
    lock[154] = CreateLock("lock154");
    cv[154] = CreateCV("cv154");
    mv[154] = CreateMV("mv154");
    lock[155] = CreateLock("lock155");
    cv[155] = CreateCV("cv155");
    mv[155] = CreateMV("mv155");
    lock[156] = CreateLock("lock156");
    cv[156] = CreateCV("cv156");
    mv[156] = CreateMV("mv156");
    lock[157] = CreateLock("lock157");
    cv[157] = CreateCV("cv157");
    mv[157] = CreateMV("mv157");
    lock[158] = CreateLock("lock158");
    cv[158] = CreateCV("cv158");
    mv[158] = CreateMV("mv158");
    lock[159] = CreateLock("lock159");
    cv[159] = CreateCV("cv159");
    mv[159] = CreateMV("mv159");
    lock[160] = CreateLock("lock160");
    cv[160] = CreateCV("cv160");
    mv[160] = CreateMV("mv160");
    lock[161] = CreateLock("lock161");
    cv[161] = CreateCV("cv161");
    mv[161] = CreateMV("mv161");
    lock[162] = CreateLock("lock162");
    cv[162] = CreateCV("cv162");
    mv[162] = CreateMV("mv162");
    lock[163] = CreateLock("lock163");
    cv[163] = CreateCV("cv163");
    mv[163] = CreateMV("mv163");
    lock[164] = CreateLock("lock164");
    cv[164] = CreateCV("cv164");
    mv[164] = CreateMV("mv164");
    lock[165] = CreateLock("lock165");
    cv[165] = CreateCV("cv165");
    mv[165] = CreateMV("mv165");
    lock[166] = CreateLock("lock166");
    cv[166] = CreateCV("cv166");
    mv[166] = CreateMV("mv166");
    lock[167] = CreateLock("lock167");
    cv[167] = CreateCV("cv167");
    mv[167] = CreateMV("mv167");
    lock[168] = CreateLock("lock168");
    cv[168] = CreateCV("cv168");
    mv[168] = CreateMV("mv168");
    lock[169] = CreateLock("lock169");
    cv[169] = CreateCV("cv169");
    mv[169] = CreateMV("mv169");
    lock[170] = CreateLock("lock170");
    cv[170] = CreateCV("cv170");
    mv[170] = CreateMV("mv170");
    lock[171] = CreateLock("lock171");
    cv[171] = CreateCV("cv171");
    mv[171] = CreateMV("mv171");
    lock[172] = CreateLock("lock172");
    cv[172] = CreateCV("cv172");
    mv[172] = CreateMV("mv172");
    lock[173] = CreateLock("lock173");
    cv[173] = CreateCV("cv173");
    mv[173] = CreateMV("mv173");
    lock[174] = CreateLock("lock174");
    cv[174] = CreateCV("cv174");
    mv[174] = CreateMV("mv174");
    lock[175] = CreateLock("lock175");
    cv[175] = CreateCV("cv175");
    mv[175] = CreateMV("mv175");
    lock[176] = CreateLock("lock176");
    cv[176] = CreateCV("cv176");
    mv[176] = CreateMV("mv176");
    lock[177] = CreateLock("lock177");
    cv[177] = CreateCV("cv177");
    mv[177] = CreateMV("mv177");
    lock[178] = CreateLock("lock178");
    cv[178] = CreateCV("cv178");
    mv[178] = CreateMV("mv178");
    lock[179] = CreateLock("lock179");
    cv[179] = CreateCV("cv179");
    mv[179] = CreateMV("mv179");
    lock[180] = CreateLock("lock180");
    cv[180] = CreateCV("cv180");
    mv[180] = CreateMV("mv180");
    lock[181] = CreateLock("lock181");
    cv[181] = CreateCV("cv181");
    mv[181] = CreateMV("mv181");
    lock[182] = CreateLock("lock182");
    cv[182] = CreateCV("cv182");
    mv[182] = CreateMV("mv182");
    lock[183] = CreateLock("lock183");
    cv[183] = CreateCV("cv183");
    mv[183] = CreateMV("mv183");
    lock[184] = CreateLock("lock184");
    cv[184] = CreateCV("cv184");
    mv[184] = CreateMV("mv184");
    lock[185] = CreateLock("lock185");
    cv[185] = CreateCV("cv185");
    mv[185] = CreateMV("mv185");
    lock[186] = CreateLock("lock186");
    cv[186] = CreateCV("cv186");
    mv[186] = CreateMV("mv186");
    lock[187] = CreateLock("lock187");
    cv[187] = CreateCV("cv187");
    mv[187] = CreateMV("mv187");
    lock[188] = CreateLock("lock188");
    cv[188] = CreateCV("cv188");
    mv[188] = CreateMV("mv188");
    lock[189] = CreateLock("lock189");
    cv[189] = CreateCV("cv189");
    mv[189] = CreateMV("mv189");
    lock[190] = CreateLock("lock190");
    cv[190] = CreateCV("cv190");
    mv[190] = CreateMV("mv190");
    lock[191] = CreateLock("lock191");
    cv[191] = CreateCV("cv191");
    mv[191] = CreateMV("mv191");
    lock[192] = CreateLock("lock192");
    cv[192] = CreateCV("cv192");
    mv[192] = CreateMV("mv192");
    lock[193] = CreateLock("lock193");
    cv[193] = CreateCV("cv193");
    mv[193] = CreateMV("mv193");
    lock[194] = CreateLock("lock194");
    cv[194] = CreateCV("cv194");
    mv[194] = CreateMV("mv194");
    lock[195] = CreateLock("lock195");
    cv[195] = CreateCV("cv195");
    mv[195] = CreateMV("mv195");
    lock[196] = CreateLock("lock196");
    cv[196] = CreateCV("cv196");
    mv[196] = CreateMV("mv196");
    lock[197] = CreateLock("lock197");
    cv[197] = CreateCV("cv197");
    mv[197] = CreateMV("mv197");
    lock[198] = CreateLock("lock198");
    cv[198] = CreateCV("cv198");
    mv[198] = CreateMV("mv198");
    lock[199] = CreateLock("lock199");
    cv[199] = CreateCV("cv199");
    mv[199] = CreateMV("mv199");
    lock[200] = CreateLock("lock200");
    cv[200] = CreateCV("cv200");
    mv[200] = CreateMV("mv200");
    lock[201] = CreateLock("lock201");
    cv[201] = CreateCV("cv201");
    mv[201] = CreateMV("mv201");
    lock[202] = CreateLock("lock202");
    cv[202] = CreateCV("cv202");
    mv[202] = CreateMV("mv202");
    lock[203] = CreateLock("lock203");
    cv[203] = CreateCV("cv203");
    mv[203] = CreateMV("mv203");
    lock[204] = CreateLock("lock204");
    cv[204] = CreateCV("cv204");
    mv[204] = CreateMV("mv204");
    lock[205] = CreateLock("lock205");
    cv[205] = CreateCV("cv205");
    mv[205] = CreateMV("mv205");
    lock[206] = CreateLock("lock206");
    cv[206] = CreateCV("cv206");
    mv[206] = CreateMV("mv206");
    lock[207] = CreateLock("lock207");
    cv[207] = CreateCV("cv207");
    mv[207] = CreateMV("mv207");
    lock[208] = CreateLock("lock208");
    cv[208] = CreateCV("cv208");
    mv[208] = CreateMV("mv208");
    lock[209] = CreateLock("lock209");
    cv[209] = CreateCV("cv209");
    mv[209] = CreateMV("mv209");
    lock[210] = CreateLock("lock210");
    cv[210] = CreateCV("cv210");
    mv[210] = CreateMV("mv210");
    lock[211] = CreateLock("lock211");
    cv[211] = CreateCV("cv211");
    mv[211] = CreateMV("mv211");
    lock[212] = CreateLock("lock212");
    cv[212] = CreateCV("cv212");
    mv[212] = CreateMV("mv212");
    lock[213] = CreateLock("lock213");
    cv[213] = CreateCV("cv213");
    mv[213] = CreateMV("mv213");
    lock[214] = CreateLock("lock214");
    cv[214] = CreateCV("cv214");
    mv[214] = CreateMV("mv214");
    lock[215] = CreateLock("lock215");
    cv[215] = CreateCV("cv215");
    mv[215] = CreateMV("mv215");
    lock[216] = CreateLock("lock216");
    cv[216] = CreateCV("cv216");
    mv[216] = CreateMV("mv216");
    lock[217] = CreateLock("lock217");
    cv[217] = CreateCV("cv217");
    mv[217] = CreateMV("mv217");
    lock[218] = CreateLock("lock218");
    cv[218] = CreateCV("cv218");
    mv[218] = CreateMV("mv218");
    lock[219] = CreateLock("lock219");
    cv[219] = CreateCV("cv219");
    mv[219] = CreateMV("mv219");
    lock[220] = CreateLock("lock220");
    cv[220] = CreateCV("cv220");
    mv[220] = CreateMV("mv220");
    lock[221] = CreateLock("lock221");
    cv[221] = CreateCV("cv221");
    mv[221] = CreateMV("mv221");
    lock[222] = CreateLock("lock222");
    cv[222] = CreateCV("cv222");
    mv[222] = CreateMV("mv222");
    lock[223] = CreateLock("lock223");
    cv[223] = CreateCV("cv223");
    mv[223] = CreateMV("mv223");
    lock[224] = CreateLock("lock224");
    cv[224] = CreateCV("cv224");
    mv[224] = CreateMV("mv224");
    lock[225] = CreateLock("lock225");
    cv[225] = CreateCV("cv225");
    mv[225] = CreateMV("mv225");
    lock[226] = CreateLock("lock226");
    cv[226] = CreateCV("cv226");
    mv[226] = CreateMV("mv226");
    lock[227] = CreateLock("lock227");
    cv[227] = CreateCV("cv227");
    mv[227] = CreateMV("mv227");
    lock[228] = CreateLock("lock228");
    cv[228] = CreateCV("cv228");
    mv[228] = CreateMV("mv228");
    lock[229] = CreateLock("lock229");
    cv[229] = CreateCV("cv229");
    mv[229] = CreateMV("mv229");
    lock[230] = CreateLock("lock230");
    cv[230] = CreateCV("cv230");
    mv[230] = CreateMV("mv230");
    lock[231] = CreateLock("lock231");
    cv[231] = CreateCV("cv231");
    mv[231] = CreateMV("mv231");
    lock[232] = CreateLock("lock232");
    cv[232] = CreateCV("cv232");
    mv[232] = CreateMV("mv232");
    lock[233] = CreateLock("lock233");
    cv[233] = CreateCV("cv233");
    mv[233] = CreateMV("mv233");
    lock[234] = CreateLock("lock234");
    cv[234] = CreateCV("cv234");
    mv[234] = CreateMV("mv234");
    lock[235] = CreateLock("lock235");
    cv[235] = CreateCV("cv235");
    mv[235] = CreateMV("mv235");
    lock[236] = CreateLock("lock236");
    cv[236] = CreateCV("cv236");
    mv[236] = CreateMV("mv236");
    lock[237] = CreateLock("lock237");
    cv[237] = CreateCV("cv237");
    mv[237] = CreateMV("mv237");
    lock[238] = CreateLock("lock238");
    cv[238] = CreateCV("cv238");
    mv[238] = CreateMV("mv238");
    lock[239] = CreateLock("lock239");
    cv[239] = CreateCV("cv239");
    mv[239] = CreateMV("mv239");
    lock[240] = CreateLock("lock240");
    cv[240] = CreateCV("cv240");
    mv[240] = CreateMV("mv240");
    lock[241] = CreateLock("lock241");
    cv[241] = CreateCV("cv241");
    mv[241] = CreateMV("mv241");
    lock[242] = CreateLock("lock242");
    cv[242] = CreateCV("cv242");
    mv[242] = CreateMV("mv242");
    lock[243] = CreateLock("lock243");
    cv[243] = CreateCV("cv243");
    mv[243] = CreateMV("mv243");
    lock[244] = CreateLock("lock244");
    cv[244] = CreateCV("cv244");
    mv[244] = CreateMV("mv244");
    lock[245] = CreateLock("lock245");
    cv[245] = CreateCV("cv245");
    mv[245] = CreateMV("mv245");
    lock[246] = CreateLock("lock246");
    cv[246] = CreateCV("cv246");
    mv[246] = CreateMV("mv246");
    lock[247] = CreateLock("lock247");
    cv[247] = CreateCV("cv247");
    mv[247] = CreateMV("mv247");
    lock[248] = CreateLock("lock248");
    cv[248] = CreateCV("cv248");
    mv[248] = CreateMV("mv248");
    lock[249] = CreateLock("lock249");
    cv[249] = CreateCV("cv249");
    mv[249] = CreateMV("mv249");

    lock[250] = CreateLock("lock250");
    cv[250] = CreateCV("cv250");
    mv[250] = CreateMV("mv250");

    AcquireLock("lock0");
    AcquireLock("lock1");
    AcquireLock("lock2");
    AcquireLock("lock3");
    AcquireLock("lock4");
    AcquireLock("lock5");
    AcquireLock("lock6");
    AcquireLock("lock7");
    AcquireLock("lock8");
    AcquireLock("lock9");
    AcquireLock("lock10");
    AcquireLock("lock11");
    AcquireLock("lock12");
    AcquireLock("lock13");
    AcquireLock("lock14");
    AcquireLock("lock15");
    AcquireLock("lock16");
    AcquireLock("lock17");
    AcquireLock("lock18");
    AcquireLock("lock19");
    AcquireLock("lock20");
    AcquireLock("lock21");
    AcquireLock("lock22");
    AcquireLock("lock23");
    AcquireLock("lock24");
    AcquireLock("lock25");
    AcquireLock("lock26");
    AcquireLock("lock27");
    AcquireLock("lock28");
    AcquireLock("lock29");
    AcquireLock("lock30");
    AcquireLock("lock31");
    AcquireLock("lock32");
    AcquireLock("lock33");
    AcquireLock("lock34");
    AcquireLock("lock35");
    AcquireLock("lock36");
    AcquireLock("lock37");
    AcquireLock("lock38");
    AcquireLock("lock39");
    AcquireLock("lock40");
    AcquireLock("lock41");
    AcquireLock("lock42");
    AcquireLock("lock43");
    AcquireLock("lock44");
    AcquireLock("lock45");
    AcquireLock("lock46");
    AcquireLock("lock47");
    AcquireLock("lock48");
    AcquireLock("lock49");
    AcquireLock("lock50");
    AcquireLock("lock51");
    AcquireLock("lock52");
    AcquireLock("lock53");
    AcquireLock("lock54");
    AcquireLock("lock55");
    AcquireLock("lock56");
    AcquireLock("lock57");
    AcquireLock("lock58");
    AcquireLock("lock59");
    AcquireLock("lock60");
    AcquireLock("lock61");
    AcquireLock("lock62");
    AcquireLock("lock63");
    AcquireLock("lock64");
    AcquireLock("lock65");
    AcquireLock("lock66");
    AcquireLock("lock67");
    AcquireLock("lock68");
    AcquireLock("lock69");
    AcquireLock("lock70");
    AcquireLock("lock71");
    AcquireLock("lock72");
    AcquireLock("lock73");
    AcquireLock("lock74");
    AcquireLock("lock75");
    AcquireLock("lock76");
    AcquireLock("lock77");
    AcquireLock("lock78");
    AcquireLock("lock79");
    AcquireLock("lock80");
    AcquireLock("lock81");
    AcquireLock("lock82");
    AcquireLock("lock83");
    AcquireLock("lock84");
    AcquireLock("lock85");
    AcquireLock("lock86");
    AcquireLock("lock87");
    AcquireLock("lock88");
    AcquireLock("lock89");
    AcquireLock("lock90");
    AcquireLock("lock91");
    AcquireLock("lock92");
    AcquireLock("lock93");
    AcquireLock("lock94");
    AcquireLock("lock95");
    AcquireLock("lock96");
    AcquireLock("lock97");
    AcquireLock("lock98");
    AcquireLock("lock99");
    AcquireLock("lock100");
    AcquireLock("lock101");
    AcquireLock("lock102");
    AcquireLock("lock103");
    AcquireLock("lock104");
    AcquireLock("lock105");
    AcquireLock("lock106");
    AcquireLock("lock107");
    AcquireLock("lock108");
    AcquireLock("lock109");
    AcquireLock("lock110");
    AcquireLock("lock111");
    AcquireLock("lock112");
    AcquireLock("lock113");
    AcquireLock("lock114");
    AcquireLock("lock115");
    AcquireLock("lock116");
    AcquireLock("lock117");
    AcquireLock("lock118");
    AcquireLock("lock119");
    AcquireLock("lock120");
    AcquireLock("lock121");
    AcquireLock("lock122");
    AcquireLock("lock123");
    AcquireLock("lock124");
    AcquireLock("lock125");
    AcquireLock("lock126");
    AcquireLock("lock127");
    AcquireLock("lock128");
    AcquireLock("lock129");
    AcquireLock("lock130");
    AcquireLock("lock131");
    AcquireLock("lock132");
    AcquireLock("lock133");
    AcquireLock("lock134");
    AcquireLock("lock135");
    AcquireLock("lock136");
    AcquireLock("lock137");
    AcquireLock("lock138");
    AcquireLock("lock139");
    AcquireLock("lock140");
    AcquireLock("lock141");
    AcquireLock("lock142");
    AcquireLock("lock143");
    AcquireLock("lock144");
    AcquireLock("lock145");
    AcquireLock("lock146");
    AcquireLock("lock147");
    AcquireLock("lock148");
    AcquireLock("lock149");
    AcquireLock("lock150");
    AcquireLock("lock151");
    AcquireLock("lock152");
    AcquireLock("lock153");
    AcquireLock("lock154");
    AcquireLock("lock155");
    AcquireLock("lock156");
    AcquireLock("lock157");
    AcquireLock("lock158");
    AcquireLock("lock159");
    AcquireLock("lock160");
    AcquireLock("lock161");
    AcquireLock("lock162");
    AcquireLock("lock163");
    AcquireLock("lock164");
    AcquireLock("lock165");
    AcquireLock("lock166");
    AcquireLock("lock167");
    AcquireLock("lock168");
    AcquireLock("lock169");
    AcquireLock("lock170");
    AcquireLock("lock171");
    AcquireLock("lock172");
    AcquireLock("lock173");
    AcquireLock("lock174");
    AcquireLock("lock175");
    AcquireLock("lock176");
    AcquireLock("lock177");
    AcquireLock("lock178");
    AcquireLock("lock179");
    AcquireLock("lock180");
    AcquireLock("lock181");
    AcquireLock("lock182");
    AcquireLock("lock183");
    AcquireLock("lock184");
    AcquireLock("lock185");
    AcquireLock("lock186");
    AcquireLock("lock187");
    AcquireLock("lock188");
    AcquireLock("lock189");
    AcquireLock("lock190");
    AcquireLock("lock191");
    AcquireLock("lock192");
    AcquireLock("lock193");
    AcquireLock("lock194");
    AcquireLock("lock195");
    AcquireLock("lock196");
    AcquireLock("lock197");
    AcquireLock("lock198");
    AcquireLock("lock199");
    AcquireLock("lock200");
    AcquireLock("lock201");
    AcquireLock("lock202");
    AcquireLock("lock203");
    AcquireLock("lock204");
    AcquireLock("lock205");
    AcquireLock("lock206");
    AcquireLock("lock207");
    AcquireLock("lock208");
    AcquireLock("lock209");
    AcquireLock("lock210");
    AcquireLock("lock211");
    AcquireLock("lock212");
    AcquireLock("lock213");
    AcquireLock("lock214");
    AcquireLock("lock215");
    AcquireLock("lock216");
    AcquireLock("lock217");
    AcquireLock("lock218");
    AcquireLock("lock219");
    AcquireLock("lock220");
    AcquireLock("lock221");
    AcquireLock("lock222");
    AcquireLock("lock223");
    AcquireLock("lock224");
    AcquireLock("lock225");
    AcquireLock("lock226");
    AcquireLock("lock227");
    AcquireLock("lock228");
    AcquireLock("lock229");
    AcquireLock("lock230");
    AcquireLock("lock231");
    AcquireLock("lock232");
    AcquireLock("lock233");
    AcquireLock("lock234");
    AcquireLock("lock235");
    AcquireLock("lock236");
    AcquireLock("lock237");
    AcquireLock("lock238");
    AcquireLock("lock239");
    AcquireLock("lock240");
    AcquireLock("lock241");
    AcquireLock("lock242");
    AcquireLock("lock243");
    AcquireLock("lock244");
    AcquireLock("lock245");
    AcquireLock("lock246");
    AcquireLock("lock247");
    AcquireLock("lock248");
    AcquireLock("lock249");

    ReleaseLock("lock0");
    ReleaseLock("lock1");
    ReleaseLock("lock2");
    ReleaseLock("lock3");
    ReleaseLock("lock4");
    ReleaseLock("lock5");
    ReleaseLock("lock6");
    ReleaseLock("lock7");
    ReleaseLock("lock8");
    ReleaseLock("lock9");
    ReleaseLock("lock10");
    ReleaseLock("lock11");
    ReleaseLock("lock12");
    ReleaseLock("lock13");
    ReleaseLock("lock14");
    ReleaseLock("lock15");
    ReleaseLock("lock16");
    ReleaseLock("lock17");
    ReleaseLock("lock18");
    ReleaseLock("lock19");
    ReleaseLock("lock20");
    ReleaseLock("lock21");
    ReleaseLock("lock22");
    ReleaseLock("lock23");
    ReleaseLock("lock24");
    ReleaseLock("lock25");
    ReleaseLock("lock26");
    ReleaseLock("lock27");
    ReleaseLock("lock28");
    ReleaseLock("lock29");
    ReleaseLock("lock30");
    ReleaseLock("lock31");
    ReleaseLock("lock32");
    ReleaseLock("lock33");
    ReleaseLock("lock34");
    ReleaseLock("lock35");
    ReleaseLock("lock36");
    ReleaseLock("lock37");
    ReleaseLock("lock38");
    ReleaseLock("lock39");
    ReleaseLock("lock40");
    ReleaseLock("lock41");
    ReleaseLock("lock42");
    ReleaseLock("lock43");
    ReleaseLock("lock44");
    ReleaseLock("lock45");
    ReleaseLock("lock46");
    ReleaseLock("lock47");
    ReleaseLock("lock48");
    ReleaseLock("lock49");
    ReleaseLock("lock50");
    ReleaseLock("lock51");
    ReleaseLock("lock52");
    ReleaseLock("lock53");
    ReleaseLock("lock54");
    ReleaseLock("lock55");
    ReleaseLock("lock56");
    ReleaseLock("lock57");
    ReleaseLock("lock58");
    ReleaseLock("lock59");
    ReleaseLock("lock60");
    ReleaseLock("lock61");
    ReleaseLock("lock62");
    ReleaseLock("lock63");
    ReleaseLock("lock64");
    ReleaseLock("lock65");
    ReleaseLock("lock66");
    ReleaseLock("lock67");
    ReleaseLock("lock68");
    ReleaseLock("lock69");
    ReleaseLock("lock70");
    ReleaseLock("lock71");
    ReleaseLock("lock72");
    ReleaseLock("lock73");
    ReleaseLock("lock74");
    ReleaseLock("lock75");
    ReleaseLock("lock76");
    ReleaseLock("lock77");
    ReleaseLock("lock78");
    ReleaseLock("lock79");
    ReleaseLock("lock80");
    ReleaseLock("lock81");
    ReleaseLock("lock82");
    ReleaseLock("lock83");
    ReleaseLock("lock84");
    ReleaseLock("lock85");
    ReleaseLock("lock86");
    ReleaseLock("lock87");
    ReleaseLock("lock88");
    ReleaseLock("lock89");
    ReleaseLock("lock90");
    ReleaseLock("lock91");
    ReleaseLock("lock92");
    ReleaseLock("lock93");
    ReleaseLock("lock94");
    ReleaseLock("lock95");
    ReleaseLock("lock96");
    ReleaseLock("lock97");
    ReleaseLock("lock98");
    ReleaseLock("lock99");
    ReleaseLock("lock100");
    ReleaseLock("lock101");
    ReleaseLock("lock102");
    ReleaseLock("lock103");
    ReleaseLock("lock104");
    ReleaseLock("lock105");
    ReleaseLock("lock106");
    ReleaseLock("lock107");
    ReleaseLock("lock108");
    ReleaseLock("lock109");
    ReleaseLock("lock110");
    ReleaseLock("lock111");
    ReleaseLock("lock112");
    ReleaseLock("lock113");
    ReleaseLock("lock114");
    ReleaseLock("lock115");
    ReleaseLock("lock116");
    ReleaseLock("lock117");
    ReleaseLock("lock118");
    ReleaseLock("lock119");
    ReleaseLock("lock120");
    ReleaseLock("lock121");
    ReleaseLock("lock122");
    ReleaseLock("lock123");
    ReleaseLock("lock124");
    ReleaseLock("lock125");
    ReleaseLock("lock126");
    ReleaseLock("lock127");
    ReleaseLock("lock128");
    ReleaseLock("lock129");
    ReleaseLock("lock130");
    ReleaseLock("lock131");
    ReleaseLock("lock132");
    ReleaseLock("lock133");
    ReleaseLock("lock134");
    ReleaseLock("lock135");
    ReleaseLock("lock136");
    ReleaseLock("lock137");
    ReleaseLock("lock138");
    ReleaseLock("lock139");
    ReleaseLock("lock140");
    ReleaseLock("lock141");
    ReleaseLock("lock142");
    ReleaseLock("lock143");
    ReleaseLock("lock144");
    ReleaseLock("lock145");
    ReleaseLock("lock146");
    ReleaseLock("lock147");
    ReleaseLock("lock148");
    ReleaseLock("lock149");
    ReleaseLock("lock150");
    ReleaseLock("lock151");
    ReleaseLock("lock152");
    ReleaseLock("lock153");
    ReleaseLock("lock154");
    ReleaseLock("lock155");
    ReleaseLock("lock156");
    ReleaseLock("lock157");
    ReleaseLock("lock158");
    ReleaseLock("lock159");
    ReleaseLock("lock160");
    ReleaseLock("lock161");
    ReleaseLock("lock162");
    ReleaseLock("lock163");
    ReleaseLock("lock164");
    ReleaseLock("lock165");
    ReleaseLock("lock166");
    ReleaseLock("lock167");
    ReleaseLock("lock168");
    ReleaseLock("lock169");
    ReleaseLock("lock170");
    ReleaseLock("lock171");
    ReleaseLock("lock172");
    ReleaseLock("lock173");
    ReleaseLock("lock174");
    ReleaseLock("lock175");
    ReleaseLock("lock176");
    ReleaseLock("lock177");
    ReleaseLock("lock178");
    ReleaseLock("lock179");
    ReleaseLock("lock180");
    ReleaseLock("lock181");
    ReleaseLock("lock182");
    ReleaseLock("lock183");
    ReleaseLock("lock184");
    ReleaseLock("lock185");
    ReleaseLock("lock186");
    ReleaseLock("lock187");
    ReleaseLock("lock188");
    ReleaseLock("lock189");
    ReleaseLock("lock190");
    ReleaseLock("lock191");
    ReleaseLock("lock192");
    ReleaseLock("lock193");
    ReleaseLock("lock194");
    ReleaseLock("lock195");
    ReleaseLock("lock196");
    ReleaseLock("lock197");
    ReleaseLock("lock198");
    ReleaseLock("lock199");
    ReleaseLock("lock200");
    ReleaseLock("lock201");
    ReleaseLock("lock202");
    ReleaseLock("lock203");
    ReleaseLock("lock204");
    ReleaseLock("lock205");
    ReleaseLock("lock206");
    ReleaseLock("lock207");
    ReleaseLock("lock208");
    ReleaseLock("lock209");
    ReleaseLock("lock210");
    ReleaseLock("lock211");
    ReleaseLock("lock212");
    ReleaseLock("lock213");
    ReleaseLock("lock214");
    ReleaseLock("lock215");
    ReleaseLock("lock216");
    ReleaseLock("lock217");
    ReleaseLock("lock218");
    ReleaseLock("lock219");
    ReleaseLock("lock220");
    ReleaseLock("lock221");
    ReleaseLock("lock222");
    ReleaseLock("lock223");
    ReleaseLock("lock224");
    ReleaseLock("lock225");
    ReleaseLock("lock226");
    ReleaseLock("lock227");
    ReleaseLock("lock228");
    ReleaseLock("lock229");
    ReleaseLock("lock230");
    ReleaseLock("lock231");
    ReleaseLock("lock232");
    ReleaseLock("lock233");
    ReleaseLock("lock234");
    ReleaseLock("lock235");
    ReleaseLock("lock236");
    ReleaseLock("lock237");
    ReleaseLock("lock238");
    ReleaseLock("lock239");
    ReleaseLock("lock240");
    ReleaseLock("lock241");
    ReleaseLock("lock242");
    ReleaseLock("lock243");
    ReleaseLock("lock244");
    ReleaseLock("lock245");
    ReleaseLock("lock246");
    ReleaseLock("lock247");
    ReleaseLock("lock248");
    ReleaseLock("lock249");

    AcquireLock("-lock12");
    ReleaseLock("-lock12");
    AcquireLock("lock1000");
    ReleaseLock("lock1000");
    DestroyLock("lock-12");
    DestroyLock("lock1000");

    Print("Stress test ends..\n",-1,-1,-1);

    Exit(0);
}