root/tools/testing/selftests/bpf/progs/btf_dump_test_case_ordering.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. f

   1 // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
   2 
   3 /*
   4  * BTF-to-C dumper test for topological sorting of dependent structs.
   5  *
   6  * Copyright (c) 2019 Facebook
   7  */
   8 /* ----- START-EXPECTED-OUTPUT ----- */
   9 struct s1 {};
  10 
  11 struct s3;
  12 
  13 struct s4;
  14 
  15 struct s2 {
  16         struct s2 *s2;
  17         struct s3 *s3;
  18         struct s4 *s4;
  19 };
  20 
  21 struct s3 {
  22         struct s1 s1;
  23         struct s2 s2;
  24 };
  25 
  26 struct s4 {
  27         struct s1 s1;
  28         struct s3 s3;
  29 };
  30 
  31 struct list_head {
  32         struct list_head *next;
  33         struct list_head *prev;
  34 };
  35 
  36 struct hlist_node {
  37         struct hlist_node *next;
  38         struct hlist_node **pprev;
  39 };
  40 
  41 struct hlist_head {
  42         struct hlist_node *first;
  43 };
  44 
  45 struct callback_head {
  46         struct callback_head *next;
  47         void (*func)(struct callback_head *);
  48 };
  49 
  50 struct root_struct {
  51         struct s4 s4;
  52         struct list_head l;
  53         struct hlist_node n;
  54         struct hlist_head h;
  55         struct callback_head cb;
  56 };
  57 
  58 /*------ END-EXPECTED-OUTPUT ------ */
  59 
  60 int f(struct root_struct *root)
  61 {
  62         return 0;
  63 }

/* [<][>][^][v][top][bottom][index][help] */