Date: Wed, 23 Aug 2017 20:51:26 -0400 From: Farhan Khan <khanzf@gmail.com> To: freebsd-hackers@freebsd.org Subject: taskqueue(9) guidance Message-ID: <CAFd4kYCj7i5oLBvTNUZj1-oKEY88XjDNcVUbyUutszStRyt2zg@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi all, I am trying to understand taskqueue(9) through writing some code, but am unable to get a functioning example. The expected code I thought does not run. I reviewed some sample code within the kernel, mostly drivers. The general pattern I identified was taskqueue_create(9), taskqueue_start_threads(9), and finally the TASK_INIT macro. I also created some structures and place them within the "struct taskqueue" and "struct task". I am not certain why this done, rather than allocate those who structures on their own, but it appeared to be the standard. My code is below: https://pastebin.com/dFqPsA5A I am expecting to see the repeater_proc() function to execute, but that does not occur. Also, I did not specify the frequency, whether it should repeat, etc. I do not understand why the code is not running or what mistake I am making. Please assist. Thank you! -- Farhan Khan PGP Fingerprint: 782F 342B 5B08 0D2F F4E8 82C3 FFA1 CAE1 6536 51CA
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFd4kYCj7i5oLBvTNUZj1-oKEY88XjDNcVUbyUutszStRyt2zg>