Thanks again Godfrey.
Sorry to keep bugging you with this, but I'm still confused. In ioss.h
it says that if the preempt flag is true, then the device is
pre-emptible, whereas in your code, you set it to 0 (false) right
before you say "Now the port is in the preemptible - blocking state".
I also tried doing a read there, and it didn't seem to be
pre-emptible. On the other hand, when I do a read after setting the
preempt flag to 1, then read blocks until another program opens the
device, at which point it returns 0. Further read return -1 with
errno==EBUSY.
Did I get it all wrong?
-- Dan
On Mon, 14 Feb 2005 10:17:06 -0800, Godfrey van der Linden
<email@hidden> wrote:
> G'day Dan,
>
> > On Sat, 12 Feb 2005 11:47:00 -0800, Godfrey van der Linden
> > <email@hidden> wrote:
> >> // At this point you have the port exclusively and non-preemtibly
> >> // so now is a good time to program up the modem or do any other
> >> // equipment initialisation you desire.
> >
> > How do I do that? Can I just write to the dialin device or should I
> > open the dialout?
>
> At this point in the sample code the fd is an exclusive open and
> non-preemptible handle on the serial port, you can read/write to it to
> talk directly to the modem.
>
> Godfrey
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden
This email sent to email@hidden