Commit 82a9bc4
kernel: Add support for stopping workqueues
This patch adds support for stopping workqueues. This is useful for freeing
resources from workqueues when subsystems/modules is deactivated or
cleaning up the system between tests in ztest to reach a fully normalized
state.
The patch adds a new function k_work_queue_stop() that releases the
workqueues thread and stack when a workqueue is unwanted.
k_work_queue_stop(...) should be viewed as a counterpart to
k_work_queue_start(...).
This would allow to:
k_work_queue_start(...);
k_work_drain(..., true);
k_work_queue_stop(...);
Signed-off-by: Måns Ansgariusson <[email protected]>1 parent 2907a96 commit 82a9bc4
2 files changed
+53
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3606 | 3606 | | |
3607 | 3607 | | |
3608 | 3608 | | |
| 3609 | + | |
| 3610 | + | |
| 3611 | + | |
| 3612 | + | |
| 3613 | + | |
| 3614 | + | |
| 3615 | + | |
| 3616 | + | |
| 3617 | + | |
| 3618 | + | |
| 3619 | + | |
| 3620 | + | |
| 3621 | + | |
| 3622 | + | |
| 3623 | + | |
| 3624 | + | |
3609 | 3625 | | |
3610 | 3626 | | |
3611 | 3627 | | |
| |||
3915 | 3931 | | |
3916 | 3932 | | |
3917 | 3933 | | |
| 3934 | + | |
| 3935 | + | |
3918 | 3936 | | |
3919 | 3937 | | |
3920 | 3938 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
656 | 662 | | |
657 | 663 | | |
658 | 664 | | |
| |||
812 | 818 | | |
813 | 819 | | |
814 | 820 | | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
815 | 850 | | |
816 | 851 | | |
817 | 852 | | |
| |||
0 commit comments