Commit 3fb65f6
net: pktgen: Use wait_event_freezable_timeout() for freezable kthread
A freezable kernel thread can enter frozen state during freezing by
either calling try_to_freeze() or using wait_event_freezable() and its
variants. So for the following snippet of code in a kernel thread loop:
wait_event_interruptible_timeout();
try_to_freeze();
We can change it to a simple wait_event_freezable_timeout() and then
eliminate a function call.
Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 2f7ccf1 commit 3fb65f6
1 file changed
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3669 | 3669 | | |
3670 | 3670 | | |
3671 | 3671 | | |
3672 | | - | |
3673 | | - | |
3674 | | - | |
3675 | | - | |
| 3672 | + | |
| 3673 | + | |
3676 | 3674 | | |
3677 | 3675 | | |
3678 | 3676 | | |
| |||
0 commit comments