Export the list header with a new namespace
authorJulien Desfossez <julien.desfossez@efficios.com>
Thu, 16 Feb 2012 19:13:19 +0000 (14:13 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 16 Feb 2012 19:13:19 +0000 (14:13 -0500)
Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
22 files changed:
formats/ctf/ctf.c
formats/ctf/metadata/ctf-ast.h
formats/ctf/metadata/ctf-parser.y
formats/ctf/metadata/ctf-scanner.h
formats/ctf/metadata/ctf-visitor-generate-io-struct.c
formats/ctf/metadata/ctf-visitor-parent-links.c
formats/ctf/metadata/ctf-visitor-semantic-validator.c
formats/ctf/metadata/ctf-visitor-xml.c
formats/registry.c
include/Makefile.am
include/babeltrace/format.h
include/babeltrace/list.h
include/babeltrace/types.h
types/array.c
types/enum.c
types/float.c
types/integer.c
types/sequence.c
types/string.c
types/struct.c
types/types.c
types/variant.c

index ea760f0e0725aecf7d53e719e8492374834b0491..fd9f49603a2a2834514538979bbfa0df917b9d51 100644 (file)
@@ -1509,7 +1509,7 @@ int ctf_open_mmap_trace_read(struct ctf_trace *td,
         * for each stream, try to open, check magic number, and get the
         * stream ID to add to the right location in the stream array.
         */
-       cds_list_for_each_entry(mmap_info, &mmap_list->head, list) {
+       bt_list_for_each_entry(mmap_info, &mmap_list->head, list) {
                ret = ctf_open_mmap_stream_read(td, mmap_info, move_pos_slow);
                if (ret) {
                        fprintf(stderr, "[error] Open file mmap stream error.\n");
index eba14cdadf54e76e23d835a6dca3d65e4e963d6c..ea46d3a3b3da6dfaa283760de0a55de9be2be9b6 100644 (file)
@@ -56,9 +56,9 @@ struct ctf_node {
         * Parent node is only set on demand by specific visitor.
         */
        struct ctf_node *parent;
-       struct cds_list_head siblings;
-       struct cds_list_head tmp_head;
-       struct cds_list_head gc;
+       struct bt_list_head siblings;
+       struct bt_list_head tmp_head;
+       struct bt_list_head gc;
 
        enum node_type type;
        union {
@@ -69,51 +69,51 @@ struct ctf_node {
                         * Children nodes are ctf_expression, typedef,
                         * typealias and type_specifier_list.
                         */
-                       struct cds_list_head declaration_list;
-                       struct cds_list_head trace;
-                       struct cds_list_head env;
-                       struct cds_list_head stream;
-                       struct cds_list_head event;
-                       struct cds_list_head clock;
+                       struct bt_list_head declaration_list;
+                       struct bt_list_head trace;
+                       struct bt_list_head env;
+                       struct bt_list_head stream;
+                       struct bt_list_head event;
+                       struct bt_list_head clock;
                } root;
                struct {
                        /*
                         * Children nodes are ctf_expression, typedef,
                         * typealias and type_specifier_list.
                         */
-                       struct cds_list_head declaration_list;
+                       struct bt_list_head declaration_list;
                } event;
                struct {
                        /*
                         * Children nodes are ctf_expression, typedef,
                         * typealias and type_specifier_list.
                         */
-                       struct cds_list_head declaration_list;
+                       struct bt_list_head declaration_list;
                } stream;
                struct {
                        /*
                         * Children nodes are ctf_expression, typedef,
                         * typealias and type_specifier_list.
                         */
-                       struct cds_list_head declaration_list;
+                       struct bt_list_head declaration_list;
                } env;
                struct {
                        /*
                         * Children nodes are ctf_expression, typedef,
                         * typealias and type_specifier_list.
                         */
-                       struct cds_list_head declaration_list;
+                       struct bt_list_head declaration_list;
                } trace;
                struct {
                        /*
                         * Children nodes are ctf_expression, typedef,
                         * typealias and type_specifier_list.
                         */
-                       struct cds_list_head declaration_list;
+                       struct bt_list_head declaration_list;
                } clock;
                struct {
-                       struct cds_list_head left;      /* Should be string */
-                       struct cds_list_head right;     /* Unary exp. or type */
+                       struct bt_list_head left;       /* Should be string */
+                       struct bt_list_head right;      /* Unary exp. or type */
                } ctf_expression;
                struct {
                        enum {
@@ -144,16 +144,16 @@ struct ctf_node {
                } unary_expression;
                struct {
                        struct ctf_node *type_specifier_list;
-                       struct cds_list_head type_declarators;
+                       struct bt_list_head type_declarators;
                } _typedef;
                /* new type is "alias", existing type "target" */
                struct {
                        struct ctf_node *type_specifier_list;
-                       struct cds_list_head type_declarators;
+                       struct bt_list_head type_declarators;
                } typealias_target;
                struct {
                        struct ctf_node *type_specifier_list;
-                       struct cds_list_head type_declarators;
+                       struct bt_list_head type_declarators;
                } typealias_alias;
                struct {
                        struct ctf_node *target;
@@ -189,13 +189,13 @@ struct ctf_node {
                } type_specifier;
                struct {
                        /* list of type_specifier */
-                       struct cds_list_head head;
+                       struct bt_list_head head;
                } type_specifier_list;
                struct {
                        unsigned int const_qualifier;
                } pointer;
                struct {
-                       struct cds_list_head pointers;
+                       struct bt_list_head pointers;
                        enum {
                                TYPEDEC_UNKNOWN = 0,
                                TYPEDEC_ID,     /* identifier */
@@ -210,7 +210,7 @@ struct ctf_node {
                                         * unary expression (value) or
                                         * type_specifier_list.
                                         */
-                                       struct cds_list_head length;
+                                       struct bt_list_head length;
                                        /* for abstract type declarator */
                                        unsigned int abstract_array;
                                } nested;
@@ -219,15 +219,15 @@ struct ctf_node {
                } type_declarator;
                struct {
                        /* Children nodes are ctf_expression. */
-                       struct cds_list_head expressions;
+                       struct bt_list_head expressions;
                } floating_point;
                struct {
                        /* Children nodes are ctf_expression. */
-                       struct cds_list_head expressions;
+                       struct bt_list_head expressions;
                } integer;
                struct {
                        /* Children nodes are ctf_expression. */
-                       struct cds_list_head expressions;
+                       struct bt_list_head expressions;
                } string;
                struct {
                        char *id;
@@ -235,7 +235,7 @@ struct ctf_node {
                         * Range list or single value node. Contains unary
                         * expressions.
                         */
-                       struct cds_list_head values;
+                       struct bt_list_head values;
                } enumerator;
                struct {
                        char *enum_id;
@@ -244,33 +244,33 @@ struct ctf_node {
                         * type_specifier_list.
                         */
                        struct ctf_node *container_type;
-                       struct cds_list_head enumerator_list;
+                       struct bt_list_head enumerator_list;
                        int has_body;
                } _enum;
                struct {
                        struct ctf_node *type_specifier_list;
-                       struct cds_list_head type_declarators;
+                       struct bt_list_head type_declarators;
                } struct_or_variant_declaration;
                struct {
                        char *name;
                        char *choice;
                        /* list of typedef, typealias and declarations */
-                       struct cds_list_head declaration_list;
+                       struct bt_list_head declaration_list;
                        int has_body;
                } variant;
                struct {
                        char *name;
                        /* list of typedef, typealias and declarations */
-                       struct cds_list_head declaration_list;
+                       struct bt_list_head declaration_list;
                        int has_body;
-                       struct cds_list_head min_align; /* align() attribute */
+                       struct bt_list_head min_align;  /* align() attribute */
                } _struct;
        } u;
 };
 
 struct ctf_ast {
        struct ctf_node root;
-       struct cds_list_head allocated_nodes;
+       struct bt_list_head allocated_nodes;
 };
 
 const char *node_type(struct ctf_node *node);
index 757af5d53f74ddd81ecfe634f8f6fdedb249fddb..84735941a45f07b0482156f6cacabf133bd4c03c 100644 (file)
@@ -35,7 +35,7 @@ int yydebug;
 
 /* Join two lists, put "add" at the end of "head".  */
 static inline void
-_cds_list_splice_tail (struct cds_list_head *add, struct cds_list_head *head)
+_bt_list_splice_tail (struct bt_list_head *add, struct bt_list_head *head)
 {
        /* Do nothing if the list which gets added is empty.  */
        if (add != add->next) {
@@ -55,7 +55,7 @@ void yyrestart(FILE * in_str, yyscan_t scanner);
 int yydebug;
 
 struct gc_string {
-       struct cds_list_head gc;
+       struct bt_list_head gc;
        size_t alloclen;
        char s[];
 };
@@ -108,7 +108,7 @@ static struct gc_string *gc_string_alloc(struct ctf_scanner *scanner,
             alloclen *= 2);
 
        gstr = malloc(alloclen);
-       cds_list_add(&gstr->gc, &scanner->allocated_strings);
+       bt_list_add(&gstr->gc, &scanner->allocated_strings);
        gstr->alloclen = alloclen;
        return gstr;
 }
@@ -136,13 +136,13 @@ struct gc_string *gc_string_append(struct ctf_scanner *scanner,
                newgstr = gc_string_alloc(scanner, newlen);
                strcpy(newgstr->s, gstr->s);
                strcat(newgstr->s, gsrc->s);
-               cds_list_del(&gstr->gc);
+               bt_list_del(&gstr->gc);
                free(gstr);
                gstr = newgstr;
        } else {
                strcat(gstr->s, gsrc->s);
        }
-       cds_list_del(&gsrc->gc);
+       bt_list_del(&gsrc->gc);
        free(gsrc);
        return gstr;
 }
@@ -230,9 +230,9 @@ static struct ctf_node *make_node(struct ctf_scanner *scanner,
                return NULL;
        memset(node, 0, sizeof(*node));
        node->type = type;
-       CDS_INIT_LIST_HEAD(&node->tmp_head);
-       cds_list_add(&node->gc, &ast->allocated_nodes);
-       cds_list_add(&node->siblings, &node->tmp_head);
+       BT_INIT_LIST_HEAD(&node->tmp_head);
+       bt_list_add(&node->gc, &ast->allocated_nodes);
+       bt_list_add(&node->siblings, &node->tmp_head);
 
        switch (type) {
        case NODE_ROOT:
@@ -240,36 +240,36 @@ static struct ctf_node *make_node(struct ctf_scanner *scanner,
                break;
 
        case NODE_EVENT:
-               CDS_INIT_LIST_HEAD(&node->u.event.declaration_list);
+               BT_INIT_LIST_HEAD(&node->u.event.declaration_list);
                break;
        case NODE_STREAM:
-               CDS_INIT_LIST_HEAD(&node->u.stream.declaration_list);
+               BT_INIT_LIST_HEAD(&node->u.stream.declaration_list);
                break;
        case NODE_ENV:
-               CDS_INIT_LIST_HEAD(&node->u.env.declaration_list);
+               BT_INIT_LIST_HEAD(&node->u.env.declaration_list);
                break;
        case NODE_TRACE:
-               CDS_INIT_LIST_HEAD(&node->u.trace.declaration_list);
+               BT_INIT_LIST_HEAD(&node->u.trace.declaration_list);
                break;
        case NODE_CLOCK:
-               CDS_INIT_LIST_HEAD(&node->u.clock.declaration_list);
+               BT_INIT_LIST_HEAD(&node->u.clock.declaration_list);
                break;
 
        case NODE_CTF_EXPRESSION:
-               CDS_INIT_LIST_HEAD(&node->u.ctf_expression.left);
-               CDS_INIT_LIST_HEAD(&node->u.ctf_expression.right);
+               BT_INIT_LIST_HEAD(&node->u.ctf_expression.left);
+               BT_INIT_LIST_HEAD(&node->u.ctf_expression.right);
                break;
        case NODE_UNARY_EXPRESSION:
                break;
 
        case NODE_TYPEDEF:
-               CDS_INIT_LIST_HEAD(&node->u._typedef.type_declarators);
+               BT_INIT_LIST_HEAD(&node->u._typedef.type_declarators);
                break;
        case NODE_TYPEALIAS_TARGET:
-               CDS_INIT_LIST_HEAD(&node->u.typealias_target.type_declarators);
+               BT_INIT_LIST_HEAD(&node->u.typealias_target.type_declarators);
                break;
        case NODE_TYPEALIAS_ALIAS:
-               CDS_INIT_LIST_HEAD(&node->u.typealias_alias.type_declarators);
+               BT_INIT_LIST_HEAD(&node->u.typealias_alias.type_declarators);
                break;
        case NODE_TYPEALIAS:
                break;
@@ -277,38 +277,38 @@ static struct ctf_node *make_node(struct ctf_scanner *scanner,
        case NODE_TYPE_SPECIFIER:
                break;
        case NODE_TYPE_SPECIFIER_LIST:
-               CDS_INIT_LIST_HEAD(&node->u.type_specifier_list.head);
+               BT_INIT_LIST_HEAD(&node->u.type_specifier_list.head);
                break;
        case NODE_POINTER:
                break;
        case NODE_TYPE_DECLARATOR:
-               CDS_INIT_LIST_HEAD(&node->u.type_declarator.pointers);
+               BT_INIT_LIST_HEAD(&node->u.type_declarator.pointers);
                break;
 
        case NODE_FLOATING_POINT:
-               CDS_INIT_LIST_HEAD(&node->u.floating_point.expressions);
+               BT_INIT_LIST_HEAD(&node->u.floating_point.expressions);
                break;
        case NODE_INTEGER:
-               CDS_INIT_LIST_HEAD(&node->u.integer.expressions);
+               BT_INIT_LIST_HEAD(&node->u.integer.expressions);
                break;
        case NODE_STRING:
-               CDS_INIT_LIST_HEAD(&node->u.string.expressions);
+               BT_INIT_LIST_HEAD(&node->u.string.expressions);
                break;
        case NODE_ENUMERATOR:
-               CDS_INIT_LIST_HEAD(&node->u.enumerator.values);
+               BT_INIT_LIST_HEAD(&node->u.enumerator.values);
                break;
        case NODE_ENUM:
-               CDS_INIT_LIST_HEAD(&node->u._enum.enumerator_list);
+               BT_INIT_LIST_HEAD(&node->u._enum.enumerator_list);
                break;
        case NODE_STRUCT_OR_VARIANT_DECLARATION:
-               CDS_INIT_LIST_HEAD(&node->u.struct_or_variant_declaration.type_declarators);
+               BT_INIT_LIST_HEAD(&node->u.struct_or_variant_declaration.type_declarators);
                break;
        case NODE_VARIANT:
-               CDS_INIT_LIST_HEAD(&node->u.variant.declaration_list);
+               BT_INIT_LIST_HEAD(&node->u.variant.declaration_list);
                break;
        case NODE_STRUCT:
-               CDS_INIT_LIST_HEAD(&node->u._struct.declaration_list);
-               CDS_INIT_LIST_HEAD(&node->u._struct.min_align);
+               BT_INIT_LIST_HEAD(&node->u._struct.declaration_list);
+               BT_INIT_LIST_HEAD(&node->u._struct.min_align);
                break;
 
        case NODE_UNKNOWN:
@@ -326,28 +326,28 @@ static int reparent_ctf_expression(struct ctf_node *node,
 {
        switch (parent->type) {
        case NODE_EVENT:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.event.declaration_list);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.event.declaration_list);
                break;
        case NODE_STREAM:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.stream.declaration_list);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.stream.declaration_list);
                break;
        case NODE_ENV:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.env.declaration_list);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.env.declaration_list);
                break;
        case NODE_TRACE:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.trace.declaration_list);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.trace.declaration_list);
                break;
        case NODE_CLOCK:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.clock.declaration_list);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.clock.declaration_list);
                break;
        case NODE_FLOATING_POINT:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.floating_point.expressions);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.floating_point.expressions);
                break;
        case NODE_INTEGER:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.integer.expressions);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.integer.expressions);
                break;
        case NODE_STRING:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.string.expressions);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.string.expressions);
                break;
 
        case NODE_ROOT:
@@ -381,28 +381,28 @@ static int reparent_typedef(struct ctf_node *node, struct ctf_node *parent)
 {
        switch (parent->type) {
        case NODE_ROOT:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.root.declaration_list);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.root.declaration_list);
                break;
        case NODE_EVENT:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.event.declaration_list);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.event.declaration_list);
                break;
        case NODE_STREAM:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.stream.declaration_list);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.stream.declaration_list);
                break;
        case NODE_ENV:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.env.declaration_list);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.env.declaration_list);
                break;
        case NODE_TRACE:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.trace.declaration_list);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.trace.declaration_list);
                break;
        case NODE_CLOCK:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.clock.declaration_list);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.clock.declaration_list);
                break;
        case NODE_VARIANT:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.variant.declaration_list);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.variant.declaration_list);
                break;
        case NODE_STRUCT:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u._struct.declaration_list);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u._struct.declaration_list);
                break;
 
        case NODE_FLOATING_POINT:
@@ -436,28 +436,28 @@ static int reparent_typealias(struct ctf_node *node, struct ctf_node *parent)
 {
        switch (parent->type) {
        case NODE_ROOT:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.root.declaration_list);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.root.declaration_list);
                break;
        case NODE_EVENT:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.event.declaration_list);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.event.declaration_list);
                break;
        case NODE_STREAM:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.stream.declaration_list);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.stream.declaration_list);
                break;
        case NODE_ENV:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.env.declaration_list);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.env.declaration_list);
                break;
        case NODE_TRACE:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.trace.declaration_list);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.trace.declaration_list);
                break;
        case NODE_CLOCK:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.clock.declaration_list);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.clock.declaration_list);
                break;
        case NODE_VARIANT:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.variant.declaration_list);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.variant.declaration_list);
                break;
        case NODE_STRUCT:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u._struct.declaration_list);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u._struct.declaration_list);
                break;
 
        case NODE_FLOATING_POINT:
@@ -492,7 +492,7 @@ static int reparent_type_specifier(struct ctf_node *node,
 {
        switch (parent->type) {
        case NODE_TYPE_SPECIFIER_LIST:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.type_specifier_list.head);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.type_specifier_list.head);
                break;
 
        case NODE_TYPE_SPECIFIER:
@@ -533,28 +533,28 @@ static int reparent_type_specifier_list(struct ctf_node *node,
 {
        switch (parent->type) {
        case NODE_ROOT:
-               cds_list_add_tail(&node->siblings, &parent->u.root.declaration_list);
+               bt_list_add_tail(&node->siblings, &parent->u.root.declaration_list);
                break;
        case NODE_EVENT:
-               cds_list_add_tail(&node->siblings, &parent->u.event.declaration_list);
+               bt_list_add_tail(&node->siblings, &parent->u.event.declaration_list);
                break;
        case NODE_STREAM:
-               cds_list_add_tail(&node->siblings, &parent->u.stream.declaration_list);
+               bt_list_add_tail(&node->siblings, &parent->u.stream.declaration_list);
                break;
        case NODE_ENV:
-               cds_list_add_tail(&node->siblings, &parent->u.env.declaration_list);
+               bt_list_add_tail(&node->siblings, &parent->u.env.declaration_list);
                break;
        case NODE_TRACE:
-               cds_list_add_tail(&node->siblings, &parent->u.trace.declaration_list);
+               bt_list_add_tail(&node->siblings, &parent->u.trace.declaration_list);
                break;
        case NODE_CLOCK:
-               cds_list_add_tail(&node->siblings, &parent->u.clock.declaration_list);
+               bt_list_add_tail(&node->siblings, &parent->u.clock.declaration_list);
                break;
        case NODE_VARIANT:
-               cds_list_add_tail(&node->siblings, &parent->u.variant.declaration_list);
+               bt_list_add_tail(&node->siblings, &parent->u.variant.declaration_list);
                break;
        case NODE_STRUCT:
-               cds_list_add_tail(&node->siblings, &parent->u._struct.declaration_list);
+               bt_list_add_tail(&node->siblings, &parent->u._struct.declaration_list);
                break;
        case NODE_TYPEDEF:
                parent->u._typedef.type_specifier_list = node;
@@ -601,16 +601,16 @@ static int reparent_type_declarator(struct ctf_node *node,
                parent->u.type_declarator.u.nested.type_declarator = node;
                break;
        case NODE_STRUCT_OR_VARIANT_DECLARATION:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.struct_or_variant_declaration.type_declarators);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.struct_or_variant_declaration.type_declarators);
                break;
        case NODE_TYPEDEF:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u._typedef.type_declarators);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u._typedef.type_declarators);
                break;
        case NODE_TYPEALIAS_TARGET:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.typealias_target.type_declarators);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.typealias_target.type_declarators);
                break;
        case NODE_TYPEALIAS_ALIAS:
-               _cds_list_splice_tail(&node->tmp_head, &parent->u.typealias_alias.type_declarators);
+               _bt_list_splice_tail(&node->tmp_head, &parent->u.typealias_alias.type_declarators);
                break;
 
        case NODE_ROOT:
@@ -665,35 +665,35 @@ static int set_parent_node(struct ctf_node *node,
 
        case NODE_EVENT:
                if (parent->type == NODE_ROOT) {
-                       _cds_list_splice_tail(&node->tmp_head, &parent->u.root.event);
+                       _bt_list_splice_tail(&node->tmp_head, &parent->u.root.event);
                } else {
                        return -EPERM;
                }
                break;
        case NODE_STREAM:
                if (parent->type == NODE_ROOT) {
-                       _cds_list_splice_tail(&node->tmp_head, &parent->u.root.stream);
+                       _bt_list_splice_tail(&node->tmp_head, &parent->u.root.stream);
                } else {
                        return -EPERM;
                }
                break;
        case NODE_ENV:
                if (parent->type == NODE_ROOT) {
-                       _cds_list_splice_tail(&node->tmp_head, &parent->u.root.env);
+                       _bt_list_splice_tail(&node->tmp_head, &parent->u.root.env);
                } else {
                        return -EPERM;
                }
                break;
        case NODE_TRACE:
                if (parent->type == NODE_ROOT) {
-                       _cds_list_splice_tail(&node->tmp_head, &parent->u.root.trace);
+                       _bt_list_splice_tail(&node->tmp_head, &parent->u.root.trace);
                } else {
                        return -EPERM;
                }
                break;
        case NODE_CLOCK:
                if (parent->type == NODE_ROOT) {
-                       _cds_list_splice_tail(&node->tmp_head, &parent->u.root.clock);
+                       _bt_list_splice_tail(&node->tmp_head, &parent->u.root.clock);
                } else {
                        return -EPERM;
                }
@@ -725,7 +725,7 @@ static int set_parent_node(struct ctf_node *node,
 
        case NODE_POINTER:
                if (parent->type == NODE_TYPE_DECLARATOR) {
-                       _cds_list_splice_tail(&node->tmp_head, &parent->u.type_declarator.pointers);
+                       _bt_list_splice_tail(&node->tmp_head, &parent->u.type_declarator.pointers);
                } else
                        return -EPERM;
                break;
@@ -748,7 +748,7 @@ static int set_parent_node(struct ctf_node *node,
 
        case NODE_ENUMERATOR:
                if (parent->type == NODE_ENUM) {
-                       _cds_list_splice_tail(&node->tmp_head, &parent->u._enum.enumerator_list);
+                       _bt_list_splice_tail(&node->tmp_head, &parent->u._enum.enumerator_list);
                } else {
                        return -EPERM;
                }
@@ -756,10 +756,10 @@ static int set_parent_node(struct ctf_node *node,
        case NODE_STRUCT_OR_VARIANT_DECLARATION:
                switch (parent->type) {
                case NODE_STRUCT:
-                       _cds_list_splice_tail(&node->tmp_head, &parent->u._struct.declaration_list);
+                       _bt_list_splice_tail(&node->tmp_head, &parent->u._struct.declaration_list);
                        break;
                case NODE_VARIANT:
-                       _cds_list_splice_tail(&node->tmp_head, &parent->u.variant.declaration_list);
+                       _bt_list_splice_tail(&node->tmp_head, &parent->u.variant.declaration_list);
                        break;
                default:
                        return -EINVAL;
@@ -791,11 +791,11 @@ do {                                                              \
        YYERROR;                                                \
 } while (0)
 
-static void free_strings(struct cds_list_head *list)
+static void free_strings(struct bt_list_head *list)
 {
        struct gc_string *gstr, *tmp;
 
-       cds_list_for_each_entry_safe(gstr, tmp, list, gc)
+       bt_list_for_each_entry_safe(gstr, tmp, list, gc)
                free(gstr);
 }
 
@@ -807,15 +807,15 @@ static struct ctf_ast *ctf_ast_alloc(void)
        if (!ast)
                return NULL;
        memset(ast, 0, sizeof(*ast));
-       CDS_INIT_LIST_HEAD(&ast->allocated_nodes);
+       BT_INIT_LIST_HEAD(&ast->allocated_nodes);
        ast->root.type = NODE_ROOT;
-       CDS_INIT_LIST_HEAD(&ast->root.tmp_head);
-       CDS_INIT_LIST_HEAD(&ast->root.u.root.declaration_list);
-       CDS_INIT_LIST_HEAD(&ast->root.u.root.trace);
-       CDS_INIT_LIST_HEAD(&ast->root.u.root.env);
-       CDS_INIT_LIST_HEAD(&ast->root.u.root.stream);
-       CDS_INIT_LIST_HEAD(&ast->root.u.root.event);
-       CDS_INIT_LIST_HEAD(&ast->root.u.root.clock);
+       BT_INIT_LIST_HEAD(&ast->root.tmp_head);
+       BT_INIT_LIST_HEAD(&ast->root.u.root.declaration_list);
+       BT_INIT_LIST_HEAD(&ast->root.u.root.trace);
+       BT_INIT_LIST_HEAD(&ast->root.u.root.env);
+       BT_INIT_LIST_HEAD(&ast->root.u.root.stream);
+       BT_INIT_LIST_HEAD(&ast->root.u.root.event);
+       BT_INIT_LIST_HEAD(&ast->root.u.root.clock);
        return ast;
 }
 
@@ -823,7 +823,7 @@ static void ctf_ast_free(struct ctf_ast *ast)
 {
        struct ctf_node *node, *tmp;
 
-       cds_list_for_each_entry_safe(node, tmp, &ast->allocated_nodes, gc)
+       bt_list_for_each_entry_safe(node, tmp, &ast->allocated_nodes, gc)
                free(node);
 }
 
@@ -857,7 +857,7 @@ struct ctf_scanner *ctf_scanner_alloc(FILE *input)
                goto cleanup_lexer;
        init_scope(&scanner->root_scope, NULL);
        scanner->cs = &scanner->root_scope;
-       CDS_INIT_LIST_HEAD(&scanner->allocated_strings);
+       BT_INIT_LIST_HEAD(&scanner->allocated_strings);
 
        if (yydebug)
                fprintf(stdout, "Scanner input is a%s.\n",
@@ -1133,8 +1133,8 @@ postfix_expression:
                        $$ = make_node(scanner, NODE_UNARY_EXPRESSION);
                        $$->u.unary_expression.type = UNARY_SBRAC;
                        $$->u.unary_expression.u.sbrac_exp = $3;
-                       cds_list_splice(&($1)->tmp_head, &($$)->tmp_head);
-                       cds_list_add_tail(&($$)->siblings, &($$)->tmp_head);
+                       bt_list_splice(&($1)->tmp_head, &($$)->tmp_head);
+                       bt_list_add_tail(&($$)->siblings, &($$)->tmp_head);
                }
        |       postfix_expression DOT IDENTIFIER
                {
@@ -1142,8 +1142,8 @@ postfix_expression:
                        $$->u.unary_expression.type = UNARY_STRING;
                        $$->u.unary_expression.u.string = yylval.gs->s;
                        $$->u.unary_expression.link = UNARY_DOTLINK;
-                       cds_list_splice(&($1)->tmp_head, &($$)->tmp_head);
-                       cds_list_add_tail(&($$)->siblings, &($$)->tmp_head);
+                       bt_list_splice(&($1)->tmp_head, &($$)->tmp_head);
+                       bt_list_add_tail(&($$)->siblings, &($$)->tmp_head);
                }
        |       postfix_expression DOT ID_TYPE
                {
@@ -1151,8 +1151,8 @@ postfix_expression:
                        $$->u.unary_expression.type = UNARY_STRING;
                        $$->u.unary_expression.u.string = yylval.gs->s;
                        $$->u.unary_expression.link = UNARY_DOTLINK;
-                       cds_list_splice(&($1)->tmp_head, &($$)->tmp_head);
-                       cds_list_add_tail(&($$)->siblings, &($$)->tmp_head);
+                       bt_list_splice(&($1)->tmp_head, &($$)->tmp_head);
+                       bt_list_add_tail(&($$)->siblings, &($$)->tmp_head);
                }
        |       postfix_expression RARROW IDENTIFIER
                {
@@ -1160,8 +1160,8 @@ postfix_expression:
                        $$->u.unary_expression.type = UNARY_STRING;
                        $$->u.unary_expression.u.string = yylval.gs->s;
                        $$->u.unary_expression.link = UNARY_ARROWLINK;
-                       cds_list_splice(&($1)->tmp_head, &($$)->tmp_head);
-                       cds_list_add_tail(&($$)->siblings, &($$)->tmp_head);
+                       bt_list_splice(&($1)->tmp_head, &($$)->tmp_head);
+                       bt_list_add_tail(&($$)->siblings, &($$)->tmp_head);
                }
        |       postfix_expression RARROW ID_TYPE
                {
@@ -1169,8 +1169,8 @@ postfix_expression:
                        $$->u.unary_expression.type = UNARY_STRING;
                        $$->u.unary_expression.u.string = yylval.gs->s;
                        $$->u.unary_expression.link = UNARY_ARROWLINK;
-                       cds_list_splice(&($1)->tmp_head, &($$)->tmp_head);
-                       cds_list_add_tail(&($$)->siblings, &($$)->tmp_head);
+                       bt_list_splice(&($1)->tmp_head, &($$)->tmp_head);
+                       bt_list_add_tail(&($$)->siblings, &($$)->tmp_head);
                }
        ;
 
@@ -1201,7 +1201,7 @@ unary_expression_or_range:
                unary_expression DOTDOTDOT unary_expression
                {
                        $$ = $1;
-                       _cds_list_splice_tail(&($3)->tmp_head, &($$)->tmp_head);
+                       _bt_list_splice_tail(&($3)->tmp_head, &($$)->tmp_head);
                        $3->u.unary_expression.link = UNARY_DOTDOTDOT;
                }
        |       unary_expression
@@ -1230,9 +1230,9 @@ declaration:
                        $$ = make_node(scanner, NODE_TYPEDEF);
                        list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
                        $$->u._typedef.type_specifier_list = list;
-                       _cds_list_splice_tail(&($1)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
-                       _cds_list_splice_tail(&($3)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
-                       _cds_list_splice_tail(&($4)->tmp_head, &($$)->u._typedef.type_declarators);
+                       _bt_list_splice_tail(&($1)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
+                       _bt_list_splice_tail(&($3)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
+                       _bt_list_splice_tail(&($4)->tmp_head, &($$)->u._typedef.type_declarators);
                }
        |       TYPEDEF declaration_specifiers type_declarator_list SEMICOLON
                {
@@ -1241,8 +1241,8 @@ declaration:
                        $$ = make_node(scanner, NODE_TYPEDEF);
                        list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
                        $$->u._typedef.type_specifier_list = list;
-                       _cds_list_splice_tail(&($2)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
-                       _cds_list_splice_tail(&($3)->tmp_head, &($$)->u._typedef.type_declarators);
+                       _bt_list_splice_tail(&($2)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
+                       _bt_list_splice_tail(&($3)->tmp_head, &($$)->u._typedef.type_declarators);
                }
        |       declaration_specifiers TYPEDEF type_declarator_list SEMICOLON
                {
@@ -1251,8 +1251,8 @@ declaration:
                        $$ = make_node(scanner, NODE_TYPEDEF);
                        list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
                        $$->u._typedef.type_specifier_list = list;
-                       _cds_list_splice_tail(&($1)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
-                       _cds_list_splice_tail(&($3)->tmp_head, &($$)->u._typedef.type_declarators);
+                       _bt_list_splice_tail(&($1)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
+                       _bt_list_splice_tail(&($3)->tmp_head, &($$)->u._typedef.type_declarators);
                }
        |       TYPEALIAS declaration_specifiers abstract_declarator_list TYPEASSIGN alias_declaration_specifiers alias_abstract_declarator_list SEMICOLON
                {
@@ -1264,13 +1264,13 @@ declaration:
 
                        list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
                        $$->u.typealias.target->u.typealias_target.type_specifier_list = list;
-                       _cds_list_splice_tail(&($2)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
-                       _cds_list_splice_tail(&($3)->tmp_head, &($$)->u.typealias.target->u.typealias_target.type_declarators);
+                       _bt_list_splice_tail(&($2)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
+                       _bt_list_splice_tail(&($3)->tmp_head, &($$)->u.typealias.target->u.typealias_target.type_declarators);
 
                        list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
                        $$->u.typealias.alias->u.typealias_alias.type_specifier_list = list;
-                       _cds_list_splice_tail(&($5)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
-                       _cds_list_splice_tail(&($6)->tmp_head, &($$)->u.typealias.alias->u.typealias_alias.type_declarators);
+                       _bt_list_splice_tail(&($5)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
+                       _bt_list_splice_tail(&($6)->tmp_head, &($$)->u.typealias.alias->u.typealias_alias.type_declarators);
                }
        ;
 
@@ -1398,7 +1398,7 @@ integer_declaration_specifiers:
                        $$ = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
                        node = make_node(scanner, NODE_TYPE_SPECIFIER);
                        node->u.type_specifier.type = TYPESPEC_CONST;
-                       cds_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
+                       bt_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
                }
        |       integer_type_specifier
                {
@@ -1406,7 +1406,7 @@ integer_declaration_specifiers:
 
                        $$ = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
                        node = $1;
-                       cds_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
+                       bt_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
                }
        |       integer_declaration_specifiers CONST
                {
@@ -1415,12 +1415,12 @@ integer_declaration_specifiers:
                        $$ = $1;
                        node = make_node(scanner, NODE_TYPE_SPECIFIER);
                        node->u.type_specifier.type = TYPESPEC_CONST;
-                       cds_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
+                       bt_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
                }
        |       integer_declaration_specifiers integer_type_specifier
                {
                        $$ = $1;
-                       cds_list_add_tail(&($2)->siblings, &($$)->u.type_specifier_list.head);
+                       bt_list_add_tail(&($2)->siblings, &($$)->u.type_specifier_list.head);
                }
        ;
 
@@ -1432,7 +1432,7 @@ declaration_specifiers:
                        $$ = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
                        node = make_node(scanner, NODE_TYPE_SPECIFIER);
                        node->u.type_specifier.type = TYPESPEC_CONST;
-                       cds_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
+                       bt_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
                }
        |       type_specifier
                {
@@ -1440,7 +1440,7 @@ declaration_specifiers:
 
                        $$ = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
                        node = $1;
-                       cds_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
+                       bt_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
                }
        |       declaration_specifiers CONST
                {
@@ -1449,12 +1449,12 @@ declaration_specifiers:
                        $$ = $1;
                        node = make_node(scanner, NODE_TYPE_SPECIFIER);
                        node->u.type_specifier.type = TYPESPEC_CONST;
-                       cds_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
+                       bt_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
                }
        |       declaration_specifiers type_specifier
                {
                        $$ = $1;
-                       cds_list_add_tail(&($2)->siblings, &($$)->u.type_specifier_list.head);
+                       bt_list_add_tail(&($2)->siblings, &($$)->u.type_specifier_list.head);
                }
        ;
 
@@ -1464,7 +1464,7 @@ type_declarator_list:
        |       type_declarator_list COMMA type_declarator
                {
                        $$ = $1;
-                       cds_list_add_tail(&($3)->siblings, &($$)->tmp_head);
+                       bt_list_add_tail(&($3)->siblings, &($$)->tmp_head);
                }
        ;
 
@@ -1701,7 +1701,7 @@ struct_type_specifier:
                {
                        $$ = make_node(scanner, NODE_STRUCT);
                        $$->u._struct.has_body = 1;
-                       cds_list_add_tail(&($6)->siblings, &$$->u._struct.min_align);
+                       bt_list_add_tail(&($6)->siblings, &$$->u._struct.min_align);
                        if ($2 && set_parent_node($2, $$))
                                reparent_error(scanner, "struct reparent error");
                }
@@ -1710,7 +1710,7 @@ struct_type_specifier:
                        $$ = make_node(scanner, NODE_STRUCT);
                        $$->u._struct.has_body = 1;
                        $$->u._struct.name = $1->s;
-                       cds_list_add_tail(&($7)->siblings, &$$->u._struct.min_align);
+                       bt_list_add_tail(&($7)->siblings, &$$->u._struct.min_align);
                        if ($3 && set_parent_node($3, $$))
                                reparent_error(scanner, "struct reparent error");
                }
@@ -1719,7 +1719,7 @@ struct_type_specifier:
                        $$ = make_node(scanner, NODE_STRUCT);
                        $$->u._struct.has_body = 1;
                        $$->u._struct.name = $1->s;
-                       cds_list_add_tail(&($7)->siblings, &$$->u._struct.min_align);
+                       bt_list_add_tail(&($7)->siblings, &$$->u._struct.min_align);
                        if ($3 && set_parent_node($3, $$))
                                reparent_error(scanner, "struct reparent error");
                }
@@ -1856,21 +1856,21 @@ enum_type_specifier:
                {
                        $$ = make_node(scanner, NODE_ENUM);
                        $$->u._enum.has_body = 1;
-                       _cds_list_splice_tail(&($2)->tmp_head, &($$)->u._enum.enumerator_list);
+                       _bt_list_splice_tail(&($2)->tmp_head, &($$)->u._enum.enumerator_list);
                }
        |       COLON integer_declaration_specifiers LBRAC enumerator_list RBRAC
                {
                        $$ = make_node(scanner, NODE_ENUM);
                        $$->u._enum.has_body = 1;
                        ($$)->u._enum.container_type = $2;
-                       _cds_list_splice_tail(&($4)->tmp_head, &($$)->u._enum.enumerator_list);
+                       _bt_list_splice_tail(&($4)->tmp_head, &($$)->u._enum.enumerator_list);
                }
        |       IDENTIFIER LBRAC enumerator_list RBRAC
                {
                        $$ = make_node(scanner, NODE_ENUM);
                        $$->u._enum.has_body = 1;
                        $$->u._enum.enum_id = $1->s;
-                       _cds_list_splice_tail(&($3)->tmp_head, &($$)->u._enum.enumerator_list);
+                       _bt_list_splice_tail(&($3)->tmp_head, &($$)->u._enum.enumerator_list);
                }
        |       IDENTIFIER COLON integer_declaration_specifiers LBRAC enumerator_list RBRAC
                {
@@ -1878,14 +1878,14 @@ enum_type_specifier:
                        $$->u._enum.has_body = 1;
                        $$->u._enum.enum_id = $1->s;
                        ($$)->u._enum.container_type = $3;
-                       _cds_list_splice_tail(&($5)->tmp_head, &($$)->u._enum.enumerator_list);
+                       _bt_list_splice_tail(&($5)->tmp_head, &($$)->u._enum.enumerator_list);
                }
        |       ID_TYPE LBRAC enumerator_list RBRAC
                {
                        $$ = make_node(scanner, NODE_ENUM);
                        $$->u._enum.has_body = 1;
                        $$->u._enum.enum_id = $1->s;
-                       _cds_list_splice_tail(&($3)->tmp_head, &($$)->u._enum.enumerator_list);
+                       _bt_list_splice_tail(&($3)->tmp_head, &($$)->u._enum.enumerator_list);
                }
        |       ID_TYPE COLON integer_declaration_specifiers LBRAC enumerator_list RBRAC
                {
@@ -1893,27 +1893,27 @@ enum_type_specifier:
                        $$->u._enum.has_body = 1;
                        $$->u._enum.enum_id = $1->s;
                        ($$)->u._enum.container_type = $3;
-                       _cds_list_splice_tail(&($5)->tmp_head, &($$)->u._enum.enumerator_list);
+                       _bt_list_splice_tail(&($5)->tmp_head, &($$)->u._enum.enumerator_list);
                }
        |       LBRAC enumerator_list COMMA RBRAC
                {
                        $$ = make_node(scanner, NODE_ENUM);
                        $$->u._enum.has_body = 1;
-                       _cds_list_splice_tail(&($2)->tmp_head, &($$)->u._enum.enumerator_list);
+                       _bt_list_splice_tail(&($2)->tmp_head, &($$)->u._enum.enumerator_list);
                }
        |       COLON integer_declaration_specifiers LBRAC enumerator_list COMMA RBRAC
                {
                        $$ = make_node(scanner, NODE_ENUM);
                        $$->u._enum.has_body = 1;
                        ($$)->u._enum.container_type = $2;
-                       _cds_list_splice_tail(&($4)->tmp_head, &($$)->u._enum.enumerator_list);
+                       _bt_list_splice_tail(&($4)->tmp_head, &($$)->u._enum.enumerator_list);
                }
        |       IDENTIFIER LBRAC enumerator_list COMMA RBRAC
                {
                        $$ = make_node(scanner, NODE_ENUM);
                        $$->u._enum.has_body = 1;
                        $$->u._enum.enum_id = $1->s;
-                       _cds_list_splice_tail(&($3)->tmp_head, &($$)->u._enum.enumerator_list);
+                       _bt_list_splice_tail(&($3)->tmp_head, &($$)->u._enum.enumerator_list);
                }
        |       IDENTIFIER COLON integer_declaration_specifiers LBRAC enumerator_list COMMA RBRAC
                {
@@ -1921,7 +1921,7 @@ enum_type_specifier:
                        $$->u._enum.has_body = 1;
                        $$->u._enum.enum_id = $1->s;
                        ($$)->u._enum.container_type = $3;
-                       _cds_list_splice_tail(&($5)->tmp_head, &($$)->u._enum.enumerator_list);
+                       _bt_list_splice_tail(&($5)->tmp_head, &($$)->u._enum.enumerator_list);
                }
        |       IDENTIFIER
                {
@@ -1934,7 +1934,7 @@ enum_type_specifier:
                        $$ = make_node(scanner, NODE_ENUM);
                        $$->u._enum.has_body = 1;
                        $$->u._enum.enum_id = $1->s;
-                       _cds_list_splice_tail(&($3)->tmp_head, &($$)->u._enum.enumerator_list);
+                       _bt_list_splice_tail(&($3)->tmp_head, &($$)->u._enum.enumerator_list);
                }
        |       ID_TYPE COLON integer_declaration_specifiers LBRAC enumerator_list COMMA RBRAC
                {
@@ -1942,7 +1942,7 @@ enum_type_specifier:
                        $$->u._enum.has_body = 1;
                        $$->u._enum.enum_id = $1->s;
                        ($$)->u._enum.container_type = $3;
-                       _cds_list_splice_tail(&($5)->tmp_head, &($$)->u._enum.enumerator_list);
+                       _bt_list_splice_tail(&($5)->tmp_head, &($$)->u._enum.enumerator_list);
                }
        |       ID_TYPE
                {
@@ -1959,10 +1959,10 @@ struct_or_variant_declaration_list:
                {
                        if ($1) {
                                $$ = $1;
-                               cds_list_add_tail(&($2)->siblings, &($$)->tmp_head);
+                               bt_list_add_tail(&($2)->siblings, &($$)->tmp_head);
                        } else {
                                $$ = $2;
-                               cds_list_add_tail(&($$)->siblings, &($$)->tmp_head);
+                               bt_list_add_tail(&($$)->siblings, &($$)->tmp_head);
                        }
                }
        ;
@@ -1973,10 +1973,10 @@ struct_or_variant_declaration:
                        struct ctf_node *list;
 
                        list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
-                       _cds_list_splice_tail(&($1)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
+                       _bt_list_splice_tail(&($1)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
                        $$ = make_node(scanner, NODE_STRUCT_OR_VARIANT_DECLARATION);
                        ($$)->u.struct_or_variant_declaration.type_specifier_list = list;
-                       _cds_list_splice_tail(&($2)->tmp_head, &($$)->u.struct_or_variant_declaration.type_declarators);
+                       _bt_list_splice_tail(&($2)->tmp_head, &($$)->u.struct_or_variant_declaration.type_declarators);
                }
        |       declaration_specifiers TYPEDEF declaration_specifiers type_declarator_list SEMICOLON
                {
@@ -1985,9 +1985,9 @@ struct_or_variant_declaration:
                        $$ = make_node(scanner, NODE_TYPEDEF);
                        list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
                        $$->u._typedef.type_specifier_list = list;
-                       _cds_list_splice_tail(&($1)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
-                       _cds_list_splice_tail(&($3)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
-                       _cds_list_splice_tail(&($4)->tmp_head, &($$)->u._typedef.type_declarators);
+                       _bt_list_splice_tail(&($1)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
+                       _bt_list_splice_tail(&($3)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
+                       _bt_list_splice_tail(&($4)->tmp_head, &($$)->u._typedef.type_declarators);
                }
        |       TYPEDEF declaration_specifiers type_declarator_list SEMICOLON
                {
@@ -1996,18 +1996,18 @@ struct_or_variant_declaration:
                        $$ = make_node(scanner, NODE_TYPEDEF);
                        list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
                        $$->u._typedef.type_specifier_list = list;
-                       _cds_list_splice_tail(&($2)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
-                       _cds_list_splice_tail(&($3)->tmp_head, &($$)->u._typedef.type_declarators);
+                       _bt_list_splice_tail(&($2)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
+                       _bt_list_splice_tail(&($3)->tmp_head, &($$)->u._typedef.type_declarators);
                }
        |       declaration_specifiers TYPEDEF type_declarator_list SEMICOLON
                {
                        struct ctf_node *list;
 
                        list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
-                       _cds_list_splice_tail(&($1)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
+                       _bt_list_splice_tail(&($1)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
                        $$ = make_node(scanner, NODE_TYPEDEF);
                        ($$)->u.struct_or_variant_declaration.type_specifier_list = list;
-                       _cds_list_splice_tail(&($3)->tmp_head, &($$)->u._typedef.type_declarators);
+                       _bt_list_splice_tail(&($3)->tmp_head, &($$)->u._typedef.type_declarators);
                }
        |       TYPEALIAS declaration_specifiers abstract_declarator_list TYPEASSIGN alias_declaration_specifiers alias_abstract_declarator_list SEMICOLON
                {
@@ -2019,13 +2019,13 @@ struct_or_variant_declaration:
 
                        list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
                        $$->u.typealias.target->u.typealias_target.type_specifier_list = list;
-                       _cds_list_splice_tail(&($2)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
-                       _cds_list_splice_tail(&($3)->tmp_head, &($$)->u.typealias.target->u.typealias_target.type_declarators);
+                       _bt_list_splice_tail(&($2)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
+                       _bt_list_splice_tail(&($3)->tmp_head, &($$)->u.typealias.target->u.typealias_target.type_declarators);
 
                        list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
                        $$->u.typealias.alias->u.typealias_alias.type_specifier_list = list;
-                       _cds_list_splice_tail(&($5)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
-                       _cds_list_splice_tail(&($6)->tmp_head, &($$)->u.typealias.alias->u.typealias_alias.type_declarators);
+                       _bt_list_splice_tail(&($5)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
+                       _bt_list_splice_tail(&($6)->tmp_head, &($$)->u.typealias.alias->u.typealias_alias.type_declarators);
                }
        ;
 
@@ -2037,7 +2037,7 @@ alias_declaration_specifiers:
                        $$ = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
                        node = make_node(scanner, NODE_TYPE_SPECIFIER);
                        node->u.type_specifier.type = TYPESPEC_CONST;
-                       cds_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
+                       bt_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
                }
        |       type_specifier
                {
@@ -2045,7 +2045,7 @@ alias_declaration_specifiers:
 
                        $$ = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
                        node = $1;
-                       cds_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
+                       bt_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
                }
        |       IDENTIFIER
                {
@@ -2056,7 +2056,7 @@ alias_declaration_specifiers:
                        node = make_node(scanner, NODE_TYPE_SPECIFIER);
                        node->u.type_specifier.type = TYPESPEC_ID_TYPE;
                        node->u.type_specifier.id_type = yylval.gs->s;
-                       cds_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
+                       bt_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
                }
        |       alias_declaration_specifiers CONST
                {
@@ -2065,12 +2065,12 @@ alias_declaration_specifiers:
                        $$ = $1;
                        node = make_node(scanner, NODE_TYPE_SPECIFIER);
                        node->u.type_specifier.type = TYPESPEC_CONST;
-                       cds_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
+                       bt_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
                }
        |       alias_declaration_specifiers type_specifier
                {
                        $$ = $1;
-                       cds_list_add_tail(&($2)->siblings, &($$)->u.type_specifier_list.head);
+                       bt_list_add_tail(&($2)->siblings, &($$)->u.type_specifier_list.head);
                }
        |       alias_declaration_specifiers IDENTIFIER
                {
@@ -2081,7 +2081,7 @@ alias_declaration_specifiers:
                        node = make_node(scanner, NODE_TYPE_SPECIFIER);
                        node->u.type_specifier.type = TYPESPEC_ID_TYPE;
                        node->u.type_specifier.id_type = yylval.gs->s;
-                       cds_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
+                       bt_list_add_tail(&node->siblings, &($$)->u.type_specifier_list.head);
                }
        ;
 
@@ -2091,7 +2091,7 @@ struct_or_variant_declarator_list:
        |       struct_or_variant_declarator_list COMMA struct_or_variant_declarator
                {
                        $$ = $1;
-                       cds_list_add_tail(&($3)->siblings, &($$)->tmp_head);
+                       bt_list_add_tail(&($3)->siblings, &($$)->tmp_head);
                }
        ;
 
@@ -2114,7 +2114,7 @@ enumerator_list:
        |       enumerator_list COMMA enumerator
                {
                        $$ = $1;
-                       cds_list_add_tail(&($3)->siblings, &($$)->tmp_head);
+                       bt_list_add_tail(&($3)->siblings, &($$)->tmp_head);
                }
        ;
 
@@ -2148,31 +2148,31 @@ enumerator:
                {
                        $$ = make_node(scanner, NODE_ENUMERATOR);
                        $$->u.enumerator.id = $1->s;
-                       cds_list_splice(&($3)->tmp_head, &($$)->u.enumerator.values);
+                       bt_list_splice(&($3)->tmp_head, &($$)->u.enumerator.values);
                }
        |       ID_TYPE EQUAL unary_expression_or_range
                {
                        $$ = make_node(scanner, NODE_ENUMERATOR);
                        $$->u.enumerator.id = $1->s;
-                       cds_list_splice(&($3)->tmp_head, &($$)->u.enumerator.values);
+                       bt_list_splice(&($3)->tmp_head, &($$)->u.enumerator.values);
                }
        |       keywords EQUAL unary_expression_or_range
                {
                        $$ = make_node(scanner, NODE_ENUMERATOR);
                        $$->u.enumerator.id = $1->s;
-                       cds_list_splice(&($3)->tmp_head, &($$)->u.enumerator.values);
+                       bt_list_splice(&($3)->tmp_head, &($$)->u.enumerator.values);
                }
        |       STRING_LITERAL_START DQUOTE EQUAL unary_expression_or_range
                {
                        $$ = make_node(scanner, NODE_ENUMERATOR);
                        $$->u.enumerator.id = "";
-                       cds_list_splice(&($4)->tmp_head, &($$)->u.enumerator.values);
+                       bt_list_splice(&($4)->tmp_head, &($$)->u.enumerator.values);
                }
        |       STRING_LITERAL_START s_char_sequence DQUOTE EQUAL unary_expression_or_range
                {
                        $$ = make_node(scanner, NODE_ENUMERATOR);
                        $$->u.enumerator.id = $2->s;
-                       cds_list_splice(&($5)->tmp_head, &($$)->u.enumerator.values);
+                       bt_list_splice(&($5)->tmp_head, &($$)->u.enumerator.values);
                }
        ;
 
@@ -2182,7 +2182,7 @@ abstract_declarator_list:
        |       abstract_declarator_list COMMA abstract_declarator
                {
                        $$ = $1;
-                       cds_list_add_tail(&($3)->siblings, &($$)->tmp_head);
+                       bt_list_add_tail(&($3)->siblings, &($$)->tmp_head);
                }
        ;
 
@@ -2192,7 +2192,7 @@ abstract_declarator:
        |       pointer direct_abstract_declarator
                {
                        $$ = $2;
-                       cds_list_splice(&($1)->tmp_head, &($$)->u.type_declarator.pointers);
+                       bt_list_splice(&($1)->tmp_head, &($$)->u.type_declarator.pointers);
                }
        ;
 
@@ -2220,8 +2220,8 @@ direct_abstract_declarator:
                        $$ = make_node(scanner, NODE_TYPE_DECLARATOR);
                        $$->u.type_declarator.type = TYPEDEC_NESTED;
                        $$->u.type_declarator.u.nested.type_declarator = $1;
-                       CDS_INIT_LIST_HEAD(&($$)->u.type_declarator.u.nested.length);
-                       _cds_list_splice_tail(&($3)->tmp_head, &($$)->u.type_declarator.u.nested.length);
+                       BT_INIT_LIST_HEAD(&($$)->u.type_declarator.u.nested.length);
+                       _bt_list_splice_tail(&($3)->tmp_head, &($$)->u.type_declarator.u.nested.length);
                }
        |       direct_abstract_declarator LSBRAC RSBRAC
                {
@@ -2238,7 +2238,7 @@ alias_abstract_declarator_list:
        |       alias_abstract_declarator_list COMMA alias_abstract_declarator
                {
                        $$ = $1;
-                       cds_list_add_tail(&($3)->siblings, &($$)->tmp_head);
+                       bt_list_add_tail(&($3)->siblings, &($$)->tmp_head);
                }
        ;
 
@@ -2248,7 +2248,7 @@ alias_abstract_declarator:
        |       pointer direct_alias_abstract_declarator
                {
                        $$ = $2;
-                       cds_list_splice(&($1)->tmp_head, &($$)->u.type_declarator.pointers);
+                       bt_list_splice(&($1)->tmp_head, &($$)->u.type_declarator.pointers);
                }
        ;
 
@@ -2270,8 +2270,8 @@ direct_alias_abstract_declarator:
                        $$ = make_node(scanner, NODE_TYPE_DECLARATOR);
                        $$->u.type_declarator.type = TYPEDEC_NESTED;
                        $$->u.type_declarator.u.nested.type_declarator = $1;
-                       CDS_INIT_LIST_HEAD(&($$)->u.type_declarator.u.nested.length);
-                       _cds_list_splice_tail(&($3)->tmp_head, &($$)->u.type_declarator.u.nested.length);
+                       BT_INIT_LIST_HEAD(&($$)->u.type_declarator.u.nested.length);
+                       _bt_list_splice_tail(&($3)->tmp_head, &($$)->u.type_declarator.u.nested.length);
                }
        |       direct_alias_abstract_declarator LSBRAC RSBRAC
                {
@@ -2288,7 +2288,7 @@ declarator:
        |       pointer direct_declarator
                {
                        $$ = $2;
-                       cds_list_splice(&($1)->tmp_head, &($$)->u.type_declarator.pointers);
+                       bt_list_splice(&($1)->tmp_head, &($$)->u.type_declarator.pointers);
                }
        ;
 
@@ -2310,8 +2310,8 @@ direct_declarator:
                        $$ = make_node(scanner, NODE_TYPE_DECLARATOR);
                        $$->u.type_declarator.type = TYPEDEC_NESTED;
                        $$->u.type_declarator.u.nested.type_declarator = $1;
-                       CDS_INIT_LIST_HEAD(&($$)->u.type_declarator.u.nested.length);
-                       _cds_list_splice_tail(&($3)->tmp_head, &($$)->u.type_declarator.u.nested.length);
+                       BT_INIT_LIST_HEAD(&($$)->u.type_declarator.u.nested.length);
+                       _bt_list_splice_tail(&($3)->tmp_head, &($$)->u.type_declarator.u.nested.length);
                }
        ;
 
@@ -2321,7 +2321,7 @@ type_declarator:
        |       pointer direct_type_declarator
                {
                        $$ = $2;
-                       cds_list_splice(&($1)->tmp_head, &($$)->u.type_declarator.pointers);
+                       bt_list_splice(&($1)->tmp_head, &($$)->u.type_declarator.pointers);
                }
        ;
 
@@ -2344,8 +2344,8 @@ direct_type_declarator:
                        $$ = make_node(scanner, NODE_TYPE_DECLARATOR);
                        $$->u.type_declarator.type = TYPEDEC_NESTED;
                        $$->u.type_declarator.u.nested.type_declarator = $1;
-                       CDS_INIT_LIST_HEAD(&($$)->u.type_declarator.u.nested.length);
-                       _cds_list_splice_tail(&($3)->tmp_head, &($$)->u.type_declarator.u.nested.length);
+                       BT_INIT_LIST_HEAD(&($$)->u.type_declarator.u.nested.length);
+                       _bt_list_splice_tail(&($3)->tmp_head, &($$)->u.type_declarator.u.nested.length);
                }
        ;
 
@@ -2357,13 +2357,13 @@ pointer:
        |       STAR pointer
                {
                        $$ = make_node(scanner, NODE_POINTER);
-                       cds_list_splice(&($2)->tmp_head, &($$)->tmp_head);
+                       bt_list_splice(&($2)->tmp_head, &($$)->tmp_head);
                }
        |       STAR type_qualifier_list pointer
                {
                        $$ = make_node(scanner, NODE_POINTER);
                        $$->u.pointer.const_qualifier = 1;
-                       cds_list_splice(&($3)->tmp_head, &($$)->tmp_head);
+                       bt_list_splice(&($3)->tmp_head, &($$)->tmp_head);
                }
        ;
 
@@ -2381,7 +2381,7 @@ ctf_assignment_expression_list:
        |       ctf_assignment_expression_list ctf_assignment_expression SEMICOLON
                {
                        $$ = $1;
-                       cds_list_add_tail(&($2)->siblings, &($$)->tmp_head);
+                       bt_list_add_tail(&($2)->siblings, &($$)->tmp_head);
                }
        ;
 
@@ -2393,10 +2393,10 @@ ctf_assignment_expression:
                         * set_parent_node.
                         */
                        $$ = make_node(scanner, NODE_CTF_EXPRESSION);
-                       _cds_list_splice_tail(&($1)->tmp_head, &($$)->u.ctf_expression.left);
+                       _bt_list_splice_tail(&($1)->tmp_head, &($$)->u.ctf_expression.left);
                        if ($1->u.unary_expression.type != UNARY_STRING)
                                reparent_error(scanner, "ctf_assignment_expression left expects string");
-                       _cds_list_splice_tail(&($3)->tmp_head, &($$)->u.ctf_expression.right);
+                       _bt_list_splice_tail(&($3)->tmp_head, &($$)->u.ctf_expression.right);
                }
        |       unary_expression TYPEASSIGN declaration_specifiers      /* Only allow struct */
                {
@@ -2405,21 +2405,21 @@ ctf_assignment_expression:
                         * set_parent_node.
                         */
                        $$ = make_node(scanner, NODE_CTF_EXPRESSION);
-                       _cds_list_splice_tail(&($1)->tmp_head, &($$)->u.ctf_expression.left);
+                       _bt_list_splice_tail(&($1)->tmp_head, &($$)->u.ctf_expression.left);
                        if ($1->u.unary_expression.type != UNARY_STRING)
                                reparent_error(scanner, "ctf_assignment_expression left expects string");
-                       cds_list_add_tail(&($3)->siblings, &($$)->u.ctf_expression.right);
+                       bt_list_add_tail(&($3)->siblings, &($$)->u.ctf_expression.right);
                }
        |       declaration_specifiers TYPEDEF declaration_specifiers type_declarator_list
                {
                        struct ctf_node *list;
 
                        list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
-                       _cds_list_splice_tail(&($1)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
-                       _cds_list_splice_tail(&($3)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
+                       _bt_list_splice_tail(&($1)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
+                       _bt_list_splice_tail(&($3)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
                        $$ = make_node(scanner, NODE_TYPEDEF);
                        ($$)->u.struct_or_variant_declaration.type_specifier_list = list;
-                       _cds_list_splice_tail(&($4)->tmp_head, &($$)->u._typedef.type_declarators);
+                       _bt_list_splice_tail(&($4)->tmp_head, &($$)->u._typedef.type_declarators);
                }
        |       TYPEDEF declaration_specifiers type_declarator_list
                {
@@ -2428,18 +2428,18 @@ ctf_assignment_expression:
                        $$ = make_node(scanner, NODE_TYPEDEF);
                        list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
                        $$->u._typedef.type_specifier_list = list;
-                       _cds_list_splice_tail(&($2)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
-                       _cds_list_splice_tail(&($3)->tmp_head, &($$)->u._typedef.type_declarators);
+                       _bt_list_splice_tail(&($2)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
+                       _bt_list_splice_tail(&($3)->tmp_head, &($$)->u._typedef.type_declarators);
                }
        |       declaration_specifiers TYPEDEF type_declarator_list
                {
                        struct ctf_node *list;
 
                        list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
-                       _cds_list_splice_tail(&($1)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
+                       _bt_list_splice_tail(&($1)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
                        $$ = make_node(scanner, NODE_TYPEDEF);
                        ($$)->u.struct_or_variant_declaration.type_specifier_list = list;
-                       _cds_list_splice_tail(&($3)->tmp_head, &($$)->u._typedef.type_declarators);
+                       _bt_list_splice_tail(&($3)->tmp_head, &($$)->u._typedef.type_declarators);
                }
        |       TYPEALIAS declaration_specifiers abstract_declarator_list TYPEASSIGN alias_declaration_specifiers alias_abstract_declarator_list
                {
@@ -2451,12 +2451,12 @@ ctf_assignment_expression:
 
                        list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
                        $$->u.typealias.target->u.typealias_target.type_specifier_list = list;
-                       _cds_list_splice_tail(&($2)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
-                       _cds_list_splice_tail(&($3)->tmp_head, &($$)->u.typealias.target->u.typealias_target.type_declarators);
+                       _bt_list_splice_tail(&($2)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
+                       _bt_list_splice_tail(&($3)->tmp_head, &($$)->u.typealias.target->u.typealias_target.type_declarators);
 
                        list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
                        $$->u.typealias.alias->u.typealias_alias.type_specifier_list = list;
-                       _cds_list_splice_tail(&($5)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
-                       _cds_list_splice_tail(&($6)->tmp_head, &($$)->u.typealias.alias->u.typealias_alias.type_declarators);
+                       _bt_list_splice_tail(&($5)->u.type_specifier_list.head, &list->u.type_specifier_list.head);
+                       _bt_list_splice_tail(&($6)->tmp_head, &($$)->u.typealias.alias->u.typealias_alias.type_declarators);
                }
        ;
index f25efb9e5277cb2c78d12deebe49e238e81b1cdb..4de343027b522e788fbda44365f0082674d5114f 100644 (file)
@@ -20,7 +20,7 @@ struct ctf_scanner {
        struct ctf_ast *ast;
        struct ctf_scanner_scope root_scope;
        struct ctf_scanner_scope *cs;
-       struct cds_list_head allocated_strings;
+       struct bt_list_head allocated_strings;
 };
 
 struct ctf_scanner *ctf_scanner_alloc(FILE *input);
index 4f604d1cee2a8e610a84e7ae7e6fc767c15c3dac..bfb6031d39509d35ff235490fbdcf6d1bf1361c6 100644 (file)
@@ -36,8 +36,8 @@
 
 #define fprintf_dbg(fd, fmt, args...)  fprintf(fd, "%s: " fmt, __func__, ## args)
 
-#define _cds_list_first_entry(ptr, type, member)       \
-       cds_list_entry((ptr)->next, type, member)
+#define _bt_list_first_entry(ptr, type, member)        \
+       bt_list_entry((ptr)->next, type, member)
 
 int opt_clock_force_correlate;
 
@@ -55,14 +55,14 @@ int ctf_stream_visit(FILE *fd, int depth, struct ctf_node *node,
  * String returned must be freed by the caller using g_free.
  */
 static
-char *concatenate_unary_strings(struct cds_list_head *head)
+char *concatenate_unary_strings(struct bt_list_head *head)
 {
        struct ctf_node *node;
        GString *str;
        int i = 0;
 
        str = g_string_new("");
-       cds_list_for_each_entry(node, head, siblings) {
+       bt_list_for_each_entry(node, head, siblings) {
                char *src_string;
 
                assert(node->type == NODE_UNARY_EXPRESSION);
@@ -90,13 +90,13 @@ char *concatenate_unary_strings(struct cds_list_head *head)
 }
 
 static
-GQuark get_map_clock_name_value(struct cds_list_head *head)
+GQuark get_map_clock_name_value(struct bt_list_head *head)
 {
        struct ctf_node *node;
        const char *name = NULL;
        int i = 0;
 
-       cds_list_for_each_entry(node, head, siblings) {
+       bt_list_for_each_entry(node, head, siblings) {
                char *src_string;
 
                assert(node->type == NODE_UNARY_EXPRESSION);
@@ -134,12 +134,12 @@ GQuark get_map_clock_name_value(struct cds_list_head *head)
 }
 
 static
-int get_unary_unsigned(struct cds_list_head *head, uint64_t *value)
+int get_unary_unsigned(struct bt_list_head *head, uint64_t *value)
 {
        struct ctf_node *node;
        int i = 0;
 
-       cds_list_for_each_entry(node, head, siblings) {
+       bt_list_for_each_entry(node, head, siblings) {
                assert(node->type == NODE_UNARY_EXPRESSION);
                assert(node->u.unary_expression.type == UNARY_UNSIGNED_CONSTANT);
                assert(node->u.unary_expression.link == UNARY_LINK_UNKNOWN);
@@ -151,12 +151,12 @@ int get_unary_unsigned(struct cds_list_head *head, uint64_t *value)
 }
 
 static
-int get_unary_signed(struct cds_list_head *head, int64_t *value)
+int get_unary_signed(struct bt_list_head *head, int64_t *value)
 {
        struct ctf_node *node;
        int i = 0;
 
-       cds_list_for_each_entry(node, head, siblings) {
+       bt_list_for_each_entry(node, head, siblings) {
                assert(node->type == NODE_UNARY_EXPRESSION);
                assert(node->u.unary_expression.type == UNARY_UNSIGNED_CONSTANT
                        || node->u.unary_expression.type == UNARY_SIGNED_CONSTANT);
@@ -178,13 +178,13 @@ int get_unary_signed(struct cds_list_head *head, int64_t *value)
 }
 
 static
-int get_unary_uuid(struct cds_list_head *head, uuid_t *uuid)
+int get_unary_uuid(struct bt_list_head *head, uuid_t *uuid)
 {
        struct ctf_node *node;
        int i = 0;
        int ret = -1;
 
-       cds_list_for_each_entry(node, head, siblings) {
+       bt_list_for_each_entry(node, head, siblings) {
                const char *src_string;
 
                assert(node->type == NODE_UNARY_EXPRESSION);
@@ -313,7 +313,7 @@ int visit_type_specifier_list(FILE *fd, struct ctf_node *type_specifier_list, GS
        int alias_item_nr = 0;
        int ret;
 
-       cds_list_for_each_entry(iter, &type_specifier_list->u.type_specifier_list.head, siblings) {
+       bt_list_for_each_entry(iter, &type_specifier_list->u.type_specifier_list.head, siblings) {
                if (alias_item_nr != 0)
                        g_string_append(str, " ");
                alias_item_nr++;
@@ -341,7 +341,7 @@ GQuark create_typealias_identifier(FILE *fd, int depth,
                g_string_free(str, TRUE);
                return 0;
        }
-       cds_list_for_each_entry(iter, &node_type_declarator->u.type_declarator.pointers, siblings) {
+       bt_list_for_each_entry(iter, &node_type_declarator->u.type_declarator.pointers, siblings) {
                g_string_append(str, " *");
                if (iter->u.pointer.const_qualifier)
                        g_string_append(str, " const");
@@ -378,7 +378,7 @@ struct declaration *ctf_type_declarator_visit(FILE *fd, int depth,
        }
 
        if (!nested_declaration) {
-               if (node_type_declarator && !cds_list_empty(&node_type_declarator->u.type_declarator.pointers)) {
+               if (node_type_declarator && !bt_list_empty(&node_type_declarator->u.type_declarator.pointers)) {
                        GQuark alias_q;
 
                        /*
@@ -436,11 +436,11 @@ struct declaration *ctf_type_declarator_visit(FILE *fd, int depth,
                }
 
                /* create array/sequence, pass nested_declaration as child. */
-               if (cds_list_empty(&node_type_declarator->u.type_declarator.u.nested.length)) {
+               if (bt_list_empty(&node_type_declarator->u.type_declarator.u.nested.length)) {
                        fprintf(fd, "[error] %s: expecting length field reference or value.\n", __func__);
                        return NULL;
                }
-               first = _cds_list_first_entry(&node_type_declarator->u.type_declarator.u.nested.length, 
+               first = _bt_list_first_entry(&node_type_declarator->u.type_declarator.u.nested.length, 
                                struct ctf_node, siblings);
                assert(first->type == NODE_UNARY_EXPRESSION);
 
@@ -492,14 +492,14 @@ static
 int ctf_struct_type_declarators_visit(FILE *fd, int depth,
        struct declaration_struct *struct_declaration,
        struct ctf_node *type_specifier_list,
-       struct cds_list_head *type_declarators,
+       struct bt_list_head *type_declarators,
        struct declaration_scope *declaration_scope,
        struct ctf_trace *trace)
 {
        struct ctf_node *iter;
        GQuark field_name;
 
-       cds_list_for_each_entry(iter, type_declarators, siblings) {
+       bt_list_for_each_entry(iter, type_declarators, siblings) {
                struct declaration *field_declaration;
 
                field_declaration = ctf_type_declarator_visit(fd, depth,
@@ -529,14 +529,14 @@ static
 int ctf_variant_type_declarators_visit(FILE *fd, int depth,
        struct declaration_untagged_variant *untagged_variant_declaration,
        struct ctf_node *type_specifier_list,
-       struct cds_list_head *type_declarators,
+       struct bt_list_head *type_declarators,
        struct declaration_scope *declaration_scope,
        struct ctf_trace *trace)
 {
        struct ctf_node *iter;
        GQuark field_name;
 
-       cds_list_for_each_entry(iter, type_declarators, siblings) {
+       bt_list_for_each_entry(iter, type_declarators, siblings) {
                struct declaration *field_declaration;
 
                field_declaration = ctf_type_declarator_visit(fd, depth,
@@ -565,13 +565,13 @@ int ctf_variant_type_declarators_visit(FILE *fd, int depth,
 static
 int ctf_typedef_visit(FILE *fd, int depth, struct declaration_scope *scope,
                struct ctf_node *type_specifier_list,
-               struct cds_list_head *type_declarators,
+               struct bt_list_head *type_declarators,
                struct ctf_trace *trace)
 {
        struct ctf_node *iter;
        GQuark identifier;
 
-       cds_list_for_each_entry(iter, type_declarators, siblings) {
+       bt_list_for_each_entry(iter, type_declarators, siblings) {
                struct declaration *type_declaration;
                int ret;
        
@@ -618,10 +618,10 @@ int ctf_typealias_visit(FILE *fd, int depth, struct declaration_scope *scope,
         * Create target type declaration.
         */
 
-       if (cds_list_empty(&target->u.typealias_target.type_declarators))
+       if (bt_list_empty(&target->u.typealias_target.type_declarators))
                node = NULL;
        else
-               node = _cds_list_first_entry(&target->u.typealias_target.type_declarators,
+               node = _bt_list_first_entry(&target->u.typealias_target.type_declarators,
                                struct ctf_node, siblings);
        type_declaration = ctf_type_declarator_visit(fd, depth,
                target->u.typealias_target.type_specifier_list,
@@ -654,7 +654,7 @@ int ctf_typealias_visit(FILE *fd, int depth, struct declaration_scope *scope,
         * Create alias identifier.
         */
 
-       node = _cds_list_first_entry(&alias->u.typealias_alias.type_declarators,
+       node = _bt_list_first_entry(&alias->u.typealias_alias.type_declarators,
                                struct ctf_node, siblings);
        alias_q = create_typealias_identifier(fd, depth,
                        alias->u.typealias_alias.type_specifier_list, node);
@@ -759,8 +759,8 @@ int ctf_variant_declaration_list_visit(FILE *fd, int depth,
 
 static
 struct declaration *ctf_declaration_struct_visit(FILE *fd,
-       int depth, const char *name, struct cds_list_head *declaration_list,
-       int has_body, struct cds_list_head *min_align,
+       int depth, const char *name, struct bt_list_head *declaration_list,
+       int has_body, struct bt_list_head *min_align,
        struct declaration_scope *declaration_scope,
        struct ctf_trace *trace)
 {
@@ -792,7 +792,7 @@ struct declaration *ctf_declaration_struct_visit(FILE *fd,
                                return NULL;
                        }
                }
-               if (!cds_list_empty(min_align)) {
+               if (!bt_list_empty(min_align)) {
                        ret = get_unary_unsigned(min_align, &min_align_value);
                        if (ret) {
                                fprintf(fd, "[error] %s: unexpected unary expression for structure \"align\" attribute\n", __func__);
@@ -802,7 +802,7 @@ struct declaration *ctf_declaration_struct_visit(FILE *fd,
                }
                struct_declaration = struct_declaration_new(declaration_scope,
                                                            min_align_value);
-               cds_list_for_each_entry(iter, declaration_list, siblings) {
+               bt_list_for_each_entry(iter, declaration_list, siblings) {
                        ret = ctf_struct_declaration_list_visit(fd, depth + 1, iter,
                                struct_declaration, trace);
                        if (ret)
@@ -825,7 +825,7 @@ error:
 static
 struct declaration *ctf_declaration_variant_visit(FILE *fd,
        int depth, const char *name, const char *choice,
-       struct cds_list_head *declaration_list,
+       struct bt_list_head *declaration_list,
        int has_body, struct declaration_scope *declaration_scope,
        struct ctf_trace *trace)
 {
@@ -856,7 +856,7 @@ struct declaration *ctf_declaration_variant_visit(FILE *fd,
                        }
                }
                untagged_variant_declaration = untagged_variant_declaration_new(declaration_scope);
-               cds_list_for_each_entry(iter, declaration_list, siblings) {
+               bt_list_for_each_entry(iter, declaration_list, siblings) {
                        ret = ctf_variant_declaration_list_visit(fd, depth + 1, iter,
                                untagged_variant_declaration, trace);
                        if (ret)
@@ -900,7 +900,7 @@ int ctf_enumerator_list_visit(FILE *fd, int depth,
                int64_t start, end;
                int nr_vals = 0;
 
-               cds_list_for_each_entry(iter, &enumerator->u.enumerator.values, siblings) {
+               bt_list_for_each_entry(iter, &enumerator->u.enumerator.values, siblings) {
                        int64_t *target;
 
                        assert(iter->type == NODE_UNARY_EXPRESSION);
@@ -933,7 +933,7 @@ int ctf_enumerator_list_visit(FILE *fd, int depth,
                uint64_t start, end;
                int nr_vals = 0;
 
-               cds_list_for_each_entry(iter, &enumerator->u.enumerator.values, siblings) {
+               bt_list_for_each_entry(iter, &enumerator->u.enumerator.values, siblings) {
                        uint64_t *target;
 
                        assert(iter->type == NODE_UNARY_EXPRESSION);
@@ -974,7 +974,7 @@ static
 struct declaration *ctf_declaration_enum_visit(FILE *fd, int depth,
                        const char *name,
                        struct ctf_node *container_type,
-                       struct cds_list_head *enumerator_list,
+                       struct bt_list_head *enumerator_list,
                        int has_body,
                        struct declaration_scope *declaration_scope,
                        struct ctf_trace *trace)
@@ -1033,7 +1033,7 @@ struct declaration *ctf_declaration_enum_visit(FILE *fd, int depth,
                integer_declaration = container_of(declaration, struct declaration_integer, p);
                enum_declaration = enum_declaration_new(integer_declaration);
                declaration_unref(&integer_declaration->p);     /* leave ref to enum */
-               cds_list_for_each_entry(iter, enumerator_list, siblings) {
+               bt_list_for_each_entry(iter, enumerator_list, siblings) {
                        ret = ctf_enumerator_list_visit(fd, depth + 1, iter, enum_declaration);
                        if (ret)
                                goto error;
@@ -1169,7 +1169,7 @@ int get_byte_order(FILE *fd, int depth, struct ctf_node *unary_expression,
 
 static
 struct declaration *ctf_declaration_integer_visit(FILE *fd, int depth,
-               struct cds_list_head *expressions,
+               struct bt_list_head *expressions,
                struct ctf_trace *trace)
 {
        struct ctf_node *expression;
@@ -1182,11 +1182,11 @@ struct declaration *ctf_declaration_integer_visit(FILE *fd, int depth,
        struct ctf_clock *clock = NULL;
        struct declaration_integer *integer_declaration;
 
-       cds_list_for_each_entry(expression, expressions, siblings) {
+       bt_list_for_each_entry(expression, expressions, siblings) {
                struct ctf_node *left, *right;
 
-               left = _cds_list_first_entry(&expression->u.ctf_expression.left, struct ctf_node, siblings);
-               right = _cds_list_first_entry(&expression->u.ctf_expression.right, struct ctf_node, siblings);
+               left = _bt_list_first_entry(&expression->u.ctf_expression.left, struct ctf_node, siblings);
+               right = _bt_list_first_entry(&expression->u.ctf_expression.right, struct ctf_node, siblings);
                assert(left->u.unary_expression.type == UNARY_STRING);
                if (!strcmp(left->u.unary_expression.u.string, "signed")) {
                        signedness = get_boolean(fd, depth, right);
@@ -1355,7 +1355,7 @@ struct declaration *ctf_declaration_integer_visit(FILE *fd, int depth,
 
 static
 struct declaration *ctf_declaration_floating_point_visit(FILE *fd, int depth,
-               struct cds_list_head *expressions,
+               struct bt_list_head *expressions,
                struct ctf_trace *trace)
 {
        struct ctf_node *expression;
@@ -1364,11 +1364,11 @@ struct declaration *ctf_declaration_floating_point_visit(FILE *fd, int depth,
        int has_alignment = 0, has_exp_dig = 0, has_mant_dig = 0;
        struct declaration_float *float_declaration;
 
-       cds_list_for_each_entry(expression, expressions, siblings) {
+       bt_list_for_each_entry(expression, expressions, siblings) {
                struct ctf_node *left, *right;
 
-               left = _cds_list_first_entry(&expression->u.ctf_expression.left, struct ctf_node, siblings);
-               right = _cds_list_first_entry(&expression->u.ctf_expression.right, struct ctf_node, siblings);
+               left = _bt_list_first_entry(&expression->u.ctf_expression.left, struct ctf_node, siblings);
+               right = _bt_list_first_entry(&expression->u.ctf_expression.right, struct ctf_node, siblings);
                assert(left->u.unary_expression.type == UNARY_STRING);
                if (!strcmp(left->u.unary_expression.u.string, "byte_order")) {
                        byte_order = get_byte_order(fd, depth, right, trace);
@@ -1434,7 +1434,7 @@ struct declaration *ctf_declaration_floating_point_visit(FILE *fd, int depth,
 
 static
 struct declaration *ctf_declaration_string_visit(FILE *fd, int depth,
-               struct cds_list_head *expressions,
+               struct bt_list_head *expressions,
                struct ctf_trace *trace)
 {
        struct ctf_node *expression;
@@ -1442,11 +1442,11 @@ struct declaration *ctf_declaration_string_visit(FILE *fd, int depth,
        enum ctf_string_encoding encoding = CTF_STRING_UTF8;
        struct declaration_string *string_declaration;
 
-       cds_list_for_each_entry(expression, expressions, siblings) {
+       bt_list_for_each_entry(expression, expressions, siblings) {
                struct ctf_node *left, *right;
 
-               left = _cds_list_first_entry(&expression->u.ctf_expression.left, struct ctf_node, siblings);
-               right = _cds_list_first_entry(&expression->u.ctf_expression.right, struct ctf_node, siblings);
+               left = _bt_list_first_entry(&expression->u.ctf_expression.left, struct ctf_node, siblings);
+               right = _bt_list_first_entry(&expression->u.ctf_expression.right, struct ctf_node, siblings);
                assert(left->u.unary_expression.type == UNARY_STRING);
                if (!strcmp(left->u.unary_expression.u.string, "encoding")) {
                        if (right->u.unary_expression.type != UNARY_STRING) {
@@ -1479,7 +1479,7 @@ struct declaration *ctf_type_specifier_list_visit(FILE *fd,
 
        assert(type_specifier_list->type == NODE_TYPE_SPECIFIER_LIST);
 
-       first = _cds_list_first_entry(&type_specifier_list->u.type_specifier_list.head, struct ctf_node, siblings);
+       first = _bt_list_first_entry(&type_specifier_list->u.type_specifier_list.head, struct ctf_node, siblings);
 
        assert(first->type == NODE_TYPE_SPECIFIER);
 
@@ -1628,7 +1628,7 @@ int ctf_event_declaration_visit(FILE *fd, int depth, struct ctf_node *node, stru
                                goto error;
                        }
                        declaration = ctf_type_specifier_list_visit(fd, depth,
-                                       _cds_list_first_entry(&node->u.ctf_expression.right,
+                                       _bt_list_first_entry(&node->u.ctf_expression.right,
                                                struct ctf_node, siblings),
                                        event->declaration_scope, trace);
                        if (!declaration) {
@@ -1649,7 +1649,7 @@ int ctf_event_declaration_visit(FILE *fd, int depth, struct ctf_node *node, stru
                                goto error;
                        }
                        declaration = ctf_type_specifier_list_visit(fd, depth,
-                                       _cds_list_first_entry(&node->u.ctf_expression.right,
+                                       _bt_list_first_entry(&node->u.ctf_expression.right,
                                                struct ctf_node, siblings),
                                        event->declaration_scope, trace);
                        if (!declaration) {
@@ -1704,7 +1704,7 @@ int ctf_event_visit(FILE *fd, int depth, struct ctf_node *node,
        event = g_new0(struct ctf_event, 1);
        event->declaration_scope = new_declaration_scope(parent_declaration_scope);
        event->loglevel = -1;
-       cds_list_for_each_entry(iter, &node->u.event.declaration_list, siblings) {
+       bt_list_for_each_entry(iter, &node->u.event.declaration_list, siblings) {
                ret = ctf_event_declaration_visit(fd, depth + 1, iter, event, trace);
                if (ret)
                        goto error;
@@ -1808,7 +1808,7 @@ int ctf_stream_declaration_visit(FILE *fd, int depth, struct ctf_node *node, str
                                goto error;
                        }
                        declaration = ctf_type_specifier_list_visit(fd, depth,
-                                       _cds_list_first_entry(&node->u.ctf_expression.right,
+                                       _bt_list_first_entry(&node->u.ctf_expression.right,
                                                struct ctf_node, siblings),
                                        stream->declaration_scope, trace);
                        if (!declaration) {
@@ -1829,7 +1829,7 @@ int ctf_stream_declaration_visit(FILE *fd, int depth, struct ctf_node *node, str
                                goto error;
                        }
                        declaration = ctf_type_specifier_list_visit(fd, depth,
-                                       _cds_list_first_entry(&node->u.ctf_expression.right,
+                                       _bt_list_first_entry(&node->u.ctf_expression.right,
                                                struct ctf_node, siblings),
                                        stream->declaration_scope, trace);
                        if (!declaration) {
@@ -1850,7 +1850,7 @@ int ctf_stream_declaration_visit(FILE *fd, int depth, struct ctf_node *node, str
                                goto error;
                        }
                        declaration = ctf_type_specifier_list_visit(fd, depth,
-                                       _cds_list_first_entry(&node->u.ctf_expression.right,
+                                       _bt_list_first_entry(&node->u.ctf_expression.right,
                                                struct ctf_node, siblings),
                                        stream->declaration_scope, trace);
                        if (!declaration) {
@@ -1893,7 +1893,7 @@ int ctf_stream_visit(FILE *fd, int depth, struct ctf_node *node,
        stream->event_quark_to_id = g_hash_table_new(g_direct_hash, g_direct_equal);
        stream->streams = g_ptr_array_new();
        if (node) {
-               cds_list_for_each_entry(iter, &node->u.stream.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u.stream.declaration_list, siblings) {
                        ret = ctf_stream_declaration_visit(fd, depth + 1, iter, stream, trace);
                        if (ret)
                                goto error;
@@ -2014,7 +2014,7 @@ int ctf_trace_declaration_visit(FILE *fd, int depth, struct ctf_node *node, stru
                        struct ctf_node *right;
                        int byte_order;
 
-                       right = _cds_list_first_entry(&node->u.ctf_expression.right, struct ctf_node, siblings);
+                       right = _bt_list_first_entry(&node->u.ctf_expression.right, struct ctf_node, siblings);
                        byte_order = get_trace_byte_order(fd, depth, right);
                        if (byte_order < 0)
                                return -EINVAL;
@@ -2048,7 +2048,7 @@ int ctf_trace_declaration_visit(FILE *fd, int depth, struct ctf_node *node, stru
                                goto error;
                        }
                        declaration = ctf_type_specifier_list_visit(fd, depth,
-                                       _cds_list_first_entry(&node->u.ctf_expression.right,
+                                       _bt_list_first_entry(&node->u.ctf_expression.right,
                                                struct ctf_node, siblings),
                                        trace->declaration_scope, trace);
                        if (!declaration) {
@@ -2086,7 +2086,7 @@ int ctf_trace_visit(FILE *fd, int depth, struct ctf_node *node, struct ctf_trace
                return -EEXIST;
        trace->declaration_scope = new_declaration_scope(trace->root_declaration_scope);
        trace->streams = g_ptr_array_new();
-       cds_list_for_each_entry(iter, &node->u.trace.declaration_list, siblings) {
+       bt_list_for_each_entry(iter, &node->u.trace.declaration_list, siblings) {
                ret = ctf_trace_declaration_visit(fd, depth + 1, iter, trace);
                if (ret)
                        goto error;
@@ -2244,7 +2244,7 @@ int ctf_clock_declaration_visit(FILE *fd, int depth, struct ctf_node *node,
                } else if (!strcmp(left, "absolute")) {
                        struct ctf_node *right;
 
-                       right = _cds_list_first_entry(&node->u.ctf_expression.right, struct ctf_node, siblings);
+                       right = _bt_list_first_entry(&node->u.ctf_expression.right, struct ctf_node, siblings);
                        ret = get_boolean(fd, depth, right);
                        if (ret < 0) {
                                fprintf(fd, "[error] %s: unexpected \"absolute\" right member\n", __func__);
@@ -2278,7 +2278,7 @@ int ctf_clock_visit(FILE *fd, int depth, struct ctf_node *node, struct ctf_trace
        clock = g_new0(struct ctf_clock, 1);
        /* Default clock frequency is set to 1000000000 */
        clock->freq = 1000000000ULL;
-       cds_list_for_each_entry(iter, &node->u.clock.declaration_list, siblings) {
+       bt_list_for_each_entry(iter, &node->u.clock.declaration_list, siblings) {
                ret = ctf_clock_declaration_visit(fd, depth + 1, iter, clock, trace);
                if (ret)
                        goto error;
@@ -2481,7 +2481,7 @@ int ctf_env_visit(FILE *fd, int depth, struct ctf_node *node, struct ctf_trace *
        trace->env.sysname[0] = '\0';
        trace->env.release[0] = '\0';
        trace->env.version[0] = '\0';
-       cds_list_for_each_entry(iter, &node->u.env.declaration_list, siblings) {
+       bt_list_for_each_entry(iter, &node->u.env.declaration_list, siblings) {
                ret = ctf_env_declaration_visit(fd, depth + 1, iter, trace);
                if (ret)
                        goto error;
@@ -2558,10 +2558,10 @@ retry:
                         * declarations need to query clock hash table,
                         * so clock need to be treated first.
                         */
-                       if (cds_list_empty(&node->u.root.clock)) {
+                       if (bt_list_empty(&node->u.root.clock)) {
                                ctf_clock_default(fd, depth + 1, trace);
                        } else {
-                               cds_list_for_each_entry(iter, &node->u.root.clock, siblings) {
+                               bt_list_for_each_entry(iter, &node->u.root.clock, siblings) {
                                        ret = ctf_clock_visit(fd, depth + 1, iter,
                                                              trace);
                                        if (ret) {
@@ -2572,7 +2572,7 @@ retry:
                        }
                        env_clock_done = 1;
                }
-               cds_list_for_each_entry(iter, &node->u.root.declaration_list,
+               bt_list_for_each_entry(iter, &node->u.root.declaration_list,
                                        siblings) {
                        ret = ctf_root_declaration_visit(fd, depth + 1, iter, trace);
                        if (ret) {
@@ -2580,7 +2580,7 @@ retry:
                                goto error;
                        }
                }
-               cds_list_for_each_entry(iter, &node->u.root.trace, siblings) {
+               bt_list_for_each_entry(iter, &node->u.root.trace, siblings) {
                        ret = ctf_trace_visit(fd, depth + 1, iter, trace);
                        if (ret == -EINTR) {
                                free_declaration_scope(trace->root_declaration_scope);
@@ -2601,14 +2601,14 @@ retry:
                        ret = -EINVAL;
                        goto error;
                }
-               cds_list_for_each_entry(iter, &node->u.root.env, siblings) {
+               bt_list_for_each_entry(iter, &node->u.root.env, siblings) {
                        ret = ctf_env_visit(fd, depth + 1, iter, trace);
                        if (ret) {
                                fprintf(fd, "[error] %s: env declaration error\n", __func__);
                                goto error;
                        }
                }
-               cds_list_for_each_entry(iter, &node->u.root.stream, siblings) {
+               bt_list_for_each_entry(iter, &node->u.root.stream, siblings) {
                        ret = ctf_stream_visit(fd, depth + 1, iter,
                                               trace->root_declaration_scope, trace);
                        if (ret) {
@@ -2616,7 +2616,7 @@ retry:
                                goto error;
                        }
                }
-               cds_list_for_each_entry(iter, &node->u.root.event, siblings) {
+               bt_list_for_each_entry(iter, &node->u.root.event, siblings) {
                        ret = ctf_event_visit(fd, depth + 1, iter,
                                              trace->root_declaration_scope, trace);
                        if (ret) {
index 821083ebd1e77bff1a607f7f7cf1d21dc1ac926c..766ce42f1aa16930deecddbe1c1d81cb110595ea 100644 (file)
@@ -128,7 +128,7 @@ int ctf_visitor_type_declarator(FILE *fd, int depth, struct ctf_node *node)
 
        depth++;
 
-       cds_list_for_each_entry(iter, &node->u.type_declarator.pointers,
+       bt_list_for_each_entry(iter, &node->u.type_declarator.pointers,
                                siblings) {
                iter->parent = node;
                ret = ctf_visitor_parent_links(fd, depth + 1, iter);
@@ -148,7 +148,7 @@ int ctf_visitor_type_declarator(FILE *fd, int depth, struct ctf_node *node)
                                return ret;
                }
                if (!node->u.type_declarator.u.nested.abstract_array) {
-                       cds_list_for_each_entry(iter, &node->u.type_declarator.u.nested.length,
+                       bt_list_for_each_entry(iter, &node->u.type_declarator.u.nested.length,
                                                siblings) {
                                iter->parent = node;
                                ret = ctf_visitor_parent_links(fd, depth + 1, iter);
@@ -181,31 +181,31 @@ int ctf_visitor_parent_links(FILE *fd, int depth, struct ctf_node *node)
 
        switch (node->type) {
        case NODE_ROOT:
-               cds_list_for_each_entry(iter, &node->u.root.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u.root.declaration_list, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
                                return ret;
                }
-               cds_list_for_each_entry(iter, &node->u.root.trace, siblings) {
+               bt_list_for_each_entry(iter, &node->u.root.trace, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
                                return ret;
                }
-               cds_list_for_each_entry(iter, &node->u.root.stream, siblings) {
+               bt_list_for_each_entry(iter, &node->u.root.stream, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
                                return ret;
                }
-               cds_list_for_each_entry(iter, &node->u.root.event, siblings) {
+               bt_list_for_each_entry(iter, &node->u.root.event, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
                                return ret;
                }
-               cds_list_for_each_entry(iter, &node->u.root.clock, siblings) {
+               bt_list_for_each_entry(iter, &node->u.root.clock, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
@@ -214,7 +214,7 @@ int ctf_visitor_parent_links(FILE *fd, int depth, struct ctf_node *node)
                break;
 
        case NODE_EVENT:
-               cds_list_for_each_entry(iter, &node->u.event.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u.event.declaration_list, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
@@ -222,7 +222,7 @@ int ctf_visitor_parent_links(FILE *fd, int depth, struct ctf_node *node)
                }
                break;
        case NODE_STREAM:
-               cds_list_for_each_entry(iter, &node->u.stream.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u.stream.declaration_list, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
@@ -230,7 +230,7 @@ int ctf_visitor_parent_links(FILE *fd, int depth, struct ctf_node *node)
                }
                break;
        case NODE_ENV:
-               cds_list_for_each_entry(iter, &node->u.env.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u.env.declaration_list, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
@@ -238,7 +238,7 @@ int ctf_visitor_parent_links(FILE *fd, int depth, struct ctf_node *node)
                }
                break;
        case NODE_TRACE:
-               cds_list_for_each_entry(iter, &node->u.trace.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u.trace.declaration_list, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
@@ -246,7 +246,7 @@ int ctf_visitor_parent_links(FILE *fd, int depth, struct ctf_node *node)
                }
                break;
        case NODE_CLOCK:
-               cds_list_for_each_entry(iter, &node->u.clock.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u.clock.declaration_list, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
@@ -256,13 +256,13 @@ int ctf_visitor_parent_links(FILE *fd, int depth, struct ctf_node *node)
 
        case NODE_CTF_EXPRESSION:
                depth++;
-               cds_list_for_each_entry(iter, &node->u.ctf_expression.left, siblings) {
+               bt_list_for_each_entry(iter, &node->u.ctf_expression.left, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
                                return ret;
                }
-               cds_list_for_each_entry(iter, &node->u.ctf_expression.right, siblings) {
+               bt_list_for_each_entry(iter, &node->u.ctf_expression.right, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
@@ -279,7 +279,7 @@ int ctf_visitor_parent_links(FILE *fd, int depth, struct ctf_node *node)
                ret = ctf_visitor_parent_links(fd, depth + 1, node->u._typedef.type_specifier_list);
                if (ret)
                        return ret;
-               cds_list_for_each_entry(iter, &node->u._typedef.type_declarators, siblings) {
+               bt_list_for_each_entry(iter, &node->u._typedef.type_declarators, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
@@ -293,7 +293,7 @@ int ctf_visitor_parent_links(FILE *fd, int depth, struct ctf_node *node)
                ret = ctf_visitor_parent_links(fd, depth + 1, node->u.typealias_target.type_specifier_list);
                if (ret)
                        return ret;
-               cds_list_for_each_entry(iter, &node->u.typealias_target.type_declarators, siblings) {
+               bt_list_for_each_entry(iter, &node->u.typealias_target.type_declarators, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
@@ -307,7 +307,7 @@ int ctf_visitor_parent_links(FILE *fd, int depth, struct ctf_node *node)
                ret = ctf_visitor_parent_links(fd, depth + 1, node->u.typealias_alias.type_specifier_list);
                if (ret)
                        return ret;
-               cds_list_for_each_entry(iter, &node->u.typealias_alias.type_declarators, siblings) {
+               bt_list_for_each_entry(iter, &node->u.typealias_alias.type_declarators, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
@@ -327,7 +327,7 @@ int ctf_visitor_parent_links(FILE *fd, int depth, struct ctf_node *node)
                break;
 
        case NODE_TYPE_SPECIFIER_LIST:
-               cds_list_for_each_entry(iter, &node->u.type_specifier_list.head, siblings) {
+               bt_list_for_each_entry(iter, &node->u.type_specifier_list.head, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
@@ -349,7 +349,7 @@ int ctf_visitor_parent_links(FILE *fd, int depth, struct ctf_node *node)
                break;
 
        case NODE_FLOATING_POINT:
-               cds_list_for_each_entry(iter, &node->u.floating_point.expressions, siblings) {
+               bt_list_for_each_entry(iter, &node->u.floating_point.expressions, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
@@ -357,7 +357,7 @@ int ctf_visitor_parent_links(FILE *fd, int depth, struct ctf_node *node)
                }
                break;
        case NODE_INTEGER:
-               cds_list_for_each_entry(iter, &node->u.integer.expressions, siblings) {
+               bt_list_for_each_entry(iter, &node->u.integer.expressions, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
@@ -365,7 +365,7 @@ int ctf_visitor_parent_links(FILE *fd, int depth, struct ctf_node *node)
                }
                break;
        case NODE_STRING:
-               cds_list_for_each_entry(iter, &node->u.string.expressions, siblings) {
+               bt_list_for_each_entry(iter, &node->u.string.expressions, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
@@ -373,7 +373,7 @@ int ctf_visitor_parent_links(FILE *fd, int depth, struct ctf_node *node)
                }
                break;
        case NODE_ENUMERATOR:
-               cds_list_for_each_entry(iter, &node->u.enumerator.values, siblings) {
+               bt_list_for_each_entry(iter, &node->u.enumerator.values, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
@@ -388,7 +388,7 @@ int ctf_visitor_parent_links(FILE *fd, int depth, struct ctf_node *node)
                                return ret;
                }
 
-               cds_list_for_each_entry(iter, &node->u._enum.enumerator_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u._enum.enumerator_list, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
@@ -402,7 +402,7 @@ int ctf_visitor_parent_links(FILE *fd, int depth, struct ctf_node *node)
                        node->u.struct_or_variant_declaration.type_specifier_list);
                if (ret)
                        return ret;
-               cds_list_for_each_entry(iter, &node->u.struct_or_variant_declaration.type_declarators, siblings) {
+               bt_list_for_each_entry(iter, &node->u.struct_or_variant_declaration.type_declarators, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
@@ -410,7 +410,7 @@ int ctf_visitor_parent_links(FILE *fd, int depth, struct ctf_node *node)
                }
                break;
        case NODE_VARIANT:
-               cds_list_for_each_entry(iter, &node->u.variant.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u.variant.declaration_list, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
@@ -418,13 +418,13 @@ int ctf_visitor_parent_links(FILE *fd, int depth, struct ctf_node *node)
                }
                break;
        case NODE_STRUCT:
-               cds_list_for_each_entry(iter, &node->u._struct.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u._struct.declaration_list, siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
                        if (ret)
                                return ret;
                }
-               cds_list_for_each_entry(iter, &node->u._struct.min_align,
+               bt_list_for_each_entry(iter, &node->u._struct.min_align,
                                        siblings) {
                        iter->parent = node;
                        ret = ctf_visitor_parent_links(fd, depth + 1, iter);
index 5a5de793b7417abd00bef0b1fec8590875f5bb51..3db7fd7751eaa29672de85c317db11384b5ac030 100644 (file)
@@ -30,8 +30,8 @@
 #include "ctf-parser.h"
 #include "ctf-ast.h"
 
-#define _cds_list_first_entry(ptr, type, member)       \
-       cds_list_entry((ptr)->next, type, member)
+#define _bt_list_first_entry(ptr, type, member)        \
+       bt_list_entry((ptr)->next, type, member)
 
 #define fprintf_dbg(fd, fmt, args...)  fprintf(fd, "%s: " fmt, __func__, ## args)
 
@@ -47,7 +47,7 @@ int ctf_visitor_unary_expression(FILE *fd, int depth, struct ctf_node *node)
        switch (node->parent->type) {
        case NODE_CTF_EXPRESSION:
                is_ctf_exp = 1;
-               cds_list_for_each_entry(iter, &node->parent->u.ctf_expression.left,
+               bt_list_for_each_entry(iter, &node->parent->u.ctf_expression.left,
                                        siblings) {
                        if (iter == node) {
                                is_ctf_exp_left = 1;
@@ -129,7 +129,7 @@ int ctf_visitor_unary_expression(FILE *fd, int depth, struct ctf_node *node)
        switch (node->u.unary_expression.link) {
        case UNARY_LINK_UNKNOWN:
                /* We don't allow empty link except on the first node of the list */
-               if (is_ctf_exp && _cds_list_first_entry(is_ctf_exp_left ?
+               if (is_ctf_exp && _bt_list_first_entry(is_ctf_exp_left ?
                                          &node->parent->u.ctf_expression.left :
                                          &node->parent->u.ctf_expression.right,
                                          struct ctf_node,
@@ -154,7 +154,7 @@ int ctf_visitor_unary_expression(FILE *fd, int depth, struct ctf_node *node)
                        goto errperm;
                }
                /* We don't allow link on the first node of the list */
-               if (is_ctf_exp && _cds_list_first_entry(is_ctf_exp_left ?
+               if (is_ctf_exp && _bt_list_first_entry(is_ctf_exp_left ?
                                          &node->parent->u.ctf_expression.left :
                                          &node->parent->u.ctf_expression.right,
                                          struct ctf_node,
@@ -170,7 +170,7 @@ int ctf_visitor_unary_expression(FILE *fd, int depth, struct ctf_node *node)
                        goto errperm;
                }
                /* We don't allow link on the first node of the list */
-               if (_cds_list_first_entry(&node->parent->u.enumerator.values,
+               if (_bt_list_first_entry(&node->parent->u.enumerator.values,
                                          struct ctf_node,
                                          siblings) == node) {
                        fprintf(fd, "[error]: semantic error (link \"...\" is not allowed on the first node of the unary expression list)\n");
@@ -288,7 +288,7 @@ int ctf_visitor_type_declarator(FILE *fd, int depth, struct ctf_node *node)
                /*
                 * A nested type declarator is not allowed to contain pointers.
                 */
-               if (!cds_list_empty(&node->u.type_declarator.pointers))
+               if (!bt_list_empty(&node->u.type_declarator.pointers))
                        goto errperm;
                break;                  /* OK */
        case NODE_TYPEALIAS_TARGET:
@@ -307,7 +307,7 @@ int ctf_visitor_type_declarator(FILE *fd, int depth, struct ctf_node *node)
                 */
                if (node->u.type_declarator.type == TYPEDEC_NESTED)
                        goto errperm;
-               cds_list_for_each_entry(iter, &node->parent->u.typealias_alias.type_specifier_list->u.type_specifier_list.head,
+               bt_list_for_each_entry(iter, &node->parent->u.typealias_alias.type_specifier_list->u.type_specifier_list.head,
                                        siblings) {
                        switch (iter->u.type_specifier.type) {
                        case TYPESPEC_FLOATING_POINT:
@@ -316,7 +316,7 @@ int ctf_visitor_type_declarator(FILE *fd, int depth, struct ctf_node *node)
                        case TYPESPEC_STRUCT:
                        case TYPESPEC_VARIANT:
                        case TYPESPEC_ENUM:
-                               if (cds_list_empty(&node->u.type_declarator.pointers))
+                               if (bt_list_empty(&node->u.type_declarator.pointers))
                                        goto errperm;
                                break;
                        default:
@@ -353,7 +353,7 @@ int ctf_visitor_type_declarator(FILE *fd, int depth, struct ctf_node *node)
                goto errinval;
        }
 
-       cds_list_for_each_entry(iter, &node->u.type_declarator.pointers,
+       bt_list_for_each_entry(iter, &node->u.type_declarator.pointers,
                                siblings) {
                ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                if (ret)
@@ -372,7 +372,7 @@ int ctf_visitor_type_declarator(FILE *fd, int depth, struct ctf_node *node)
                                return ret;
                }
                if (!node->u.type_declarator.u.nested.abstract_array) {
-                       cds_list_for_each_entry(iter, &node->u.type_declarator.u.nested.length,
+                       bt_list_for_each_entry(iter, &node->u.type_declarator.u.nested.length,
                                                siblings) {
                                if (iter->type != NODE_UNARY_EXPRESSION) {
                                        fprintf(fd, "[error] %s: expecting unary expression as length\n", __func__);
@@ -424,22 +424,22 @@ int _ctf_visitor_semantic_check(FILE *fd, int depth, struct ctf_node *node)
 
        switch (node->type) {
        case NODE_ROOT:
-               cds_list_for_each_entry(iter, &node->u.root.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u.root.declaration_list, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
                }
-               cds_list_for_each_entry(iter, &node->u.root.trace, siblings) {
+               bt_list_for_each_entry(iter, &node->u.root.trace, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
                }
-               cds_list_for_each_entry(iter, &node->u.root.stream, siblings) {
+               bt_list_for_each_entry(iter, &node->u.root.stream, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
                }
-               cds_list_for_each_entry(iter, &node->u.root.event, siblings) {
+               bt_list_for_each_entry(iter, &node->u.root.event, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -454,7 +454,7 @@ int _ctf_visitor_semantic_check(FILE *fd, int depth, struct ctf_node *node)
                        goto errinval;
                }
 
-               cds_list_for_each_entry(iter, &node->u.event.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u.event.declaration_list, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -468,7 +468,7 @@ int _ctf_visitor_semantic_check(FILE *fd, int depth, struct ctf_node *node)
                        goto errinval;
                }
 
-               cds_list_for_each_entry(iter, &node->u.stream.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u.stream.declaration_list, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -482,7 +482,7 @@ int _ctf_visitor_semantic_check(FILE *fd, int depth, struct ctf_node *node)
                        goto errinval;
                }
 
-               cds_list_for_each_entry(iter, &node->u.env.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u.env.declaration_list, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -496,7 +496,7 @@ int _ctf_visitor_semantic_check(FILE *fd, int depth, struct ctf_node *node)
                        goto errinval;
                }
 
-               cds_list_for_each_entry(iter, &node->u.trace.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u.trace.declaration_list, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -510,7 +510,7 @@ int _ctf_visitor_semantic_check(FILE *fd, int depth, struct ctf_node *node)
                        goto errinval;
                }
 
-               cds_list_for_each_entry(iter, &node->u.clock.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u.clock.declaration_list, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -551,12 +551,12 @@ int _ctf_visitor_semantic_check(FILE *fd, int depth, struct ctf_node *node)
                }
 
                depth++;
-               cds_list_for_each_entry(iter, &node->u.ctf_expression.left, siblings) {
+               bt_list_for_each_entry(iter, &node->u.ctf_expression.left, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
                }
-               cds_list_for_each_entry(iter, &node->u.ctf_expression.right, siblings) {
+               bt_list_for_each_entry(iter, &node->u.ctf_expression.right, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -603,7 +603,7 @@ int _ctf_visitor_semantic_check(FILE *fd, int depth, struct ctf_node *node)
                        node->u._typedef.type_specifier_list);
                if (ret)
                        return ret;
-               cds_list_for_each_entry(iter, &node->u._typedef.type_declarators, siblings) {
+               bt_list_for_each_entry(iter, &node->u._typedef.type_declarators, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -627,7 +627,7 @@ int _ctf_visitor_semantic_check(FILE *fd, int depth, struct ctf_node *node)
                if (ret)
                        return ret;
                nr_declarators = 0;
-               cds_list_for_each_entry(iter, &node->u.typealias_target.type_declarators, siblings) {
+               bt_list_for_each_entry(iter, &node->u.typealias_target.type_declarators, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -658,7 +658,7 @@ int _ctf_visitor_semantic_check(FILE *fd, int depth, struct ctf_node *node)
                if (ret)
                        return ret;
                nr_declarators = 0;
-               cds_list_for_each_entry(iter, &node->u.typealias_alias.type_declarators, siblings) {
+               bt_list_for_each_entry(iter, &node->u.typealias_alias.type_declarators, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -746,7 +746,7 @@ int _ctf_visitor_semantic_check(FILE *fd, int depth, struct ctf_node *node)
                case NODE_UNARY_EXPRESSION:
                        goto errperm;
                }
-               cds_list_for_each_entry(iter, &node->u.floating_point.expressions, siblings) {
+               bt_list_for_each_entry(iter, &node->u.floating_point.expressions, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -761,7 +761,7 @@ int _ctf_visitor_semantic_check(FILE *fd, int depth, struct ctf_node *node)
 
                }
 
-               cds_list_for_each_entry(iter, &node->u.integer.expressions, siblings) {
+               bt_list_for_each_entry(iter, &node->u.integer.expressions, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -778,7 +778,7 @@ int _ctf_visitor_semantic_check(FILE *fd, int depth, struct ctf_node *node)
                        goto errperm;
                }
 
-               cds_list_for_each_entry(iter, &node->u.string.expressions, siblings) {
+               bt_list_for_each_entry(iter, &node->u.string.expressions, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -799,7 +799,7 @@ int _ctf_visitor_semantic_check(FILE *fd, int depth, struct ctf_node *node)
                {
                        int count = 0;
 
-                       cds_list_for_each_entry(iter, &node->u.enumerator.values,
+                       bt_list_for_each_entry(iter, &node->u.enumerator.values,
                                                siblings) {
                                switch (count++) {
                                case 0: if (iter->type != NODE_UNARY_EXPRESSION
@@ -824,7 +824,7 @@ int _ctf_visitor_semantic_check(FILE *fd, int depth, struct ctf_node *node)
                        }
                }
 
-               cds_list_for_each_entry(iter, &node->u.enumerator.values, siblings) {
+               bt_list_for_each_entry(iter, &node->u.enumerator.values, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -846,7 +846,7 @@ int _ctf_visitor_semantic_check(FILE *fd, int depth, struct ctf_node *node)
                if (ret)
                        return ret;
 
-               cds_list_for_each_entry(iter, &node->u._enum.enumerator_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u._enum.enumerator_list, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -865,7 +865,7 @@ int _ctf_visitor_semantic_check(FILE *fd, int depth, struct ctf_node *node)
                        node->u.struct_or_variant_declaration.type_specifier_list);
                if (ret)
                        return ret;
-               cds_list_for_each_entry(iter, &node->u.struct_or_variant_declaration.type_declarators, siblings) {
+               bt_list_for_each_entry(iter, &node->u.struct_or_variant_declaration.type_declarators, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -881,7 +881,7 @@ int _ctf_visitor_semantic_check(FILE *fd, int depth, struct ctf_node *node)
                case NODE_UNARY_EXPRESSION:
                        goto errperm;
                }
-               cds_list_for_each_entry(iter, &node->u.variant.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u.variant.declaration_list, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -898,7 +898,7 @@ int _ctf_visitor_semantic_check(FILE *fd, int depth, struct ctf_node *node)
                case NODE_UNARY_EXPRESSION:
                        goto errperm;
                }
-               cds_list_for_each_entry(iter, &node->u._struct.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u._struct.declaration_list, siblings) {
                        ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
                        if (ret)
                                return ret;
index 66b375615f925915fcaf25e74f58bead0fe4ac74..428a89560e9baa1bf0aa25ff881462609c8af851 100644 (file)
@@ -124,7 +124,7 @@ int ctf_visitor_print_type_specifier_list(FILE *fd, int depth, struct ctf_node *
 
        print_tabs(fd, depth);
        fprintf(fd, "<type_specifier_list>\n");
-       cds_list_for_each_entry(iter, &node->u.type_specifier_list.head, siblings) {
+       bt_list_for_each_entry(iter, &node->u.type_specifier_list.head, siblings) {
                ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                if (ret)
                        return ret;
@@ -280,10 +280,10 @@ int ctf_visitor_print_type_declarator(FILE *fd, int depth, struct ctf_node *node
        fprintf(fd, "<type_declarator>\n");
        depth++;
 
-       if (!cds_list_empty(&node->u.type_declarator.pointers)) {
+       if (!bt_list_empty(&node->u.type_declarator.pointers)) {
                print_tabs(fd, depth);
                fprintf(fd, "<pointers>\n");
-               cds_list_for_each_entry(iter, &node->u.type_declarator.pointers,
+               bt_list_for_each_entry(iter, &node->u.type_declarator.pointers,
                                        siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
@@ -318,10 +318,10 @@ int ctf_visitor_print_type_declarator(FILE *fd, int depth, struct ctf_node *node
                        fprintf(fd, "<length>\n");
                        print_tabs(fd, depth);
                        fprintf(fd, "</length>\n");
-               } else if (!cds_list_empty(&node->u.type_declarator.u.nested.length)) {
+               } else if (!bt_list_empty(&node->u.type_declarator.u.nested.length)) {
                        print_tabs(fd, depth);
                        fprintf(fd, "<length>\n");
-                       cds_list_for_each_entry(iter, &node->u.type_declarator.u.nested.length,
+                       bt_list_for_each_entry(iter, &node->u.type_declarator.u.nested.length,
                                                siblings) {
                                ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                                if (ret)
@@ -363,23 +363,23 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
        case NODE_ROOT:
                print_tabs(fd, depth);
                fprintf(fd, "<root>\n");
-               cds_list_for_each_entry(iter, &node->u.root.declaration_list,
+               bt_list_for_each_entry(iter, &node->u.root.declaration_list,
                                        siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
                }
-               cds_list_for_each_entry(iter, &node->u.root.trace, siblings) {
+               bt_list_for_each_entry(iter, &node->u.root.trace, siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
                }
-               cds_list_for_each_entry(iter, &node->u.root.stream, siblings) {
+               bt_list_for_each_entry(iter, &node->u.root.stream, siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
                }
-               cds_list_for_each_entry(iter, &node->u.root.event, siblings) {
+               bt_list_for_each_entry(iter, &node->u.root.event, siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -391,7 +391,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
        case NODE_EVENT:
                print_tabs(fd, depth);
                fprintf(fd, "<event>\n");
-               cds_list_for_each_entry(iter, &node->u.event.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u.event.declaration_list, siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -402,7 +402,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
        case NODE_STREAM:
                print_tabs(fd, depth);
                fprintf(fd, "<stream>\n");
-               cds_list_for_each_entry(iter, &node->u.stream.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u.stream.declaration_list, siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -413,7 +413,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
        case NODE_ENV:
                print_tabs(fd, depth);
                fprintf(fd, "<env>\n");
-               cds_list_for_each_entry(iter, &node->u.env.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u.env.declaration_list, siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -424,7 +424,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
        case NODE_TRACE:
                print_tabs(fd, depth);
                fprintf(fd, "<trace>\n");
-               cds_list_for_each_entry(iter, &node->u.trace.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u.trace.declaration_list, siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -435,7 +435,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
        case NODE_CLOCK:
                print_tabs(fd, depth);
                fprintf(fd, "<clock>\n");
-               cds_list_for_each_entry(iter, &node->u.clock.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u.clock.declaration_list, siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -451,7 +451,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
                depth++;
                print_tabs(fd, depth);
                fprintf(fd, "<left>\n");
-               cds_list_for_each_entry(iter, &node->u.ctf_expression.left, siblings) {
+               bt_list_for_each_entry(iter, &node->u.ctf_expression.left, siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -462,7 +462,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
 
                print_tabs(fd, depth);
                fprintf(fd, "<right>\n");
-               cds_list_for_each_entry(iter, &node->u.ctf_expression.right, siblings) {
+               bt_list_for_each_entry(iter, &node->u.ctf_expression.right, siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -486,7 +486,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
 
                print_tabs(fd, depth);
                fprintf(fd, "<type_declarator_list>\n");
-               cds_list_for_each_entry(iter, &node->u._typedef.type_declarators, siblings) {
+               bt_list_for_each_entry(iter, &node->u._typedef.type_declarators, siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -508,7 +508,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
 
                print_tabs(fd, depth);
                fprintf(fd, "<type_declarator_list>\n");
-               cds_list_for_each_entry(iter, &node->u.typealias_target.type_declarators, siblings) {
+               bt_list_for_each_entry(iter, &node->u.typealias_target.type_declarators, siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -531,7 +531,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
 
                print_tabs(fd, depth);
                fprintf(fd, "<type_declarator_list>\n");
-               cds_list_for_each_entry(iter, &node->u.typealias_alias.type_declarators, siblings) {
+               bt_list_for_each_entry(iter, &node->u.typealias_alias.type_declarators, siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -583,7 +583,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
        case NODE_FLOATING_POINT:
                print_tabs(fd, depth);
                fprintf(fd, "<floating_point>\n");
-               cds_list_for_each_entry(iter, &node->u.floating_point.expressions, siblings) {
+               bt_list_for_each_entry(iter, &node->u.floating_point.expressions, siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -594,7 +594,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
        case NODE_INTEGER:
                print_tabs(fd, depth);
                fprintf(fd, "<integer>\n");
-               cds_list_for_each_entry(iter, &node->u.integer.expressions, siblings) {
+               bt_list_for_each_entry(iter, &node->u.integer.expressions, siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -605,7 +605,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
        case NODE_STRING:
                print_tabs(fd, depth);
                fprintf(fd, "<string>\n");
-               cds_list_for_each_entry(iter, &node->u.string.expressions, siblings) {
+               bt_list_for_each_entry(iter, &node->u.string.expressions, siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -619,7 +619,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
                if (node->u.enumerator.id)
                        fprintf(fd, " id=\"%s\"", node->u.enumerator.id);
                fprintf(fd, ">\n");
-               cds_list_for_each_entry(iter, &node->u.enumerator.values, siblings) {
+               bt_list_for_each_entry(iter, &node->u.enumerator.values, siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -648,7 +648,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
 
                print_tabs(fd, depth);
                fprintf(fd, "<enumerator_list>\n");
-               cds_list_for_each_entry(iter, &node->u._enum.enumerator_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u._enum.enumerator_list, siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -668,7 +668,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
 
                print_tabs(fd, depth);
                fprintf(fd, "<type_declarator_list>\n");
-               cds_list_for_each_entry(iter, &node->u.struct_or_variant_declaration.type_declarators, siblings) {
+               bt_list_for_each_entry(iter, &node->u.struct_or_variant_declaration.type_declarators, siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -684,7 +684,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
                if (node->u.variant.choice)
                        fprintf(fd, " choice=\"%s\"", node->u.variant.choice);
                fprintf(fd, ">\n");
-               cds_list_for_each_entry(iter, &node->u.variant.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u.variant.declaration_list, siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
@@ -699,17 +699,17 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
                                node->u._struct.name);
                else
                        fprintf(fd, "<struct>\n");
-               cds_list_for_each_entry(iter, &node->u._struct.declaration_list, siblings) {
+               bt_list_for_each_entry(iter, &node->u._struct.declaration_list, siblings) {
                        ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                        if (ret)
                                return ret;
                }
                print_tabs(fd, depth);
                fprintf(fd, "</struct>\n");
-               if (!cds_list_empty(&node->u._struct.min_align)) {
+               if (!bt_list_empty(&node->u._struct.min_align)) {
                        print_tabs(fd, depth);
                        fprintf(fd, "<align>\n");
-                       cds_list_for_each_entry(iter, &node->u._struct.min_align, siblings) {
+                       bt_list_for_each_entry(iter, &node->u._struct.min_align, siblings) {
                                ret = ctf_visitor_print_xml(fd, depth + 1, iter);
                                if (ret)
                                        return ret;
index a08b59364548104a93ad1503aac1543fd06b4394..12912561773fd3884ab3fad7015624fd6683be5d 100644 (file)
@@ -22,6 +22,7 @@
 #include <glib.h>
 #include <errno.h>
 #include <stdio.h>
+#include <assert.h>
 
 struct walk_data {
        FILE *fp;
index baafcea1a2f16a26248be34af6bfa5aed28aeb20..fea3c25942e94c0104b27ea0b08a1b3a9f37be01 100644 (file)
@@ -4,7 +4,8 @@ babeltraceinclude_HEADERS = \
        babeltrace/context.h \
        babeltrace/iterator.h \
        babeltrace/trace-collection.h \
-       babeltrace/trace-handle.h
+       babeltrace/trace-handle.h \
+       babeltrace/list.h
 
 babeltracectfinclude_HEADERS = \
        babeltrace/ctf/events.h
@@ -17,7 +18,6 @@ noinst_HEADERS = \
        babeltrace/compiler.h \
        babeltrace/context-internal.h \
        babeltrace/iterator-internal.h \
-       babeltrace/list.h \
        babeltrace/prio_heap.h \
        babeltrace/types.h \
        babeltrace/ctf-ir/metadata.h \
index 526ab614a2fcaa9cf83c68bbe747dc263be951a0..4eb59858a84a9d562339c3e0782c288c481f7046 100644 (file)
@@ -21,7 +21,7 @@
  * all copies or substantial portions of the Software.
  */
 
-#include <babeltrace/types.h>
+#include <babeltrace/list.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <glib.h>
@@ -35,11 +35,11 @@ struct trace_descriptor {
 
 struct mmap_stream {
        int fd;
-       struct cds_list_head list;
+       struct bt_list_head list;
 };
 
 struct mmap_stream_list {
-       struct cds_list_head head;
+       struct bt_list_head head;
 };
 
 struct format {
index db7685fca289b5c3d48881a51fdfc570283d9dfc..feb8b5d88fa77e89d893cb5fd5917c45e4f4c143 100644 (file)
@@ -17,8 +17,8 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#ifndef _CDS_LIST_H
-#define _CDS_LIST_H    1
+#ifndef _BT_LIST_H
+#define _BT_LIST_H     1
 
 /* The definitions of this file are adopted from those which can be
    found in the Linux kernel headers to enable people familiar with
 
 
 /* Basic type for the double-link list.  */
-struct cds_list_head
+struct bt_list_head
 {
-  struct cds_list_head *next;
-  struct cds_list_head *prev;
+  struct bt_list_head *next;
+  struct bt_list_head *prev;
 };
 
 
 /* Define a variable with the head and tail of the list.  */
-#define CDS_LIST_HEAD(name) \
-  struct cds_list_head name = { &(name), &(name) }
+#define BT_LIST_HEAD(name) \
+  struct bt_list_head name = { &(name), &(name) }
 
 /* Initialize a new list head.  */
-#define CDS_INIT_LIST_HEAD(ptr) \
+#define BT_INIT_LIST_HEAD(ptr) \
   (ptr)->next = (ptr)->prev = (ptr)
 
-#define CDS_LIST_HEAD_INIT(name) { .prev = &(name), .next = &(name) }
+#define BT_LIST_HEAD_INIT(name) { .prev = &(name), .next = &(name) }
 
 /* Add new element at the head of the list.  */
 static inline void
-cds_list_add (struct cds_list_head *newp, struct cds_list_head *head)
+bt_list_add (struct bt_list_head *newp, struct bt_list_head *head)
 {
   head->next->prev = newp;
   newp->next = head->next;
@@ -56,7 +56,7 @@ cds_list_add (struct cds_list_head *newp, struct cds_list_head *head)
 
 /* Add new element at the tail of the list.  */
 static inline void
-cds_list_add_tail (struct cds_list_head *newp, struct cds_list_head *head)
+bt_list_add_tail (struct bt_list_head *newp, struct bt_list_head *head)
 {
   head->prev->next = newp;
   newp->next = head;
@@ -67,7 +67,7 @@ cds_list_add_tail (struct cds_list_head *newp, struct cds_list_head *head)
 
 /* Remove element from list.  */
 static inline void
-__cds_list_del (struct cds_list_head *prev, struct cds_list_head *next)
+__bt_list_del (struct bt_list_head *prev, struct bt_list_head *next)
 {
   next->prev = prev;
   prev->next = next;
@@ -75,23 +75,23 @@ __cds_list_del (struct cds_list_head *prev, struct cds_list_head *next)
 
 /* Remove element from list.  */
 static inline void
-cds_list_del (struct cds_list_head *elem)
+bt_list_del (struct bt_list_head *elem)
 {
-  __cds_list_del (elem->prev, elem->next);
+  __bt_list_del (elem->prev, elem->next);
 }
 
 /* delete from list, add to another list as head */
 static inline void
-cds_list_move (struct cds_list_head *elem, struct cds_list_head *head)
+bt_list_move (struct bt_list_head *elem, struct bt_list_head *head)
 {
-  __cds_list_del (elem->prev, elem->next);
-  cds_list_add (elem, head);
+  __bt_list_del (elem->prev, elem->next);
+  bt_list_add (elem, head);
 }
 
 /* replace an old entry.
  */
 static inline void
-cds_list_replace(struct cds_list_head *old, struct cds_list_head *_new)
+bt_list_replace(struct bt_list_head *old, struct bt_list_head *_new)
 {
        _new->next = old->next;
        _new->prev = old->prev;
@@ -101,7 +101,7 @@ cds_list_replace(struct cds_list_head *old, struct cds_list_head *_new)
 
 /* Join two lists.  */
 static inline void
-cds_list_splice (struct cds_list_head *add, struct cds_list_head *head)
+bt_list_splice (struct bt_list_head *add, struct bt_list_head *head)
 {
   /* Do nothing if the list which gets added is empty.  */
   if (add != add->next)
@@ -115,56 +115,56 @@ cds_list_splice (struct cds_list_head *add, struct cds_list_head *head)
 
 
 /* Get typed element from list at a given position.  */
-#define cds_list_entry(ptr, type, member) \
+#define bt_list_entry(ptr, type, member) \
   ((type *) ((char *) (ptr) - (unsigned long) (&((type *) 0)->member)))
 
 
 
 /* Iterate forward over the elements of the list.  */
-#define cds_list_for_each(pos, head) \
+#define bt_list_for_each(pos, head) \
   for (pos = (head)->next; pos != (head); pos = pos->next)
 
 
 /* Iterate forward over the elements of the list.  */
-#define cds_list_for_each_prev(pos, head) \
+#define bt_list_for_each_prev(pos, head) \
   for (pos = (head)->prev; pos != (head); pos = pos->prev)
 
 
 /* Iterate backwards over the elements list.  The list elements can be
    removed from the list while doing this.  */
-#define cds_list_for_each_prev_safe(pos, p, head) \
+#define bt_list_for_each_prev_safe(pos, p, head) \
   for (pos = (head)->prev, p = pos->prev; \
        pos != (head); \
        pos = p, p = pos->prev)
 
-#define cds_list_for_each_entry(pos, head, member)                             \
-       for (pos = cds_list_entry((head)->next, typeof(*pos), member);  \
+#define bt_list_for_each_entry(pos, head, member)                              \
+       for (pos = bt_list_entry((head)->next, typeof(*pos), member);   \
             &pos->member != (head);                                    \
-            pos = cds_list_entry(pos->member.next, typeof(*pos), member))
+            pos = bt_list_entry(pos->member.next, typeof(*pos), member))
 
-#define cds_list_for_each_entry_reverse(pos, head, member)                     \
-       for (pos = cds_list_entry((head)->prev, typeof(*pos), member);  \
+#define bt_list_for_each_entry_reverse(pos, head, member)                      \
+       for (pos = bt_list_entry((head)->prev, typeof(*pos), member);   \
             &pos->member != (head);                                    \
-            pos = cds_list_entry(pos->member.prev, typeof(*pos), member))
+            pos = bt_list_entry(pos->member.prev, typeof(*pos), member))
 
-#define cds_list_for_each_entry_safe(pos, p, head, member)                     \
-       for (pos = cds_list_entry((head)->next, typeof(*pos), member),  \
-                    p = cds_list_entry(pos->member.next,typeof(*pos), member); \
+#define bt_list_for_each_entry_safe(pos, p, head, member)                      \
+       for (pos = bt_list_entry((head)->next, typeof(*pos), member),   \
+                    p = bt_list_entry(pos->member.next,typeof(*pos), member); \
             &pos->member != (head);                                    \
-            pos = p, p = cds_list_entry(pos->member.next, typeof(*pos), member))
+            pos = p, p = bt_list_entry(pos->member.next, typeof(*pos), member))
 
-static inline int cds_list_empty(struct cds_list_head *head)
+static inline int bt_list_empty(struct bt_list_head *head)
 {
        return head == head->next;
 }
 
-static inline void cds_list_replace_init(struct cds_list_head *old,
-                                    struct cds_list_head *_new)
+static inline void bt_list_replace_init(struct bt_list_head *old,
+                                    struct bt_list_head *_new)
 {
-       struct cds_list_head *head = old->next;
-       cds_list_del(old);
-       cds_list_add_tail(_new, head);
-       CDS_INIT_LIST_HEAD(old);
+       struct bt_list_head *head = old->next;
+       bt_list_del(old);
+       bt_list_add_tail(_new, head);
+       BT_INIT_LIST_HEAD(old);
 }
 
-#endif /* _CDS_LIST_H */
+#endif /* _BT_LIST_H */
index e3c419d1bb86b37ba3e74ab6fa3aac9a1e702897..0cedb337b03d389dfdda9199c8a2477986c33c46 100644 (file)
@@ -186,7 +186,7 @@ struct enum_range {
 };
 
 struct enum_range_to_quark {
-       struct cds_list_head node;
+       struct bt_list_head node;
        struct enum_range range;
        GQuark quark;
 };
@@ -205,7 +205,7 @@ struct enum_range_to_quark {
  */
 struct enum_table {
        GHashTable *value_to_quark_set;         /* (value, GQuark GArray) */
-       struct cds_list_head range_to_quark;    /* (range, GQuark) */
+       struct bt_list_head range_to_quark;     /* (range, GQuark) */
        GHashTable *quark_to_range_set;         /* (GQuark, range GArray) */
 };
 
index 87b2083bcfdf4120ff41976ae6aa4689f887ac51..f2c10adc683171fb63dc73f460b311a505c1429e 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <babeltrace/compiler.h>
 #include <babeltrace/format.h>
+#include <babeltrace/types.h>
 #include <inttypes.h>
 
 static
index f096d5b6dc4081626087094598bc1f59f2cbb1d9..f425df02badb89afae51dc29be98823241518453 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <babeltrace/compiler.h>
 #include <babeltrace/format.h>
+#include <babeltrace/types.h>
 #include <stdint.h>
 #include <glib.h>
 
@@ -118,7 +119,7 @@ GArray *enum_uint_to_quark_set(const struct declaration_enum *enum_declaration,
                                 get_uint_v(&v));
 
        /* Range lookup */
-       cds_list_for_each_entry(iter, &enum_declaration->table.range_to_quark, node) {
+       bt_list_for_each_entry(iter, &enum_declaration->table.range_to_quark, node) {
                if (iter->range.start._unsigned > v || iter->range.end._unsigned < v)
                        continue;
                if (!ranges) {
@@ -165,7 +166,7 @@ GArray *enum_int_to_quark_set(const struct declaration_enum *enum_declaration,
                                 get_int_v(&v));
 
        /* Range lookup */
-       cds_list_for_each_entry(iter, &enum_declaration->table.range_to_quark, node) {
+       bt_list_for_each_entry(iter, &enum_declaration->table.range_to_quark, node) {
                if (iter->range.start._signed > v || iter->range.end._signed < v)
                        continue;
                if (!ranges) {
@@ -263,7 +264,7 @@ void enum_signed_insert_range_to_quark(struct declaration_enum *enum_declaration
        struct enum_range_to_quark *rtoq;
 
        rtoq = g_new(struct enum_range_to_quark, 1);
-       cds_list_add(&rtoq->node, &enum_declaration->table.range_to_quark);
+       bt_list_add(&rtoq->node, &enum_declaration->table.range_to_quark);
        rtoq->range.start._signed = start;
        rtoq->range.end._signed = end;
        rtoq->quark = q;
@@ -276,7 +277,7 @@ void enum_unsigned_insert_range_to_quark(struct declaration_enum *enum_declarati
        struct enum_range_to_quark *rtoq;
 
        rtoq = g_new(struct enum_range_to_quark, 1);
-       cds_list_add(&rtoq->node, &enum_declaration->table.range_to_quark);
+       bt_list_add(&rtoq->node, &enum_declaration->table.range_to_quark);
        rtoq->range.start._unsigned = start;
        rtoq->range.end._unsigned = end;
        rtoq->quark = q;
@@ -364,8 +365,8 @@ void _enum_declaration_free(struct declaration *declaration)
        struct enum_range_to_quark *iter, *tmp;
 
        g_hash_table_destroy(enum_declaration->table.value_to_quark_set);
-       cds_list_for_each_entry_safe(iter, tmp, &enum_declaration->table.range_to_quark, node) {
-               cds_list_del(&iter->node);
+       bt_list_for_each_entry_safe(iter, tmp, &enum_declaration->table.range_to_quark, node) {
+               bt_list_del(&iter->node);
                g_free(iter);
        }
        g_hash_table_destroy(enum_declaration->table.quark_to_range_set);
@@ -384,7 +385,7 @@ struct declaration_enum *
                                                            enum_val_equal,
                                                            enum_val_free,
                                                            enum_range_set_free);
-       CDS_INIT_LIST_HEAD(&enum_declaration->table.range_to_quark);
+       BT_INIT_LIST_HEAD(&enum_declaration->table.range_to_quark);
        enum_declaration->table.quark_to_range_set = g_hash_table_new_full(g_direct_hash,
                                                        g_direct_equal,
                                                        NULL, enum_range_set_free);
index 863173852c9baacc6bfbf7dbe5208cad55d89088..7c3295304b3f099aebbbd8b973e043a0b75eb0a5 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <babeltrace/compiler.h>
 #include <babeltrace/format.h>
+#include <babeltrace/types.h>
 #include <endian.h>
 
 static
index 7e996f2786feeeb414f56b28f56a56cfbd1c6530..59a6c1bb792c5a4aa1474cc4f0764c6e533320fb 100644 (file)
@@ -21,6 +21,7 @@
 #include <babeltrace/compiler.h>
 #include <babeltrace/align.h>
 #include <babeltrace/format.h>
+#include <babeltrace/types.h>
 #include <stdint.h>
 
 static
index 7d060e4b06224098fe7acfeceda84f8a24589077..bd49d2a6507f116a5f916a423785761e06fd1cb5 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <babeltrace/compiler.h>
 #include <babeltrace/format.h>
+#include <babeltrace/types.h>
 #include <inttypes.h>
 
 static
index bff569db93bb11118b0904d48fcc5f1454623863..0fdd81e33266b52b9b80a91c3dba72f41223edb0 100644 (file)
@@ -21,6 +21,7 @@
 #include <babeltrace/compiler.h>
 #include <babeltrace/align.h>
 #include <babeltrace/format.h>
+#include <babeltrace/types.h>
 
 static
 struct definition *_string_definition_new(struct declaration *declaration,
index 188be82cadb95592864162cd47f8b8fcd5c21f48..f360407c46f3ed956285689ae3847c9b5d01625a 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <babeltrace/compiler.h>
 #include <babeltrace/format.h>
+#include <babeltrace/types.h>
 #include <errno.h>
 
 #ifndef max
index 4e96f443645ca72cec72f21ae409617ee140a2b6..d3c204aeed8f2a20c8d084ecd70c869414f2fb4b 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <babeltrace/format.h>
 #include <babeltrace/babeltrace-internal.h>
+#include <babeltrace/types.h>
 #include <limits.h>
 #include <glib.h>
 #include <errno.h>
index 1229f582e9f9dd0227826c7690b9aae8b4244e0e..faf70dde200e6bbff757ecc889e1132e5dca5cde 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <babeltrace/compiler.h>
 #include <babeltrace/format.h>
+#include <babeltrace/types.h>
 #include <errno.h>
 
 static
This page took 0.161186 seconds and 4 git commands to generate.