Chinaunix

标题: 驱动同步问题请教 [打印本页]

作者: jiangsheng84    时间: 2011-07-17 13:05
标题: 驱动同步问题请教
我的用户进度调度到内核以后,由于要等待某一事件的发生,所以我使用了完成量,

在用户进程上下文中:
#define TIMEOUT   xxx

struct completion stMyCompletion
init_completion(&stMyCompletion);
...
wait_for_completion_interuptable_timeout(&stMyCompletion, msecs_to_jiffies(TIMEOUT));
...


在中断处理函数中
...
complete(&stMyCompletion);
...


请问如果我的wait_for_completion_interuptable_timeout函数超时返回用户态之后,在中断处理中再去执行complete($stMyCompletion)唤醒
完成量对应的进程,是否有问题?(不考虑其它资源的释放,单单指完成量的使用)




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2