Bug系列------关于进程信号传递的competion

来源:互联网 发布:封面ps软件 编辑:程序博客网 时间:2024/05/20 22:38
  #define INS_CURR_TIMEOUT(3 * HZ)

int timeout;


timeout = wait_for_completion_timeout(
&di->ab8500_fg_started,
INS_CURR_TIMEOUT);


在设备的struct中
struct completion ab8500_fg_started;

在probe函数中
init_completion(&di->ab8500_fg_started);


complete(&di->ab8500_fg_started);
0 0