- From: Tim Beamish <tbeamish_at_cs.ubc.ca>
- Date: Mon, 15 Jul 2002 08:17:17 -0700 (PDT)
How about using a semaphore (or mutex...what's the difference anyway)? Tim On Sun, 14 Jul 2002, Nicolas Cottaris wrote: > Hello comedi-list, > > Does anyone know if it possible to read data simultaneously (via a > single non-interruptible command) > from two analog channels, instead of sequentially reading from one then > the other? > > In my implementation a low priority RTAI task does the reading (among > other things) > while a higher priority RTAI task is controlling a different device (not > related to comedi). > The situation is that sometimes the higher priority task will be > scheduled right between the > two successive reading operations and therefore the two samples are not > simultaneous but > can differ by as much as 500 microseconds (of course this depends on the > computational load of > the higher priority RTAI task). > > Is there any comedi command that can do two successive reads as an > atomic operation, i.e. non-interruptible, operation? > Making the reading task having the highest priority is not the solution, > as the other task must be > scheduled always on time. Like I said before, I only need to make sure > that I read from the two > channels as simultaneously as possible. > > Any ideas would be appreciated. > > Thanks, > > Nicolas > > > > _______________________________________________ > comedi mailing list > comedi_at_comedi.org > https://cvs.comedi.org/cgi-bin/mailman/listinfo/comedi >
Received on 2002-07-15Z14:17:17