Lines Matching refs:call

86 static boolean_t timer_call_enter_internal(timer_call_t call, timer_call_param_t param1, uint64_t deadline, uint32_t flags);
90 timer_call_t call,
95 timer_call_t call);
118 timer_call_t call,
122 DBG("timer_call_setup(%p,%p,%p)\n", call, func, param0);
123 call_entry_setup(CE(call), func, param0);
124 simple_lock_init(&(call)->lock, 0);
125 call->async_dequeue = FALSE;
129 * Timer call entry locking model
132 * Timer call entries are linked on per-cpu timer queues which are protected
133 * by the queue lock and the call entry lock. The locking protocol is:
135 * 0) The canonical locking order is timer call entry followed by queue.
140 * After locking the queue, the call.async_dequeue flag must be checked:
146 * 2a) If a try-lock of a queued entry succeeds, the call can be operated on
163 * In the debug case, we assert that the timer call locking protocol
244 timer_call_t call,
248 call_entry_t entry = CE(call);
251 DBG("timer_call_enqueue_deadline_unlocked(%p,%p,)\n", call, queue);
253 simple_lock(&call->lock);
257 if (call->async_dequeue) {
259 call->async_dequeue = FALSE;
279 timer_call_entry_enqueue_deadline(call, queue, deadline);
281 simple_unlock(&call->lock);
292 timer_call_t call)
294 call_entry_t entry = CE(call);
297 DBG("timer_call_dequeue_unlocked(%p)\n", call);
299 simple_lock(&call->lock);
303 if (call->async_dequeue) {
305 call->async_dequeue = FALSE;
318 simple_unlock(&call->lock);
324 timer_call_t call,
336 call->soft_deadline = deadline;
337 call->flags = flags;
358 call->soft_deadline = deadline;
361 call->ttd = call->soft_deadline - ctime;
365 old_queue = timer_call_enqueue_deadline_unlocked(call, queue, deadline);
367 CE(call)->param1 = param1;
376 timer_call_t call,
380 return timer_call_enter_internal(call, NULL, deadline, flags);
385 timer_call_t call,
390 return timer_call_enter_internal(call, param1, deadline, flags);
395 timer_call_t call)
402 old_queue = timer_call_dequeue_unlocked(call);
407 timer_queue_cancel(old_queue, CE(call)->deadline, CE(queue_first(&old_queue->head))->deadline);
409 timer_queue_cancel(old_queue, CE(call)->deadline, UINT64_MAX);
415 DTRACE_TMR6(callout__cancel, timer_call_func_t, CE(call)->func,
416 timer_call_param_t, CE(call)->param0, uint32_t, call->flags, 0,
417 (call->ttd >> 32), (unsigned) (call->ttd & 0xFFFFFFFF));
428 timer_call_t call;
438 call = TIMER_CALL(queue_first(&queue->head));
439 if (!simple_lock_try(&call->lock)) {
446 (void) remque(qe(call));
447 call->async_dequeue = TRUE;
453 timer_call_entry_dequeue(call);
457 new_queue = timer_queue_assign(CE(call)->deadline);
460 call, new_queue, CE(call)->deadline);
463 simple_unlock(&call->lock);
476 timer_call_t call;
483 call = TIMER_CALL(queue_first(&queue->head));
485 if (call->soft_deadline <= deadline) {
489 if (!simple_lock_try(&call->lock)) {
492 (void) remque(qe(call));
493 call->async_dequeue = TRUE;
497 timer_call_entry_dequeue(call);
499 func = CE(call)->func;
500 param0 = CE(call)->param0;
501 param1 = CE(call)->param1;
503 simple_unlock(&call->lock);
512 timer_call_param_t, param0, unsigned, call->flags,
513 0, (call->ttd >> 32),
514 (unsigned) (call->ttd & 0xFFFFFFFF));
521 *ttdp = call->ttd;
542 deadline = CE(call)->deadline;
562 timer_call_t call;
589 * - the local queue contains no non-migrateable "local" call
608 call = TIMER_CALL(queue_first(&queue_from->head));
609 if (CE(call)->deadline < CE(head_to)->deadline) {
616 if (call->flags & TIMER_CALL_LOCAL) {
620 call = TIMER_CALL(queue_next(qe(call)));
621 } while (!queue_end(&queue_from->head, qe(call)));
625 call = TIMER_CALL(queue_first(&queue_from->head));
626 if (!simple_lock_try(&call->lock)) {
629 (void) remque(qe(call));
630 call->async_dequeue = TRUE;
633 timer_call_entry_dequeue(call);
635 call, queue_to, CE(call)->deadline);
637 simple_unlock(&call->lock);