Date: Thu, 11 Sep 1997 16:38:37 +1000 From: Mike Smith <mike@smith.net.au> To: "Jamil J. Weatherbee" <jamil@counterintelligence.ml.org> Cc: Mike Smith <mike@smith.net.au>, freebsd-hackers@freebsd.org Subject: Re: Realtime Programming Under FreeBSD? Message-ID: <199709110638.QAA07024@word.smith.net.au> In-Reply-To: Your message of "Wed, 10 Sep 1997 23:53:18 MST." <Pine.BSF.3.96.970910234736.19803A-100000@counterintelligence.ml.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> > No, I would use a select loop but the general idea is that you have a > whole lot events (in the form of writing a packet to a socket or something > to a serial port) that you want to be able to coordinate in time ----> > > If for instance I wanted to do this cyclically: > > send 0xff ----> port 0x260 > wait 37ms > send 0x00 ----> port 0x260 > wait 45ms > sample the value @ 0x200 > etc. The basic nature of FreeBSD (and unix systems in general) makes this almost impossible. You can say "wait at least 37ms", but the sort of determinism that you're demanding above is not achievable in the same environment as preemptive multitasking and interrupt-driven I/O. If you want to get really enthused, I would suggest writing a small pseudomachine and scheduling it off a really fast interrupt as with pcaudio. You could probably get away with a very simple instruction set, and this would give you the granularity you want without the horrific overhead. mike
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709110638.QAA07024>