/* modifiers and typedefs are ignored when comparing key/value types */ typedefstruct my_key { long x; } key_type; typedefstruct my_value { long x; } value_type;
/* this definition will lose, but it has to exactly match the winner */ struct {
__uint(type, BPF_MAP_TYPE_ARRAY);
__type(key, int);
__type(value, int);
__uint(max_entries, 16);
} map_weak __weak SEC(".maps");
int output_first2; int output_second2; int output_weak2;
SEC("raw_tp/sys_enter") int BPF_PROG(handler_enter2)
{ /* update values with key = 2 */ int key = 2, val = 2;
key_type key_struct = { .x = 2 };
value_type val_struct = { .x = 2000 };
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.