From 1e4179935842cbc50f927400693cb9295c8d14d2 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Thu, 29 Apr 2004 22:13:21 +0000 Subject: [PATCH] have comedi_command set subdevice->busy --- comedi/kcomedilib/kcomedilib_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/comedi/kcomedilib/kcomedilib_main.c b/comedi/kcomedilib/kcomedilib_main.c index 01c19629..4c640bd9 100644 --- a/comedi/kcomedilib/kcomedilib_main.c +++ b/comedi/kcomedilib/kcomedilib_main.c @@ -150,17 +150,17 @@ int comedi_command(comedi_t *d,comedi_cmd *cmd) if(async == NULL) return -ENODEV; + if(s->busy) + return -EBUSY; + s->busy = d; + if(async->cb_mask & COMEDI_CB_EOS) cmd->flags |= TRIG_WAKE_EOS; async->cmd=*cmd; -#if 0 - s->runflags=0; -#else - s->runflags=SRF_RT; + s->runflags |= SRF_RT; comedi_switch_to_rt(dev); -#endif s->subdev_flags |= SDF_RUNNING; -- 2.26.2