Some applications making heavy use networking make extensive use of light weight threads instead, thus allowing blocking streams. This is more common on platforms that either don't support fork() well... Unfortunately, many socket libraries are not thread safe, meaning a total switch would likely break more platforms than it could fix, and possibly require semaphores or other locking method around some calls as a kludge for those with poor thread support in their libraries...
-----Original Message----- From: owner-bird-users@atrey.karlin.mff.cuni.cz [mailto:owner-bird- users@atrey.karlin.mff.cuni.cz] On Behalf Of Martin Mares Sent: Monday, May 15, 2006 4:25 AM To: Aditya Veer Singh Cc: bird-users@network.cz Subject: Re: porting bird to ecos
Hi!
Thanks there seems problem with fcntl fcntl(fd, F_SETFL, O_NONBLOCK) is not supported in the OS being used for arguments F_SETFL and O_NONBLOCK.
Is there any other the functionality required by BIRD can be achived without the above call? I tried 'setsockopt' but it also didn't worked.
Is there any way by which making the socket as non-blocking can be avoided and still BIRD works for BSD tcp/ip stack.
Sorry, but non-blocking sockets are vital in BIRD and very likely in any other application using networking heavily.
Have a nice fortnight -- Martin `MJ' Mares <mj@ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth Why is "abbreviation" such a long word?
Hello!
Some applications making heavy use networking make extensive use of light weight threads instead, thus allowing blocking streams. This is more common on platforms that either don't support fork() well...
BIRD doesn't need fork(), but as I was thinking about non-blocking IO, it could be probably worked around by using select() or poll() after each IO operation. Does eCos support these calls properly? Have a nice fortnight -- Martin `MJ' Mares <mj@ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth A student who changes the course of history is probably taking an exam.
Martin Mares wrote:
BIRD doesn't need fork(), but as I was thinking about non-blocking IO, it could be probably worked around by using select() or poll() after each IO operation. Does eCos support these calls properly?
Be careful. There are cases when select/poll may return signalling data but on receive there isn't any available and thus receive will block. I do remember there was a lkml thread about this problem. It may work as expected on other OS, though. -- Andreas Steinmetz SPAMmers use robotrap@domdv.de
I got work around using ioctl for getting non blocking socket. Andreas Steinmetz <ast@domdv.de> wrote: Martin Mares wrote:
BIRD doesn't need fork(), but as I was thinking about non-blocking IO, it could be probably worked around by using select() or poll() after each IO operation. Does eCos support these calls properly?
Be careful. There are cases when select/poll may return signalling data but on receive there isn't any available and thus receive will block. I do remember there was a lkml thread about this problem. It may work as expected on other OS, though. -- Andreas Steinmetz SPAMmers use robotrap@domdv.de --------------------------------- Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2¢/min with Yahoo! Messenger with Voice.
Hi, Platform with wich I am using BIRD does not have BISON, FLEX or M4. This leaves me in a situation where I needs to remove the parsing code of BIRD i.e read config. So need to fill manually instead going through parsing. I don't need it to highly configurable either, simple configurations will do. I tried debuging to figure out how data is being filled in config structure but wasn't able to. It will extremly helpfull if someone can provide the details of how the data gets filled in config structure. Thanks in advance. Regards, Aditya --------------------------------- Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.
Hi!
Platform with wich I am using BIRD does not have BISON, FLEX or M4. This leaves me in a situation where I needs to remove the parsing code of BIRD i.e read config.
I think that it's much easier to cross-compile the parser to C on another machine. Have a nice fortnight -- Martin `MJ' Mares <mj@ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth My Wife Says I Never Listen, Or Something Like That...
participants (4)
-
Aditya Veer Singh -
Andreas Steinmetz -
Lauro, John -
Martin Mares