]> git.openfabrics.org - ~shefty/rdma-win.git/commit
complib/timer: fix race accessing timer fields
authorSean Hefty <sean.hefty@intel.com>
Mon, 21 Jun 2010 19:07:58 +0000 (12:07 -0700)
committerSean Hefty <sean.hefty@intel.com>
Mon, 21 Jun 2010 19:07:58 +0000 (12:07 -0700)
commit1c8ad9fdde21966b7caa0c1c5ec6433d2df036d4
treeeadf1dcd30e6f41bd6c59caed50876466bf9aa63
parent73643c1926aeef6940c0635561bc7534fc084290
complib/timer: fix race accessing timer fields

The timeout_time field of cl_timer_t is modified in the timer
callback function and also in calls to cl_timer_start, cl_timer_stop,
and cl_timer_trim.  The user cannot protect against the changes
made in the timer callback function, so the timer must provide
this protection itself.

Provide serialization to prevent multiple timer callbacks to
the user at once.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
trunk/core/complib/kernel/cl_timer.c
trunk/inc/kernel/complib/cl_timer_osd.h