tools/memory-model: Remove redundant initialization in litmus tests
This is a revert of commit 1947bfcf81
("tools/memory-model: Add types
to litmus tests") with conflict resolutions.
klitmus7 [1] is aware of default types of "int" and "int*".
It accepts litmus tests for herd7 without extra type info unless
non-"int" variables are referenced by an "exists", "locations",
or "filter" directive.
[1]: Tested with klitmus7 versions 7.49 or later.
Suggested-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
This commit is contained in:
Родитель
8881e7a774
Коммит
5c587f9b9c
|
@ -7,9 +7,7 @@ C CoRR+poonceonce+Once
|
|||
* reads from the same variable are ordered.
|
||||
*)
|
||||
|
||||
{
|
||||
int x;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x)
|
||||
{
|
||||
|
|
|
@ -7,9 +7,7 @@ C CoRW+poonceonce+Once
|
|||
* a given variable and a later write to that same variable are ordered.
|
||||
*)
|
||||
|
||||
{
|
||||
int x;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x)
|
||||
{
|
||||
|
|
|
@ -7,9 +7,7 @@ C CoWR+poonceonce+Once
|
|||
* given variable and a later read from that same variable are ordered.
|
||||
*)
|
||||
|
||||
{
|
||||
int x;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x)
|
||||
{
|
||||
|
|
|
@ -7,9 +7,7 @@ C CoWW+poonceonce
|
|||
* writes to the same variable are ordered.
|
||||
*)
|
||||
|
||||
{
|
||||
int x;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x)
|
||||
{
|
||||
|
|
|
@ -10,10 +10,7 @@ C IRIW+fencembonceonces+OnceOnce
|
|||
* process? This litmus test exercises LKMM's "propagation" rule.
|
||||
*)
|
||||
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x)
|
||||
{
|
||||
|
|
|
@ -10,10 +10,7 @@ C IRIW+poonceonces+OnceOnce
|
|||
* different process?
|
||||
*)
|
||||
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x)
|
||||
{
|
||||
|
|
|
@ -7,12 +7,7 @@ C ISA2+pooncelock+pooncelock+pombonce
|
|||
* (in P0() and P1()) is visible to external process P2().
|
||||
*)
|
||||
|
||||
{
|
||||
spinlock_t mylock;
|
||||
int x;
|
||||
int y;
|
||||
int z;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x, int *y, spinlock_t *mylock)
|
||||
{
|
||||
|
|
|
@ -9,11 +9,7 @@ C ISA2+poonceonces
|
|||
* of the smp_load_acquire() invocations are replaced by READ_ONCE()?
|
||||
*)
|
||||
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
int z;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x, int *y)
|
||||
{
|
||||
|
|
|
@ -11,11 +11,7 @@ C ISA2+pooncerelease+poacquirerelease+poacquireonce
|
|||
* (AKA non-rf) link, so release-acquire is all that is needed.
|
||||
*)
|
||||
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
int z;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x, int *y)
|
||||
{
|
||||
|
|
|
@ -11,10 +11,7 @@ C LB+fencembonceonce+ctrlonceonce
|
|||
* another control dependency and order would still be maintained.)
|
||||
*)
|
||||
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x, int *y)
|
||||
{
|
||||
|
|
|
@ -8,10 +8,7 @@ C LB+poacquireonce+pooncerelease
|
|||
* to the other?
|
||||
*)
|
||||
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x, int *y)
|
||||
{
|
||||
|
|
|
@ -7,10 +7,7 @@ C LB+poonceonces
|
|||
* be prevented even with no explicit ordering?
|
||||
*)
|
||||
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x, int *y)
|
||||
{
|
||||
|
|
|
@ -8,10 +8,7 @@ C MP+fencewmbonceonce+fencermbonceonce
|
|||
* is usually better to use smp_store_release() and smp_load_acquire().
|
||||
*)
|
||||
|
||||
{
|
||||
int buf;
|
||||
int flag;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *buf, int *flag) // Producer
|
||||
{
|
||||
|
|
|
@ -10,9 +10,7 @@ C MP+onceassign+derefonce
|
|||
*)
|
||||
|
||||
{
|
||||
int *p=y;
|
||||
int x;
|
||||
int y=0;
|
||||
p=y;
|
||||
}
|
||||
|
||||
P0(int *x, int **p) // Producer
|
||||
|
|
|
@ -10,10 +10,7 @@ C MP+polockmbonce+poacquiresilsil
|
|||
* executed before the lock was acquired (loosely speaking).
|
||||
*)
|
||||
|
||||
{
|
||||
spinlock_t lo;
|
||||
int x;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(spinlock_t *lo, int *x) // Producer
|
||||
{
|
||||
|
|
|
@ -10,10 +10,7 @@ C MP+polockonce+poacquiresilsil
|
|||
* speaking).
|
||||
*)
|
||||
|
||||
{
|
||||
spinlock_t lo;
|
||||
int x;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(spinlock_t *lo, int *x) // Producer
|
||||
{
|
||||
|
|
|
@ -11,11 +11,7 @@ C MP+polocks
|
|||
* to see all prior accesses by those other CPUs.
|
||||
*)
|
||||
|
||||
{
|
||||
spinlock_t mylock;
|
||||
int buf;
|
||||
int flag;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *buf, int *flag, spinlock_t *mylock) // Producer
|
||||
{
|
||||
|
|
|
@ -7,10 +7,7 @@ C MP+poonceonces
|
|||
* no ordering at all?
|
||||
*)
|
||||
|
||||
{
|
||||
int buf;
|
||||
int flag;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *buf, int *flag) // Producer
|
||||
{
|
||||
|
|
|
@ -8,10 +8,7 @@ C MP+pooncerelease+poacquireonce
|
|||
* pattern.
|
||||
*)
|
||||
|
||||
{
|
||||
int buf;
|
||||
int flag;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *buf, int *flag) // Producer
|
||||
{
|
||||
|
|
|
@ -11,11 +11,7 @@ C MP+porevlocks
|
|||
* see all prior accesses by those other CPUs.
|
||||
*)
|
||||
|
||||
{
|
||||
spinlock_t mylock;
|
||||
int buf;
|
||||
int flag;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *buf, int *flag, spinlock_t *mylock) // Consumer
|
||||
{
|
||||
|
|
|
@ -9,10 +9,7 @@ C R+fencembonceonces
|
|||
* cause the resulting test to be allowed.
|
||||
*)
|
||||
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x, int *y)
|
||||
{
|
||||
|
|
|
@ -8,10 +8,7 @@ C R+poonceonces
|
|||
* store propagation delays.
|
||||
*)
|
||||
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x, int *y)
|
||||
{
|
||||
|
|
|
@ -7,10 +7,7 @@ C S+fencewmbonceonce+poacquireonce
|
|||
* store against a subsequent store?
|
||||
*)
|
||||
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x, int *y)
|
||||
{
|
||||
|
|
|
@ -9,10 +9,7 @@ C S+poonceonces
|
|||
* READ_ONCE(), is ordering preserved?
|
||||
*)
|
||||
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x, int *y)
|
||||
{
|
||||
|
|
|
@ -9,10 +9,7 @@ C SB+fencembonceonces
|
|||
* suffice, but not much else.)
|
||||
*)
|
||||
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x, int *y)
|
||||
{
|
||||
|
|
|
@ -8,10 +8,7 @@ C SB+poonceonces
|
|||
* variable that the preceding process reads.
|
||||
*)
|
||||
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x, int *y)
|
||||
{
|
||||
|
|
|
@ -6,10 +6,7 @@ C SB+rfionceonce-poonceonces
|
|||
* This litmus test demonstrates that LKMM is not fully multicopy atomic.
|
||||
*)
|
||||
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x, int *y)
|
||||
{
|
||||
|
|
|
@ -8,10 +8,7 @@ C WRC+poonceonces+Once
|
|||
* test has no ordering at all.
|
||||
*)
|
||||
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x)
|
||||
{
|
||||
|
|
|
@ -10,10 +10,7 @@ C WRC+pooncerelease+fencermbonceonce+Once
|
|||
* is A-cumulative in LKMM.
|
||||
*)
|
||||
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x)
|
||||
{
|
||||
|
|
|
@ -9,12 +9,7 @@ C Z6.0+pooncelock+poonceLock+pombonce
|
|||
* by CPUs not holding that lock.
|
||||
*)
|
||||
|
||||
{
|
||||
spinlock_t mylock;
|
||||
int x;
|
||||
int y;
|
||||
int z;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x, int *y, spinlock_t *mylock)
|
||||
{
|
||||
|
|
|
@ -8,12 +8,7 @@ C Z6.0+pooncelock+pooncelock+pombonce
|
|||
* seen as ordered by a third process not holding that lock.
|
||||
*)
|
||||
|
||||
{
|
||||
spinlock_t mylock;
|
||||
int x;
|
||||
int y;
|
||||
int z;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x, int *y, spinlock_t *mylock)
|
||||
{
|
||||
|
|
|
@ -14,11 +14,7 @@ C Z6.0+pooncerelease+poacquirerelease+fencembonceonce
|
|||
* involving locking.)
|
||||
*)
|
||||
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
int z;
|
||||
}
|
||||
{}
|
||||
|
||||
P0(int *x, int *y)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче