summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score/cpu/i960/wrap/Makefile.in
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-06-11 14:11:44 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-06-11 14:11:44 +0000
commita6f3cff703911008d7cc56d5ef9745bb3f5f46be (patch)
tree33281fec98c80a4f2706cbb558c85ab9517c2906 /c/src/exec/score/cpu/i960/wrap/Makefile.in
parentPatch from Eric Norum <eric@cls.usask.ca> to fix bug reported by (diff)
downloadrtems-a6f3cff703911008d7cc56d5ef9745bb3f5f46be.tar.bz2
Patch from Ian Lance Taylor <ian@airs.com>:
The select function is not particularly efficient when dealing with a large number of sockets. The application has to build a big set of bits and pass it in. RTEMS has to look through all those bits and see what is ready. Then the application has to look through all the bits again. On the other hand, when using RTEMS, the select function is needed exactly when you have a large number of sockets, because that is when it becomes prohibitive to use a separate thread for each socket. I think it would make more sense for RTEMS to support callback functions which could be invoked when there is data available to read from a socket, or when there is space available to write to a socket. Accordingly, I implemented them. This patch adds two new SOL_SOCKET options to setsockopt and getsockopt: SO_SNDWAKEUP and SO_RCVWAKEUP. They take arguments of type struct sockwakeup: struct sockwakeup { void (*sw_pfn) __P((struct socket *, caddr_t)); caddr_t sw_arg; }; They are used to add or remove a function which will be called when something happens for the socket. Getting a callback doesn't imply that a read or write will succeed, but it does imply that it is worth trying. This adds functionality to RTEMS which is somewhat like interrupt driven socket I/O on Unix. After the patch to RTEMS, I have appended a patch to netdemos-19990407/select/test.c to test the new functionality and demonstrate one way it might be used. To run the new test instead of the select test, change doSocket to call echoServer2 instead of echoServer.
Diffstat (limited to 'c/src/exec/score/cpu/i960/wrap/Makefile.in')
0 files changed, 0 insertions, 0 deletions