Hi,

i am having multiple timer which can issue a call_rcu on an object using
an rcu_head.

It can happen than an object is already on the call_rcu list
for destruction and another timer fires.

So i am doing something like this.

        if (!rs->rcuhead.func) {
                call_rcu(&rs->rcuhead, free_obj);
        }

I have a feeling in my gut that this didnt blow up
just by accident and i am doing something utterly stupid.

I am in the read side critical section so my structure
cant appear under my feet but the above can be racy at
best.

What would be the best way to achieve something like:

        "queue for call_rcu if not already queued"

Another flag with an atomic inc or something?

Flo
-- 
Florian Lohoff                                                 [email protected]

Attachment: signature.asc
Description: Digital signature

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Reply via email to