Skip to content

Latest commit

 

History

History
66 lines (50 loc) · 3.15 KB

bpf_timer_cancel.md

File metadata and controls

66 lines (50 loc) · 3.15 KB
title description
Helper Function 'bpf_timer_cancel'
This page documents the 'bpf_timer_cancel' eBPF helper function, including its defintion, usage, program types that can use it, and examples.

Helper function bpf_timer_cancel

:octicons-tag-24: v5.15

This helper cancels a pending timer.

Definition

Copyright (c) 2015 The Libbpf Authors. All rights reserved.

Cancel the timer and wait for callback_fn to finish if it was running.

Returns

0 if the timer was not active. 1 if the timer was active. -EINVAL if timer was not initialized with bpf_timer_init() earlier. -EDEADLK if callback_fn tried to call bpf_timer_cancel() on its own timer which would have led to a deadlock otherwise.

#!c static long (* const bpf_timer_cancel)(struct bpf_timer *timer) = (void *) 172;

Usage

!!! example "Docs could be improved" This part of the docs is incomplete, contributions are very welcome

Program types

This helper call can be used in the following program types:

Example

!!! example "Docs could be improved" This part of the docs is incomplete, contributions are very welcome