Re: Serial port arbitration (UUCP device locking protocol?)
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=G/qNwK4N7MaYXXUwM4n2tGaaqpms1V+ysgGVHkZCqds7a8yBg/lgWGn5coeG9gMF20tYR9c80yf0c6taGMNl/kuOfS/el8olcECU/d8RvjIyUy7K5bi8xBLpRG2jP3fiEh7r7G1kXihKV1uFUb2b/HhjChnGhy1tfW0fBLutFHI= 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 <gvdl@apple.com> wrote:
G'day Dan,
On Sat, 12 Feb 2005 11:47:00 -0800, Godfrey van der Linden <gvdl@apple.com> 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Dan Bernstein