> static void CALLBACK
>
> __timer_callback(
>
> IN cl_timer_t* const p_timer,
>
> IN BOOLEAN timer_signalled )
>
> {
>
> /* timer_signalled is always TRUE, and has no value. */
>
> +
>
> + DWORD thread_id = GetCurrentThreadId();
>
> CL_ASSERT( timer_signalled );
>
> +
>
> UNUSED_PARAM( timer_signalled );
>
>
>
> + CL_ASSERT(thread_id!=0);
>
> +
>
> p_timer->timeout_time = 0;
>
> - p_timer->thread_id = GetCurrentThreadId();
>
> + p_timer->thread_id = thread_id;
>
This is touching cl_timer_t fields from a separate thread not under the user's
control. I'd feel happier if locking were added here as well. Although if
this callback can be invoked multiple times simultaneously, then what does
saving the thread_id buy us?
_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw