Hans-Peter Bock schrieb:

Hello,

if I look up a pointer to a socket with the function rt_socket_lookup(), an reference counter in the sockets structure is incremented. What do I have to do to get this counter decremented after I do not need the pointer to the socket any more?


http://www.rts.uni-hannover.de/rtnet/lxr/source/socket.c#L158


162 struct rtsocket *rt_socket_lookup(int fd)
163 {
[...]
169 if ((index = fd & 0xFF) < RT_SOCKETS) {
170 rtos_spin_lock_irqsave(&socket_base_lock, flags);
171 172 if (rt_sockets[index].fd == fd) {
173 sock = &rt_sockets[index];
174 atomic_inc(&sock->refcount);
175 }




http://www.rts.uni-hannover.de/rtnet/lxr/source/include/rtnet_socket.h#L109


:o)

Jan



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
RTnet-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to