rx: Some kernels have no reschedule function

If RXK_TIMEDSLEEP_ENV isn't set, then Unix kernel cache managers
call rxevent_Init without a reschedule function. Check for this so
we don't end up calling a NULL function in these situations.

Change-Id: I5e89f5247aeffc4c27d3f81c0ccabe4979232846
Reviewed-on: http://gerrit.openafs.org/6206
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
This commit is contained in:
Simon Wilkinson 2011-12-03 21:10:43 +00:00 committed by Jeffrey Altman
parent 0fb7d85284
commit 5c6640bf0b

View File

@ -285,7 +285,8 @@ rxevent_Post(struct clock *when, struct clock *now,
eventSchedule.raised = 1;
clock_Zero(&eventSchedule.next);
MUTEX_EXIT(&eventTree.lock);
(*eventSchedule.func)();
if (eventSchedule.func != NULL)
(*eventSchedule.func)();
return rxevent_get(ev);
}