4 Dec 2004 10:02
socket.cxx
Ryos Suzuki <ryos <at> sinby.com>
2004-12-04 09:02:19 GMT
2004-12-04 09:02:19 GMT
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(Continue reading)
RSS Feed