aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/sched-migration.py
diff options
context:
space:
mode:
authorIngo Molnar <[email protected]>2023-10-13 10:15:46 +0200
committerIngo Molnar <[email protected]>2023-10-14 11:06:15 +0200
commit886ee55eabac0d46faf8bc0b22207ca2740847ba (patch)
treec8a64934abca06127367ecafcb68805206f78688 /tools/perf/scripts/python/sched-migration.py
parentac8b60be078abebc3ab8836f3f0ecac6980e0b4f (diff)
locking/seqlock: Propagate 'const' pointers within read-only methods, remove forced type casts
Currently __seqprop_ptr() is an inline function that must chose to either use 'const' or non-const seqcount related pointers - but this results in the undesirable loss of 'const' propagation, via a forced type cast. The easiest solution would be to turn the pointer wrappers into macros that pass through whatever type is passed to them - but the clever maze of seqlock API instantiation macros relies on the GCC CPP '##' macro extension, which isn't recursive, so inline functions must be used here. So create two wrapper variants instead: 'ptr' and 'const_ptr', and pick the right one for the codepaths that are const: read_seqcount_begin() and read_seqcount_retry(). This cleans up type handling and allows the removal of all type forcing. No change in functionality. Signed-off-by: Ingo Molnar <[email protected]> Reviewed-by: Oleg Nesterov <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Waiman Long <[email protected]> Cc: Will Deacon <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Paul E. McKenney <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/sched-migration.py')
0 files changed, 0 insertions, 0 deletions