(void)Test("LockFile non-contentious locking/unlocking", NonContentiousLock, loops, 0);
duration = Test("LockFile non-contentious locking/unlocking", NonContentiousLock, loops, 0);
int main(int argc,  char **argv){    PRBool rv = PR_TRUE;    PRIntervalTime duration;    PRUint32 cpu, cpus = 2, loops = 100;		/* The command line argument: -d is used to determine if the test is being run	in debug mode. The regress tool requires only one line output:PASS or FAIL.	All of the printfs associated with this test has been handled with a if (debug_mode)	test.	Usage: test_name -d	*/	PLOptStatus os;	PLOptState *opt = PL_CreateOptState(argc, argv, "d:");	while (PL_OPT_EOL != (os = PL_GetNextOpt(opt)))    {		if (PL_OPT_BAD == os) continue;        switch (opt->option)        {        case 'd':  /* debug mode */			debug_mode = 1;            break;         default:            break;        }    }	PL_DestroyOptState(opt); /* main test */	    PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);    PR_STDIO_INIT();#ifdef XP_MAC	SetupMacPrintfLog("lockfile.log");	debug_mode = 1;#endif    if (argc > 1) loops = atoi(argv[1]);    if (loops == 0) loops = 100;    if (debug_mode) printf("Lock: Using %d loops\n", loops);    cpus = (argc < 3) ? 2 : atoi(argv[2]);    if (cpus == 0) cpus = 2;    if (debug_mode) printf("Lock: Using %d cpu(s)\n", cpus);    for (cpu = 1; cpu <= cpus; ++cpu)    {        if (debug_mode) printf("\nLockFile: Using %d CPU(s)\n", cpu);        PR_SetConcurrency(cpu);                (void)Test("LockFile non-contentious locking/unlocking", NonContentiousLock, loops, 0);        (void)Test("LockFile contentious locking/unlocking", ContentiousLock, loops, duration);    }    PR_Delete(LOCKFILE);  /* try to get rid of evidence */    if (debug_mode) printf("%s: test %s\n", "Lock(mutex) test", ((rv) ? "passed" : "failed"));	else {		if (!rv)			failed_already=1;	}	if(failed_already)			return 1;	else		return 0;}  /* main */