Jan Kiszka wrote:
> Gilles Chanteperdrix wrote:
>> +    rtdm_lock_get_irqsave(&udp_socket_base_lock, context);
>> +    if ((index = sock->prot.inet.reg_index) < 0) {
>> +        rtdm_lock_put_irqrestore(&udp_socket_base_lock, context);
>> +        /* socket is being closed */
>> +        return -EBADF;
>> +    }
>> +    port_registry[index].receiving = 1;
>> +    rtdm_lock_put_irqrestore(&udp_socket_base_lock, context);
>> +        
> 
> This is the only part of the patch I don't like. I don't want to add
> another lock site to the RX path. I see the problem, but I think we need
> some other solution. Maybe something that disables reception, and thus
> unwanted buffer consumption.

Actually, what we can do is put the "receiving" member in the udp socket 
structure, so that there is no risk, when setting this member to 1, to 
set to 1 the member of another socket.

-- 
                                                  Gilles.

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
RTnet-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rtnet-developers

Reply via email to