From 1d01c43297b9f72be81e150026478eb8d75cced9 Mon Sep 17 00:00:00 2001 From: compudj Date: Tue, 7 Oct 2008 18:40:39 +0000 Subject: [PATCH] update test git-svn-id: http://ltt.polymtl.ca/svn@3079 04897980-b3bd-0310-b5e0-8ef037075253 --- trunk/tests/kernel/test-psrwlock.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/trunk/tests/kernel/test-psrwlock.c b/trunk/tests/kernel/test-psrwlock.c index 7a22da73..e5726774 100644 --- a/trunk/tests/kernel/test-psrwlock.c +++ b/trunk/tests/kernel/test-psrwlock.c @@ -33,7 +33,7 @@ * 1 : test standard rwlock * 0 : test psrwlock */ -#define TEST_STD_RWLOCK 0 +#define TEST_STD_RWLOCK 1 /* * 1 : test with thread and interrupt readers. @@ -143,20 +143,28 @@ CHECK_PSRWLOCK_MAP(psrwlock, PSRWLOCKWCTX, PSRWLOCKRCTX); #if (TEST_PREEMPT) -#define wrap_read_lock() psread_lock(&psrwlock) -#define wrap_read_trylock() psread_trylock(&psrwlock) +#define wrap_read_lock() \ + psread_lock(&psrwlock, PSRWLOCKWCTX, PSRWLOCKRCTX) +#define wrap_read_trylock() \ + psread_trylock(&psrwlock, PSRWLOCKWCTX, PSRWLOCKRCTX) #else -#define wrap_read_lock() psread_lock_inatomic(&psrwlock) -#define wrap_read_trylock() psread_trylock_inatomic(&psrwlock) +#define wrap_read_lock() \ + psread_lock_inatomic(&psrwlock, PSRWLOCKWCTX, PSRWLOCKRCTX) +#define wrap_read_trylock() \ + psread_trylock_inatomic(&psrwlock, PSRWLOCKWCTX, PSRWLOCKRCTX) #endif -#define wrap_read_unlock() psread_unlock(&psrwlock) +#define wrap_read_unlock() \ + psread_unlock(&psrwlock, PSRWLOCKWCTX, PSRWLOCKRCTX) -#define wrap_read_lock_inatomic() psread_lock_inatomic(&psrwlock) +#define wrap_read_lock_inatomic() \ + psread_lock_inatomic(&psrwlock, PSRWLOCKWCTX, PSRWLOCKRCTX) #define wrap_read_trylock_inatomic() \ - psread_trylock_inatomic(&psrwlock) + psread_trylock_inatomic(&psrwlock, PSRWLOCKWCTX, PSRWLOCKRCTX) -#define wrap_read_lock_irq() psread_lock_irq(&psrwlock) -#define wrap_read_trylock_irq() psread_trylock_irq(&psrwlock) +#define wrap_read_lock_irq() \ + psread_lock_irq(&psrwlock, PSRWLOCKWCTX, PSRWLOCKRCTX) +#define wrap_read_trylock_irq() \ + psread_trylock_irq(&psrwlock, PSRWLOCKWCTX, PSRWLOCKRCTX) #define wrap_write_lock() \ pswrite_lock(&psrwlock, PSRWLOCKWCTX, PSRWLOCKRCTX) -- 2.34.1