[Click] Spinlock question
Eddie Kohler
kohler at cs.ucla.edu
Tue Feb 6 17:01:45 EST 2007
Dear myself from more than 2 years ago,
If you declare a write handler with the Handler::EXCLUSIVE flag --
either via Element::set_handler(), or with Element::set_handler_flags()
-- then Click will guarantee mutual exclusion between Click threads and
the handler.
Thomas, perhaps this will help you?
Eddie
Eddie Kohler wrote:
> Michael Walfish wrote:
>> Eddie wrote:
>> | It might make sense for Click to guarantee mutual exclusion between
>> | threads and write handlers. Would this help you in any way?
>>
>> I think so. If I've understood you, then this mutual exclusion would
>> prevent me from having to worry about whether a packet processing event
>> that's reading a data structure is in fact getting a coherent version of
>> the data structure (since a write handler might be mucking with the data
>> structure at the same time the packet processing code needs to read the
>> data structure).
>>
>> Thanks!
>>
>> -Mike
>
> Yes, that's right. You'd still have to worry about _read_ handlers (if
> the read handler changed something, or accessed pointer data that the
> Click thread might alter), but that's generally less of a problem.
>
> E
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
More information about the click
mailing list