This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problems with switching between blocking and non-blocking modes for I/O read/write


Hi all,

According to page 346, chapter 31 of the "ecos
reference manual", function ioctl() is defined in the
fileio package.  However, it appears that ecos doesn't
support this function because function dev_fo_ioctl(),
which is called by ioctl(), simply just returns
ENOSYS.

And according to page 337 of the same manual, function
fcntl() is implemented in ecos to be compatible with
POSIX.  But by looking at the implementation of this
function, only option F_DUPFD is supported.

My application needs to call ioctl(), or preferrably
fcntl(), dynamically at run time to switch the IO
read/write operations between blocking and
non-blocking modes.  For the ioctl() case, why isn't
function dev_fo_ioctl() implemented so that it can
call cyg_io_set_config() to change blocking mode just
like what is done in function dev_open()?  Are there
any problems of doing that?  And for the fcntl() case,
why doesn't it support F_GETFL and F_SETFL?

I can change the blocking mode dynamically by calling
function cyg_io_set_config() with option
CYG_IO_SET_CONFIG_READ_BLOCKING /
CYG_IO_SET_CONFIG_WRITE_BLOCKING.  But from the
application's standpoint, it makes more sense to call
POSIX function like fcntl(), or worse ioctl().

Thanks in advance for any helps.

Sam. 




	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]