mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 06:39:01 +08:00
drivers/rptun: guard nxsched_waitpid with CONFIG_SCHED_WAITPID
nxsched_waitpid is only available when CONFIG_SCHED_WAITPID is enabled. Wrap the call with #ifdef to fix the build error when this option is disabled. Signed-off-by: huojianchao <huojianchao@xiaomi.com> Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This commit is contained in:
@@ -932,7 +932,9 @@ static int rptun_dev_stop(FAR struct remoteproc *rproc)
|
||||
{
|
||||
priv->stop = true;
|
||||
nxsig_kill(priv->pid, SIGKILL);
|
||||
#ifdef CONFIG_SCHED_WAITPID
|
||||
nxsched_waitpid(priv->pid, NULL, WEXITED);
|
||||
#endif
|
||||
priv->stop = false;
|
||||
priv->pid = -EINVAL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user