Sean Hefty [Mon, 12 Jul 2010 17:16:26 +0000 (10:16 -0700)]
libibverbs: remove duplicate wc status values
Several ibv_wc_status values map to the same winverbs wc status
values. This causes an error if the ibv_wc_status values are
referenced in a switch statement. Replace the duplicated values
with constants, so every wc status value is unique.
Since the wc status values are mapped from the provider library,
the duplicated values are not used anyway.
Sean Hefty [Tue, 13 Jul 2010 17:20:20 +0000 (17:20 +0000)]
libibverbs: remove _errno include from verbs.h
verbs.h is intended to be included directly by applications. Since _errno.h is a linux header file abstraction, move its use internal to libibverbs. This avoids issues if the user includes errno.h directly and matches the use on Linux.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2847 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Sean Hefty [Tue, 13 Jul 2010 17:15:45 +0000 (17:15 +0000)]
libibverbs: remove duplicate wc status values
Several ibv_wc_status values map to the same winverbs wc status values. This causes an error if the ibv_wc_status values are referenced in a switch statement. Replace the duplicated values with constants, so every wc status value is unique.
Since the wc status values are mapped from the provider library, the duplicated values are not used anyway.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2846 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Sean Hefty [Mon, 12 Jul 2010 19:10:08 +0000 (12:10 -0700)]
libibverbs: remove _errno include from verbs.h
verbs.h is intended to be included directly by applications. Since
_errno.h is a linux header file abstraction, move its use internal
to libibverbs. This avoids issues if the user includes errno.h
directly.
Sean Hefty [Mon, 12 Jul 2010 19:10:08 +0000 (12:10 -0700)]
libibverbs: remove _errno include from verbs.h
verbs.h is intended to be included directly by applications. Since
_errno.h is a linux header file abstraction, move its use internal
to libibverbs. This avoids issues if the user includes errno.h
directly.
Sean Hefty [Mon, 12 Jul 2010 19:10:08 +0000 (12:10 -0700)]
libibverbs: remove _errno include from verbs.h
verbs.h is intended to be included directly by applications. Since
_errno.h is a linux header file abstraction, move its use internal
to libibverbs. This avoids issues if the user includes errno.h
directly.
Sean Hefty [Mon, 12 Jul 2010 17:16:26 +0000 (10:16 -0700)]
libibverbs: remove duplicate wc status values
Several ibv_wc_status values map to the same winverbs wc status
values. This causes an error if the ibv_wc_status values are
referenced in a switch statement. Replace the duplicated values
with constants, so every wc status value is unique.
Since the wc status values are mapped from the provider library,
the duplicated values are not used anyway.
Sean Hefty [Mon, 12 Jul 2010 17:16:26 +0000 (10:16 -0700)]
libibverbs: remove duplicate wc status values
Several ibv_wc_status values map to the same winverbs wc status
values. This causes an error if the ibv_wc_status values are
referenced in a switch statement. Replace the duplicated values
with constants, so every wc status value is unique.
Since the wc status values are mapped from the provider library,
the duplicated values are not used anyway.
Sean Hefty [Tue, 29 Jun 2010 19:33:05 +0000 (19:33 +0000)]
complib/user: fix timer race conditions
This serializes the callbacks for a timer and provides synchronization for multi-threaded timer usage.
cl_timer_stop is not allowed to be called from a timer callback, and will block until any callback has completed. (Technically, this should work, but it is not supported.)
cl_timer_start simply calls cl_timer_trim
cl_timer_trim changes the timeout of a queued timer if the new timeout time is less than the last set timeout.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2840 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Sean Hefty [Tue, 29 Jun 2010 19:31:07 +0000 (19:31 +0000)]
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>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2839 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86