This is the mail archive of the
ecos-devel@sources.redhat.com
mailing list for the eCos project.
socket.cxx
- From: Ryos Suzuki <ryos at sinby dot com>
- To: ecos-devel at sources dot redhat dot com
- Date: Sat, 4 Dec 2004 18:02:19 +0900
- Subject: 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