This is the mail archive of the ecos-devel@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]

socket.cxx


Hi all,

I read io/fileio/current/src/socket.cxx.
There is cyg_nstab_init in this file.but I cannot find its 
caller.
if I selected net/tcpip as protocol stack,
cyg_nstab_init call bsd_init in sockio.cxx.
however now bsd_init is nothing to do.
also I read sockio.c. There is NSTAB_ENTRY in the file.
however it has syncmode which is zero. so, it seems that no one 
lock in each socket function, socket, accept, listen and etc.
additionally read and write function are not locked, when they  
are used as network method.

in my opinion,
1) cyg_nstab_init must be called in somewhere.
2) NSTAB_ENTRY's syncmode isCYG_SYNCMODE_SOCK_FILE | CYG_
SYNCMODE_SOCK_NETSTACK
but in this case, network performance will be down by lock 
function. Each file descriptors should have different instances 
of lock.
3) read/write functions should be locked in socket use. 

How do you think?
I need guru's opinion.

Thank you,

--
Ryos Suzuki
ryos@sinby.com

Sinby Corporation
http://www.sinby.com

Japan 260-0031
chiba-ken chiba-shi chuo-ku 
sinchiba 3-7-6

TEL/FAX +81-43-244-9714


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