On Tue, Feb 23, 2010 at 09:58:25AM +1300, Darran Hunt wrote:

>> static void
>> dtrace_vtime_switch(lwp_t *newl)
>> {
>> #ifdef KDTRACE_HOOKS
>>      /*
>>       * If DTrace has set the active vtime enum to anything
>>       * other than INACTIVE (0), then it should have set the
>>       * function to call.
>>       */
>>      if (dtrace_vtime_active) {
>>              (*dtrace_vtime_switch_func)(newl);
>>      }

One more comment... If these are not enabled, then presumably you can
simply set them to (void *)nullop and skip the conditional?

(Although I'm sure somebody will be along shortly to say that casting a
function pointer that way is a bad idea :-)

Reply via email to