Lines Matching refs:t
193 * if there were some unused strings in *src_btf*, those won't be copied over,
371 static inline __u16 btf_kind(const struct btf_type *t)
373 return BTF_INFO_KIND(t->info);
376 static inline __u16 btf_vlen(const struct btf_type *t)
378 return BTF_INFO_VLEN(t->info);
381 static inline bool btf_kflag(const struct btf_type *t)
383 return BTF_INFO_KFLAG(t->info);
386 static inline bool btf_is_void(const struct btf_type *t)
388 return btf_kind(t) == BTF_KIND_UNKN;
391 static inline bool btf_is_int(const struct btf_type *t)
393 return btf_kind(t) == BTF_KIND_INT;
396 static inline bool btf_is_ptr(const struct btf_type *t)
398 return btf_kind(t) == BTF_KIND_PTR;
401 static inline bool btf_is_array(const struct btf_type *t)
403 return btf_kind(t) == BTF_KIND_ARRAY;
406 static inline bool btf_is_struct(const struct btf_type *t)
408 return btf_kind(t) == BTF_KIND_STRUCT;
411 static inline bool btf_is_union(const struct btf_type *t)
413 return btf_kind(t) == BTF_KIND_UNION;
416 static inline bool btf_is_composite(const struct btf_type *t)
418 __u16 kind = btf_kind(t);
423 static inline bool btf_is_enum(const struct btf_type *t)
425 return btf_kind(t) == BTF_KIND_ENUM;
428 static inline bool btf_is_enum64(const struct btf_type *t)
430 return btf_kind(t) == BTF_KIND_ENUM64;
433 static inline bool btf_is_fwd(const struct btf_type *t)
435 return btf_kind(t) == BTF_KIND_FWD;
438 static inline bool btf_is_typedef(const struct btf_type *t)
440 return btf_kind(t) == BTF_KIND_TYPEDEF;
443 static inline bool btf_is_volatile(const struct btf_type *t)
445 return btf_kind(t) == BTF_KIND_VOLATILE;
448 static inline bool btf_is_const(const struct btf_type *t)
450 return btf_kind(t) == BTF_KIND_CONST;
453 static inline bool btf_is_restrict(const struct btf_type *t)
455 return btf_kind(t) == BTF_KIND_RESTRICT;
458 static inline bool btf_is_mod(const struct btf_type *t)
460 __u16 kind = btf_kind(t);
468 static inline bool btf_is_func(const struct btf_type *t)
470 return btf_kind(t) == BTF_KIND_FUNC;
473 static inline bool btf_is_func_proto(const struct btf_type *t)
475 return btf_kind(t) == BTF_KIND_FUNC_PROTO;
478 static inline bool btf_is_var(const struct btf_type *t)
480 return btf_kind(t) == BTF_KIND_VAR;
483 static inline bool btf_is_datasec(const struct btf_type *t)
485 return btf_kind(t) == BTF_KIND_DATASEC;
488 static inline bool btf_is_float(const struct btf_type *t)
490 return btf_kind(t) == BTF_KIND_FLOAT;
493 static inline bool btf_is_decl_tag(const struct btf_type *t)
495 return btf_kind(t) == BTF_KIND_DECL_TAG;
498 static inline bool btf_is_type_tag(const struct btf_type *t)
500 return btf_kind(t) == BTF_KIND_TYPE_TAG;
503 static inline bool btf_is_any_enum(const struct btf_type *t)
505 return btf_is_enum(t) || btf_is_enum64(t);
515 static inline __u8 btf_int_encoding(const struct btf_type *t)
517 return BTF_INT_ENCODING(*(__u32 *)(t + 1));
520 static inline __u8 btf_int_offset(const struct btf_type *t)
522 return BTF_INT_OFFSET(*(__u32 *)(t + 1));
525 static inline __u8 btf_int_bits(const struct btf_type *t)
527 return BTF_INT_BITS(*(__u32 *)(t + 1));
530 static inline struct btf_array *btf_array(const struct btf_type *t)
532 return (struct btf_array *)(t + 1);
535 static inline struct btf_enum *btf_enum(const struct btf_type *t)
537 return (struct btf_enum *)(t + 1);
542 static inline struct btf_enum64 *btf_enum64(const struct btf_type *t)
544 return (struct btf_enum64 *)(t + 1);
573 static inline struct btf_member *btf_members(const struct btf_type *t)
575 return (struct btf_member *)(t + 1);
579 static inline __u32 btf_member_bit_offset(const struct btf_type *t,
582 const struct btf_member *m = btf_members(t) + member_idx;
583 bool kflag = btf_kflag(t);
588 * Get bitfield size of a member, assuming t is BTF_KIND_STRUCT or
591 static inline __u32 btf_member_bitfield_size(const struct btf_type *t,
594 const struct btf_member *m = btf_members(t) + member_idx;
595 bool kflag = btf_kflag(t);
600 static inline struct btf_param *btf_params(const struct btf_type *t)
602 return (struct btf_param *)(t + 1);
605 static inline struct btf_var *btf_var(const struct btf_type *t)
607 return (struct btf_var *)(t + 1);
611 btf_var_secinfos(const struct btf_type *t)
613 return (struct btf_var_secinfo *)(t + 1);
617 static inline struct btf_decl_tag *btf_decl_tag(const struct btf_type *t)
619 return (struct btf_decl_tag *)(t + 1);