| 1 | package Sys::Ebpf::Constants::BpfMapUpdateFlags; | ||
| 2 | |||
| 3 | 3 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 3 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 3 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 3 | ▶ | use Exporter 'import'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 3 | my %constants = ( | |
| 10 | 'BPF_ANY' => 0, # create new element or update existing | ||
| 11 | 'BPF_NOEXIST' => 1, # create new element if it didn't exist | ||
| 12 | 'BPF_EXIST' => 2, # update existing element | ||
| 13 | 'BPF_F_LOCK' => 4, # spin_lock-ed map_lookup/map_update | ||
| 14 | ); | ||
| 15 | |||
| 16 | 3 | our @EXPORT_OK = keys %constants; | |
| 17 | 3 | our %EXPORT_TAGS = ( all => \@EXPORT_OK ); | |
| 18 | |||
| 19 | 3 | for my $name (@EXPORT_OK) { | |
| 20 | 3 | ▶ | no strict 'refs'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 21 | 0 | ▶ | *{$name} = sub () { $constants{$name} }; |
|
Subroutine
__ANON__: not called CC=1 SCAR=0.4
| |||
| 22 | } | ||
| 23 | |||
| 24 | 3 | 1; | |