kernel - Fix auto port assignment collision in network code
[dragonfly.git] / sys / dev / drm / scripts / linux_spin_locks.cocci
blob8f48ac740ab52e23c9642521f47660007eca57dc
1 // Replace Linux spin_lock/spin_unlock calls by lockmgr ones
2 // Usage: spatch --no-includes --sp-file scripts/linux_spin_locks.cocci --in-place <files>
4 @@ expression E1, E2; @@
7 - spin_lock(E1);
8 + lockmgr(E1, LK_EXCLUSIVE);
10 - spin_unlock(E1);
11 + lockmgr(E1, LK_RELEASE);
13 - spin_trylock(E1);
14 + lockmgr_try(E1, LK_EXCLUSIVE);
16 - spin_lock_nested(E1, E2);
17 + lockmgr(E1, LK_EXCLUSIVE);