kthread: Add a wrapper macro KPROC_START The function kproc_start(const void *) requires passing an argument with type `struct kproc_desc *`. The compilers are not able to report error when passing wrong typed arguments. Add a wrapper macro KPROC_START so that we no longer worry about that when using the macro instead of plain SYSINIT. MFC after: 2 weeks kthread: Migrate to use the macro KPROC_START to start kernel threads No functional change intended. MFC after: 2 weeks
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
sys/kern/kern_alq.c | ||
---|---|---|
418 | I don't think that name matters, and would prefer the names to have no spaces. Let's see if @jeff says something (based on the past few years, I'd say it's unlikely, but perhaps wait for a few days or a little more). | |
sys/sys/kthread.h | ||
62 | Perhaps expand the generated name to decrease the chances of collision with explicit variables? | |
67 | If changed above, to be changed here. |
sys/sys/kthread.h | ||
---|---|---|
61 | The simple macro argument names have high chance of interfere with names locally visible. I suggest to use that convention for such global macro args, and also I suggest to use much more descriptive names for them. If I need to write another KPROC_START(), I would need to spend more time than I want figuring out what these n/s/o/f/gp mean. |