From: BALBIR S. <bal...@wi...> - 2001-12-27 08:39:14
|
| |The test routine goes something like this: | |#define TOT_LOCK_ACS 200000000 | |static void test_mcslock(int num) |{ | int i; | mcsnode_t node; | unsigned int flags; | local_irq_save(flags); (1) cycb3[num] = get_cycles(); | for (i=0; i< TOT_LOCK_ACS; i++) { | mcs_lock(&mcslock, &node); | mb(); | mcs_unlock(&mcslock, &node); | } (2) cyca3[num] = get_cycles(); | local_irq_restore(flags); |} Are u sure there is no overflow between (1) and (2)? Do the threads call this routine from an IRQ context? Balbir |