For me, the best explanation was "man select" .
Basically, "select" is needed to check if some "read" filehandles
become readable, some "write" filehandles become writable,
some "exception" filehandles got an exception - at the same time,
with one function call. You also specify a timeout - of how long to
wait for any changes. For example, you might know that if there's
no data for, say, 2 seconds, then something went wrong.
To operate, "select" needs 3 "sets" of filehandles - open for reading,
writing and exceptions. Those macros, FD_SET, FD_ISSET,
FD_ZERO are for "sets" manipulation. You can "add" a filehandle
to set with FD_SET (do it for every handle you want to watch for),
clear the whole set with FD_ZERO, or just a single filehandle with
FD_CLR, and test some particular filehandle changed status (i.e.,
became readable, writable, or has an exception) with FD_ISSET.
Alexander
----- Original Message -----
From: Nejib Ben Hadj-Alouane
To: [EMAIL PROTECTED]
Sent: Thursday, November 18, 1999 7:46 AM
Subject: [rtl] The FRANK example
Hello,
My question is in reference to the frank_app.c file in the frank example
RTL2.pre3.
There are macros FD_ZERO, FD_SET, FD_ISSET that I am unfamiliar with. I
could guess what that part of the code
is doing, but I need the details. Could someone give me some pointers (which
.h files to see...)
Thanks.
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/