开发者

Queuing multiple task_struct structures?

开发者 https://www.devze.com 2023-04-08 04:33 出处:网络
I would like to queue up multiple struct task_structs in my block device driver. Here, each task_struct would correspond to a userlevel thread which uses the ioctl() system call to send a userspace bu

I would like to queue up multiple struct task_structs in my block device driver. Here, each task_struct would correspond to a userlevel thread which uses the ioctl() system call to send a userspace buffer to my block device driver. Once I queue up multiple task_structs, I would like to keep them on the queue until a开发者_运维问答 particular condition is met (i.e., the buffer has been written down to the disk).

So, my question is, how do I queue up multiple task_structs, put them to sleep, and then wake a subset of the queued task_structs when some condition is met?


You can call kthread_create as many times as you want to create new threads, and then call wake_up on whatever subset of threads you want.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号