Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src-draft/trunk]: src/sys/net80211 Fill in more of taskqueue_cancel/enqueue_...



details:   https://anonhg.NetBSD.org/src-all/rev/aa8a52ea8734
branches:  trunk
changeset: 935772:aa8a52ea8734
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Fri May 22 23:22:50 2020 +1000

description:
Fill in more of taskqueue_cancel/enqueue_timeout.

diffstat:

 sys/net80211/ieee80211_netbsd.c |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r 4cce9cca4f2f -r aa8a52ea8734 sys/net80211/ieee80211_netbsd.c
--- a/sys/net80211/ieee80211_netbsd.c   Fri May 22 23:22:10 2020 +1000
+++ b/sys/net80211/ieee80211_netbsd.c   Fri May 22 23:22:50 2020 +1000
@@ -152,14 +152,20 @@
        }
        mutex_exit(&timeout_task->to_task.t_mutex);
        
-       return -1;
+       return 0;
 }
 
 int
 taskqueue_cancel_timeout(struct workqueue *queue, 
     struct timeout_task *timeout_task, u_int *pendp)
 {
+       mutex_enter(&timeout_task->to_task.t_mutex);
+       callout_stop(&timeout_task->to_callout);
+       timeout_task->to_scheduled = 0;
+       mutex_exit(&timeout_task->to_task.t_mutex);
+
        // printf ("taskqueue_cancel_timeout called\n");
+
        return 0;
 }
 



Home | Main Index | Thread Index | Old Index