Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
22 files changed:
* for each stream, try to open, check magic number, and get the
* stream ID to add to the right location in the stream array.
*/
* 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");
ret = ctf_open_mmap_stream_read(td, mmap_info, move_pos_slow);
if (ret) {
fprintf(stderr, "[error] Open file mmap stream error.\n");
* Parent node is only set on demand by specific visitor.
*/
struct ctf_node *parent;
* 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 {
enum node_type type;
union {
* Children nodes are ctf_expression, typedef,
* typealias and type_specifier_list.
*/
* 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.
*/
} 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.
*/
} 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.
*/
} 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.
*/
} 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.
*/
} 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;
- 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 {
} ctf_expression;
struct {
enum {
} unary_expression;
struct {
struct ctf_node *type_specifier_list;
} 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;
} _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;
} 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;
} typealias_alias;
struct {
struct ctf_node *target;
} type_specifier;
struct {
/* list of type_specifier */
} 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 {
} 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 */
enum {
TYPEDEC_UNKNOWN = 0,
TYPEDEC_ID, /* identifier */
* unary expression (value) or
* type_specifier_list.
*/
* 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;
/* for abstract type declarator */
unsigned int abstract_array;
} nested;
} type_declarator;
struct {
/* Children nodes are ctf_expression. */
} 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. */
} 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. */
} integer;
struct {
/* Children nodes are ctf_expression. */
- struct cds_list_head expressions;
+ struct bt_list_head expressions;
} string;
struct {
char *id;
} string;
struct {
char *id;
* Range list or single value node. Contains unary
* expressions.
*/
* Range list or single value node. Contains unary
* expressions.
*/
- struct cds_list_head values;
+ struct bt_list_head values;
} enumerator;
struct {
char *enum_id;
} enumerator;
struct {
char *enum_id;
* type_specifier_list.
*/
struct ctf_node *container_type;
* 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;
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_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 */
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;
- 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;
} 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);
};
const char *node_type(struct ctf_node *node);
/* Join two lists, put "add" at the end of "head". */
static inline void
/* 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) {
{
/* Do nothing if the list which gets added is empty. */
if (add != add->next) {
int yydebug;
struct gc_string {
int yydebug;
struct gc_string {
- struct cds_list_head gc;
+ struct bt_list_head gc;
size_t alloclen;
char s[];
};
size_t alloclen;
char s[];
};
alloclen *= 2);
gstr = malloc(alloclen);
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;
}
gstr->alloclen = alloclen;
return gstr;
}
newgstr = gc_string_alloc(scanner, newlen);
strcpy(newgstr->s, gstr->s);
strcat(newgstr->s, gsrc->s);
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);
}
free(gstr);
gstr = newgstr;
} else {
strcat(gstr->s, gsrc->s);
}
- cds_list_del(&gsrc->gc);
+ bt_list_del(&gsrc->gc);
free(gsrc);
return gstr;
}
free(gsrc);
return gstr;
}
return NULL;
memset(node, 0, sizeof(*node));
node->type = type;
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:
switch (type) {
case NODE_ROOT:
- CDS_INIT_LIST_HEAD(&node->u.event.declaration_list);
+ BT_INIT_LIST_HEAD(&node->u.event.declaration_list);
- CDS_INIT_LIST_HEAD(&node->u.stream.declaration_list);
+ BT_INIT_LIST_HEAD(&node->u.stream.declaration_list);
- CDS_INIT_LIST_HEAD(&node->u.env.declaration_list);
+ BT_INIT_LIST_HEAD(&node->u.env.declaration_list);
- CDS_INIT_LIST_HEAD(&node->u.trace.declaration_list);
+ BT_INIT_LIST_HEAD(&node->u.trace.declaration_list);
- CDS_INIT_LIST_HEAD(&node->u.clock.declaration_list);
+ BT_INIT_LIST_HEAD(&node->u.clock.declaration_list);
break;
case NODE_CTF_EXPRESSION:
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:
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:
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:
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;
break;
case NODE_TYPEALIAS:
break;
case NODE_TYPE_SPECIFIER:
break;
case NODE_TYPE_SPECIFIER_LIST:
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:
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:
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:
break;
case NODE_INTEGER:
- CDS_INIT_LIST_HEAD(&node->u.integer.expressions);
+ BT_INIT_LIST_HEAD(&node->u.integer.expressions);
- CDS_INIT_LIST_HEAD(&node->u.string.expressions);
+ BT_INIT_LIST_HEAD(&node->u.string.expressions);
break;
case NODE_ENUMERATOR:
break;
case NODE_ENUMERATOR:
- CDS_INIT_LIST_HEAD(&node->u.enumerator.values);
+ BT_INIT_LIST_HEAD(&node->u.enumerator.values);
- 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:
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:
break;
case NODE_VARIANT:
- CDS_INIT_LIST_HEAD(&node->u.variant.declaration_list);
+ BT_INIT_LIST_HEAD(&node->u.variant.declaration_list);
- 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:
break;
case NODE_UNKNOWN:
{
switch (parent->type) {
case NODE_EVENT:
{
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);
- _cds_list_splice_tail(&node->tmp_head, &parent->u.stream.declaration_list);
+ _bt_list_splice_tail(&node->tmp_head, &parent->u.stream.declaration_list);
- _cds_list_splice_tail(&node->tmp_head, &parent->u.env.declaration_list);
+ _bt_list_splice_tail(&node->tmp_head, &parent->u.env.declaration_list);
- _cds_list_splice_tail(&node->tmp_head, &parent->u.trace.declaration_list);
+ _bt_list_splice_tail(&node->tmp_head, &parent->u.trace.declaration_list);
- _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:
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:
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);
- _cds_list_splice_tail(&node->tmp_head, &parent->u.string.expressions);
+ _bt_list_splice_tail(&node->tmp_head, &parent->u.string.expressions);
{
switch (parent->type) {
case NODE_ROOT:
{
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);
- _cds_list_splice_tail(&node->tmp_head, &parent->u.event.declaration_list);
+ _bt_list_splice_tail(&node->tmp_head, &parent->u.event.declaration_list);
- _cds_list_splice_tail(&node->tmp_head, &parent->u.stream.declaration_list);
+ _bt_list_splice_tail(&node->tmp_head, &parent->u.stream.declaration_list);
- _cds_list_splice_tail(&node->tmp_head, &parent->u.env.declaration_list);
+ _bt_list_splice_tail(&node->tmp_head, &parent->u.env.declaration_list);
- _cds_list_splice_tail(&node->tmp_head, &parent->u.trace.declaration_list);
+ _bt_list_splice_tail(&node->tmp_head, &parent->u.trace.declaration_list);
- _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:
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);
- _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:
break;
case NODE_FLOATING_POINT:
{
switch (parent->type) {
case NODE_ROOT:
{
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);
- _cds_list_splice_tail(&node->tmp_head, &parent->u.event.declaration_list);
+ _bt_list_splice_tail(&node->tmp_head, &parent->u.event.declaration_list);
- _cds_list_splice_tail(&node->tmp_head, &parent->u.stream.declaration_list);
+ _bt_list_splice_tail(&node->tmp_head, &parent->u.stream.declaration_list);
- _cds_list_splice_tail(&node->tmp_head, &parent->u.env.declaration_list);
+ _bt_list_splice_tail(&node->tmp_head, &parent->u.env.declaration_list);
- _cds_list_splice_tail(&node->tmp_head, &parent->u.trace.declaration_list);
+ _bt_list_splice_tail(&node->tmp_head, &parent->u.trace.declaration_list);
- _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:
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);
- _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:
break;
case NODE_FLOATING_POINT:
{
switch (parent->type) {
case NODE_TYPE_SPECIFIER_LIST:
{
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:
break;
case NODE_TYPE_SPECIFIER:
{
switch (parent->type) {
case NODE_ROOT:
{
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);
- cds_list_add_tail(&node->siblings, &parent->u.event.declaration_list);
+ bt_list_add_tail(&node->siblings, &parent->u.event.declaration_list);
- cds_list_add_tail(&node->siblings, &parent->u.stream.declaration_list);
+ bt_list_add_tail(&node->siblings, &parent->u.stream.declaration_list);
- cds_list_add_tail(&node->siblings, &parent->u.env.declaration_list);
+ bt_list_add_tail(&node->siblings, &parent->u.env.declaration_list);
- cds_list_add_tail(&node->siblings, &parent->u.trace.declaration_list);
+ bt_list_add_tail(&node->siblings, &parent->u.trace.declaration_list);
- 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:
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);
- 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;
break;
case NODE_TYPEDEF:
parent->u._typedef.type_specifier_list = node;
parent->u.type_declarator.u.nested.type_declarator = node;
break;
case NODE_STRUCT_OR_VARIANT_DECLARATION:
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:
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:
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:
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);
case NODE_EVENT:
if (parent->type == NODE_ROOT) {
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) {
} 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) {
} 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) {
} 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) {
} 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;
}
} else {
return -EPERM;
}
case NODE_POINTER:
if (parent->type == NODE_TYPE_DECLARATOR) {
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;
} else
return -EPERM;
break;
case NODE_ENUMERATOR:
if (parent->type == NODE_ENUM) {
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;
}
} else {
return -EPERM;
}
case NODE_STRUCT_OR_VARIANT_DECLARATION:
switch (parent->type) {
case NODE_STRUCT:
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:
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;
break;
default:
return -EINVAL;
-static void free_strings(struct cds_list_head *list)
+static void free_strings(struct bt_list_head *list)
{
struct gc_string *gstr, *tmp;
{
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)
if (!ast)
return NULL;
memset(ast, 0, sizeof(*ast));
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;
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);
{
struct ctf_node *node, *tmp;
{
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)
goto cleanup_lexer;
init_scope(&scanner->root_scope, NULL);
scanner->cs = &scanner->root_scope;
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",
if (yydebug)
fprintf(stdout, "Scanner input is a%s.\n",
$$ = make_node(scanner, NODE_UNARY_EXPRESSION);
$$->u.unary_expression.type = UNARY_SBRAC;
$$->u.unary_expression.u.sbrac_exp = $3;
$$ = 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
{
}
| postfix_expression DOT IDENTIFIER
{
$$->u.unary_expression.type = UNARY_STRING;
$$->u.unary_expression.u.string = yylval.gs->s;
$$->u.unary_expression.link = UNARY_DOTLINK;
$$->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
{
}
| postfix_expression DOT ID_TYPE
{
$$->u.unary_expression.type = UNARY_STRING;
$$->u.unary_expression.u.string = yylval.gs->s;
$$->u.unary_expression.link = UNARY_DOTLINK;
$$->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
{
}
| postfix_expression RARROW IDENTIFIER
{
$$->u.unary_expression.type = UNARY_STRING;
$$->u.unary_expression.u.string = yylval.gs->s;
$$->u.unary_expression.link = UNARY_ARROWLINK;
$$->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
{
}
| postfix_expression RARROW ID_TYPE
{
$$->u.unary_expression.type = UNARY_STRING;
$$->u.unary_expression.u.string = yylval.gs->s;
$$->u.unary_expression.link = UNARY_ARROWLINK;
$$->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);
unary_expression DOTDOTDOT unary_expression
{
$$ = $1;
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
$3->u.unary_expression.link = UNARY_DOTDOTDOT;
}
| unary_expression
$$ = make_node(scanner, NODE_TYPEDEF);
list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
$$->u._typedef.type_specifier_list = list;
$$ = 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
{
}
| TYPEDEF declaration_specifiers type_declarator_list SEMICOLON
{
$$ = make_node(scanner, NODE_TYPEDEF);
list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
$$->u._typedef.type_specifier_list = list;
$$ = 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
{
}
| declaration_specifiers TYPEDEF type_declarator_list SEMICOLON
{
$$ = make_node(scanner, NODE_TYPEDEF);
list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
$$->u._typedef.type_specifier_list = list;
$$ = 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
{
}
| TYPEALIAS declaration_specifiers abstract_declarator_list TYPEASSIGN alias_declaration_specifiers alias_abstract_declarator_list SEMICOLON
{
list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
$$->u.typealias.target->u.typealias_target.type_specifier_list = list;
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;
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);
$$ = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
node = make_node(scanner, NODE_TYPE_SPECIFIER);
node->u.type_specifier.type = TYPESPEC_CONST;
$$ = 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
{
}
| integer_type_specifier
{
$$ = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
node = $1;
$$ = 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
{
}
| integer_declaration_specifiers CONST
{
$$ = $1;
node = make_node(scanner, NODE_TYPE_SPECIFIER);
node->u.type_specifier.type = TYPESPEC_CONST;
$$ = $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;
}
| 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);
$$ = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
node = make_node(scanner, NODE_TYPE_SPECIFIER);
node->u.type_specifier.type = TYPESPEC_CONST;
$$ = 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);
$$ = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
node = $1;
$$ = 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
{
}
| declaration_specifiers CONST
{
$$ = $1;
node = make_node(scanner, NODE_TYPE_SPECIFIER);
node->u.type_specifier.type = TYPESPEC_CONST;
$$ = $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;
}
| 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);
| type_declarator_list COMMA type_declarator
{
$$ = $1;
| type_declarator_list COMMA type_declarator
{
$$ = $1;
- cds_list_add_tail(&($3)->siblings, &($$)->tmp_head);
+ bt_list_add_tail(&($3)->siblings, &($$)->tmp_head);
{
$$ = make_node(scanner, NODE_STRUCT);
$$->u._struct.has_body = 1;
{
$$ = 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");
}
if ($2 && set_parent_node($2, $$))
reparent_error(scanner, "struct reparent error");
}
$$ = make_node(scanner, NODE_STRUCT);
$$->u._struct.has_body = 1;
$$->u._struct.name = $1->s;
$$ = 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");
}
if ($3 && set_parent_node($3, $$))
reparent_error(scanner, "struct reparent error");
}
$$ = make_node(scanner, NODE_STRUCT);
$$->u._struct.has_body = 1;
$$->u._struct.name = $1->s;
$$ = 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");
}
if ($3 && set_parent_node($3, $$))
reparent_error(scanner, "struct reparent error");
}
{
$$ = make_node(scanner, NODE_ENUM);
$$->u._enum.has_body = 1;
{
$$ = 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;
}
| 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;
}
| 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
{
}
| IDENTIFIER COLON integer_declaration_specifiers LBRAC enumerator_list RBRAC
{
$$->u._enum.has_body = 1;
$$->u._enum.enum_id = $1->s;
($$)->u._enum.container_type = $3;
$$->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;
}
| 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
{
}
| ID_TYPE COLON integer_declaration_specifiers LBRAC enumerator_list RBRAC
{
$$->u._enum.has_body = 1;
$$->u._enum.enum_id = $1->s;
($$)->u._enum.container_type = $3;
$$->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;
}
| 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;
}
| 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;
}
| 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
{
}
| IDENTIFIER COLON integer_declaration_specifiers LBRAC enumerator_list COMMA RBRAC
{
$$->u._enum.has_body = 1;
$$->u._enum.enum_id = $1->s;
($$)->u._enum.container_type = $3;
$$->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);
$$ = make_node(scanner, NODE_ENUM);
$$->u._enum.has_body = 1;
$$->u._enum.enum_id = $1->s;
$$ = 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
{
}
| ID_TYPE COLON integer_declaration_specifiers LBRAC enumerator_list COMMA RBRAC
{
$$->u._enum.has_body = 1;
$$->u._enum.enum_id = $1->s;
($$)->u._enum.container_type = $3;
$$->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);
- cds_list_add_tail(&($2)->siblings, &($$)->tmp_head);
+ bt_list_add_tail(&($2)->siblings, &($$)->tmp_head);
- cds_list_add_tail(&($$)->siblings, &($$)->tmp_head);
+ bt_list_add_tail(&($$)->siblings, &($$)->tmp_head);
struct ctf_node *list;
list = make_node(scanner, NODE_TYPE_SPECIFIER_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_STRUCT_OR_VARIANT_DECLARATION);
($$)->u.struct_or_variant_declaration.type_specifier_list = list;
$$ = 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
{
}
| declaration_specifiers TYPEDEF declaration_specifiers type_declarator_list SEMICOLON
{
$$ = make_node(scanner, NODE_TYPEDEF);
list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
$$->u._typedef.type_specifier_list = list;
$$ = 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
{
}
| TYPEDEF declaration_specifiers type_declarator_list SEMICOLON
{
$$ = make_node(scanner, NODE_TYPEDEF);
list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
$$->u._typedef.type_specifier_list = list;
$$ = 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);
}
| 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;
$$ = 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
{
}
| TYPEALIAS declaration_specifiers abstract_declarator_list TYPEASSIGN alias_declaration_specifiers alias_abstract_declarator_list SEMICOLON
{
list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
$$->u.typealias.target->u.typealias_target.type_specifier_list = list;
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;
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);
$$ = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
node = make_node(scanner, NODE_TYPE_SPECIFIER);
node->u.type_specifier.type = TYPESPEC_CONST;
$$ = 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);
$$ = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
node = $1;
$$ = 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);
node = make_node(scanner, NODE_TYPE_SPECIFIER);
node->u.type_specifier.type = TYPESPEC_ID_TYPE;
node->u.type_specifier.id_type = yylval.gs->s;
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
{
}
| alias_declaration_specifiers CONST
{
$$ = $1;
node = make_node(scanner, NODE_TYPE_SPECIFIER);
node->u.type_specifier.type = TYPESPEC_CONST;
$$ = $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;
}
| 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
{
}
| alias_declaration_specifiers IDENTIFIER
{
node = make_node(scanner, NODE_TYPE_SPECIFIER);
node->u.type_specifier.type = TYPESPEC_ID_TYPE;
node->u.type_specifier.id_type = yylval.gs->s;
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);
| struct_or_variant_declarator_list COMMA struct_or_variant_declarator
{
$$ = $1;
| 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);
| enumerator_list COMMA enumerator
{
$$ = $1;
| enumerator_list COMMA enumerator
{
$$ = $1;
- cds_list_add_tail(&($3)->siblings, &($$)->tmp_head);
+ bt_list_add_tail(&($3)->siblings, &($$)->tmp_head);
{
$$ = make_node(scanner, NODE_ENUMERATOR);
$$->u.enumerator.id = $1->s;
{
$$ = 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;
}
| 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;
}
| 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 = "";
}
| 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;
}
| 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);
| abstract_declarator_list COMMA abstract_declarator
{
$$ = $1;
| abstract_declarator_list COMMA abstract_declarator
{
$$ = $1;
- cds_list_add_tail(&($3)->siblings, &($$)->tmp_head);
+ bt_list_add_tail(&($3)->siblings, &($$)->tmp_head);
| pointer direct_abstract_declarator
{
$$ = $2;
| 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);
$$ = make_node(scanner, NODE_TYPE_DECLARATOR);
$$->u.type_declarator.type = TYPEDEC_NESTED;
$$->u.type_declarator.u.nested.type_declarator = $1;
$$ = 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
{
}
| direct_abstract_declarator LSBRAC RSBRAC
{
| alias_abstract_declarator_list COMMA alias_abstract_declarator
{
$$ = $1;
| 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);
| pointer direct_alias_abstract_declarator
{
$$ = $2;
| 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);
$$ = make_node(scanner, NODE_TYPE_DECLARATOR);
$$->u.type_declarator.type = TYPEDEC_NESTED;
$$->u.type_declarator.u.nested.type_declarator = $1;
$$ = 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
{
}
| direct_alias_abstract_declarator LSBRAC RSBRAC
{
| pointer direct_declarator
{
$$ = $2;
| pointer direct_declarator
{
$$ = $2;
- cds_list_splice(&($1)->tmp_head, &($$)->u.type_declarator.pointers);
+ bt_list_splice(&($1)->tmp_head, &($$)->u.type_declarator.pointers);
$$ = make_node(scanner, NODE_TYPE_DECLARATOR);
$$->u.type_declarator.type = TYPEDEC_NESTED;
$$->u.type_declarator.u.nested.type_declarator = $1;
$$ = 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);
| pointer direct_type_declarator
{
$$ = $2;
| 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);
$$ = make_node(scanner, NODE_TYPE_DECLARATOR);
$$->u.type_declarator.type = TYPEDEC_NESTED;
$$->u.type_declarator.u.nested.type_declarator = $1;
$$ = 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);
| STAR pointer
{
$$ = make_node(scanner, NODE_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;
}
| 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);
| ctf_assignment_expression_list ctf_assignment_expression SEMICOLON
{
$$ = $1;
| 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);
* set_parent_node.
*/
$$ = make_node(scanner, NODE_CTF_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");
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 */
{
}
| unary_expression TYPEASSIGN declaration_specifiers /* Only allow struct */
{
* set_parent_node.
*/
$$ = make_node(scanner, NODE_CTF_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");
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);
}
| 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;
$$ = 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
{
}
| TYPEDEF declaration_specifiers type_declarator_list
{
$$ = make_node(scanner, NODE_TYPEDEF);
list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
$$->u._typedef.type_specifier_list = list;
$$ = 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);
}
| 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;
$$ = 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
{
}
| TYPEALIAS declaration_specifiers abstract_declarator_list TYPEASSIGN alias_declaration_specifiers alias_abstract_declarator_list
{
list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
$$->u.typealias.target->u.typealias_target.type_specifier_list = list;
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;
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);
struct ctf_ast *ast;
struct ctf_scanner_scope root_scope;
struct ctf_scanner_scope *cs;
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);
};
struct ctf_scanner *ctf_scanner_alloc(FILE *input);
#define fprintf_dbg(fd, fmt, args...) fprintf(fd, "%s: " fmt, __func__, ## args)
#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;
int opt_clock_force_correlate;
* String returned must be freed by the caller using g_free.
*/
static
* 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("");
{
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);
char *src_string;
assert(node->type == NODE_UNARY_EXPRESSION);
-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;
{
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);
char *src_string;
assert(node->type == NODE_UNARY_EXPRESSION);
-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;
{
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);
assert(node->type == NODE_UNARY_EXPRESSION);
assert(node->u.unary_expression.type == UNARY_UNSIGNED_CONSTANT);
assert(node->u.unary_expression.link == UNARY_LINK_UNKNOWN);
-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;
{
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);
assert(node->type == NODE_UNARY_EXPRESSION);
assert(node->u.unary_expression.type == UNARY_UNSIGNED_CONSTANT
|| node->u.unary_expression.type == UNARY_SIGNED_CONSTANT);
-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;
{
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);
const char *src_string;
assert(node->type == NODE_UNARY_EXPRESSION);
int alias_item_nr = 0;
int ret;
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++;
if (alias_item_nr != 0)
g_string_append(str, " ");
alias_item_nr++;
g_string_free(str, TRUE);
return 0;
}
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");
g_string_append(str, " *");
if (iter->u.pointer.const_qualifier)
g_string_append(str, " const");
}
if (!nested_declaration) {
}
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)) {
}
/* create array/sequence, pass nested_declaration as child. */
}
/* 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;
}
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);
struct ctf_node, siblings);
assert(first->type == NODE_UNARY_EXPRESSION);
int ctf_struct_type_declarators_visit(FILE *fd, int depth,
struct declaration_struct *struct_declaration,
struct ctf_node *type_specifier_list,
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;
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,
struct declaration *field_declaration;
field_declaration = ctf_type_declarator_visit(fd, depth,
int ctf_variant_type_declarators_visit(FILE *fd, int depth,
struct declaration_untagged_variant *untagged_variant_declaration,
struct ctf_node *type_specifier_list,
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;
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,
struct declaration *field_declaration;
field_declaration = ctf_type_declarator_visit(fd, depth,
static
int ctf_typedef_visit(FILE *fd, int depth, struct declaration_scope *scope,
struct ctf_node *type_specifier_list,
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;
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;
struct declaration *type_declaration;
int ret;
* Create target type declaration.
*/
* 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 = _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,
struct ctf_node, siblings);
type_declaration = ctf_type_declarator_visit(fd, depth,
target->u.typealias_target.type_specifier_list,
* Create alias identifier.
*/
* 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);
struct ctf_node, siblings);
alias_q = create_typealias_identifier(fd, depth,
alias->u.typealias_alias.type_specifier_list, node);
static
struct declaration *ctf_declaration_struct_visit(FILE *fd,
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)
{
struct declaration_scope *declaration_scope,
struct ctf_trace *trace)
{
- 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__);
ret = get_unary_unsigned(min_align, &min_align_value);
if (ret) {
fprintf(fd, "[error] %s: unexpected unary expression for structure \"align\" attribute\n", __func__);
}
struct_declaration = struct_declaration_new(declaration_scope,
min_align_value);
}
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)
ret = ctf_struct_declaration_list_visit(fd, depth + 1, iter,
struct_declaration, trace);
if (ret)
static
struct declaration *ctf_declaration_variant_visit(FILE *fd,
int depth, const char *name, const char *choice,
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)
{
int has_body, struct declaration_scope *declaration_scope,
struct ctf_trace *trace)
{
}
}
untagged_variant_declaration = untagged_variant_declaration_new(declaration_scope);
}
}
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)
ret = ctf_variant_declaration_list_visit(fd, depth + 1, iter,
untagged_variant_declaration, trace);
if (ret)
int64_t start, end;
int nr_vals = 0;
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);
int64_t *target;
assert(iter->type == NODE_UNARY_EXPRESSION);
uint64_t start, end;
int nr_vals = 0;
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);
uint64_t *target;
assert(iter->type == NODE_UNARY_EXPRESSION);
struct declaration *ctf_declaration_enum_visit(FILE *fd, int depth,
const char *name,
struct ctf_node *container_type,
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)
int has_body,
struct declaration_scope *declaration_scope,
struct ctf_trace *trace)
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 */
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;
ret = ctf_enumerator_list_visit(fd, depth + 1, iter, enum_declaration);
if (ret)
goto error;
static
struct declaration *ctf_declaration_integer_visit(FILE *fd, int depth,
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;
struct ctf_trace *trace)
{
struct ctf_node *expression;
struct ctf_clock *clock = NULL;
struct declaration_integer *integer_declaration;
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;
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);
assert(left->u.unary_expression.type == UNARY_STRING);
if (!strcmp(left->u.unary_expression.u.string, "signed")) {
signedness = get_boolean(fd, depth, right);
static
struct declaration *ctf_declaration_floating_point_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;
struct ctf_trace *trace)
{
struct ctf_node *expression;
int has_alignment = 0, has_exp_dig = 0, has_mant_dig = 0;
struct declaration_float *float_declaration;
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;
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);
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);
static
struct declaration *ctf_declaration_string_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;
struct ctf_trace *trace)
{
struct ctf_node *expression;
enum ctf_string_encoding encoding = CTF_STRING_UTF8;
struct declaration_string *string_declaration;
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;
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) {
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) {
assert(type_specifier_list->type == NODE_TYPE_SPECIFIER_LIST);
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);
assert(first->type == NODE_TYPE_SPECIFIER);
goto error;
}
declaration = ctf_type_specifier_list_visit(fd, depth,
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) {
struct ctf_node, siblings),
event->declaration_scope, trace);
if (!declaration) {
goto error;
}
declaration = ctf_type_specifier_list_visit(fd, depth,
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) {
struct ctf_node, siblings),
event->declaration_scope, trace);
if (!declaration) {
event = g_new0(struct ctf_event, 1);
event->declaration_scope = new_declaration_scope(parent_declaration_scope);
event->loglevel = -1;
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;
ret = ctf_event_declaration_visit(fd, depth + 1, iter, event, trace);
if (ret)
goto error;
goto error;
}
declaration = ctf_type_specifier_list_visit(fd, depth,
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) {
struct ctf_node, siblings),
stream->declaration_scope, trace);
if (!declaration) {
goto error;
}
declaration = ctf_type_specifier_list_visit(fd, depth,
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) {
struct ctf_node, siblings),
stream->declaration_scope, trace);
if (!declaration) {
goto error;
}
declaration = ctf_type_specifier_list_visit(fd, depth,
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) {
struct ctf_node, siblings),
stream->declaration_scope, trace);
if (!declaration) {
stream->event_quark_to_id = g_hash_table_new(g_direct_hash, g_direct_equal);
stream->streams = g_ptr_array_new();
if (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;
ret = ctf_stream_declaration_visit(fd, depth + 1, iter, stream, trace);
if (ret)
goto error;
struct ctf_node *right;
int byte_order;
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;
byte_order = get_trace_byte_order(fd, depth, right);
if (byte_order < 0)
return -EINVAL;
goto error;
}
declaration = ctf_type_specifier_list_visit(fd, depth,
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) {
struct ctf_node, siblings),
trace->declaration_scope, trace);
if (!declaration) {
return -EEXIST;
trace->declaration_scope = new_declaration_scope(trace->root_declaration_scope);
trace->streams = g_ptr_array_new();
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;
ret = ctf_trace_declaration_visit(fd, depth + 1, iter, trace);
if (ret)
goto error;
} else if (!strcmp(left, "absolute")) {
struct ctf_node *right;
} 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__);
ret = get_boolean(fd, depth, right);
if (ret < 0) {
fprintf(fd, "[error] %s: unexpected \"absolute\" right member\n", __func__);
clock = g_new0(struct ctf_clock, 1);
/* Default clock frequency is set to 1000000000 */
clock->freq = 1000000000ULL;
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;
ret = ctf_clock_declaration_visit(fd, depth + 1, iter, clock, trace);
if (ret)
goto error;
trace->env.sysname[0] = '\0';
trace->env.release[0] = '\0';
trace->env.version[0] = '\0';
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;
ret = ctf_env_declaration_visit(fd, depth + 1, iter, trace);
if (ret)
goto error;
* declarations need to query clock hash table,
* so clock need to be treated first.
*/
* 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 {
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) {
ret = ctf_clock_visit(fd, depth + 1, iter,
trace);
if (ret) {
- 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) {
siblings) {
ret = ctf_root_declaration_visit(fd, depth + 1, iter, trace);
if (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_trace_visit(fd, depth + 1, iter, trace);
if (ret == -EINTR) {
free_declaration_scope(trace->root_declaration_scope);
ret = ctf_trace_visit(fd, depth + 1, iter, trace);
if (ret == -EINTR) {
free_declaration_scope(trace->root_declaration_scope);
ret = -EINVAL;
goto error;
}
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;
}
}
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) {
ret = ctf_stream_visit(fd, depth + 1, iter,
trace->root_declaration_scope, trace);
if (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_event_visit(fd, depth + 1, iter,
trace->root_declaration_scope, trace);
if (ret) {
ret = ctf_event_visit(fd, depth + 1, iter,
trace->root_declaration_scope, trace);
if (ret) {
- 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);
siblings) {
iter->parent = node;
ret = ctf_visitor_parent_links(fd, depth + 1, iter);
return ret;
}
if (!node->u.type_declarator.u.nested.abstract_array) {
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);
siblings) {
iter->parent = node;
ret = ctf_visitor_parent_links(fd, depth + 1, iter);
switch (node->type) {
case NODE_ROOT:
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;
}
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;
}
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;
}
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;
}
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)
iter->parent = node;
ret = ctf_visitor_parent_links(fd, depth + 1, iter);
if (ret)
- 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)
iter->parent = node;
ret = ctf_visitor_parent_links(fd, depth + 1, iter);
if (ret)
}
break;
case NODE_STREAM:
}
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)
iter->parent = node;
ret = ctf_visitor_parent_links(fd, depth + 1, iter);
if (ret)
- 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)
iter->parent = node;
ret = ctf_visitor_parent_links(fd, depth + 1, iter);
if (ret)
}
break;
case NODE_TRACE:
}
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)
iter->parent = node;
ret = ctf_visitor_parent_links(fd, depth + 1, iter);
if (ret)
}
break;
case NODE_CLOCK:
}
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)
iter->parent = node;
ret = ctf_visitor_parent_links(fd, depth + 1, iter);
if (ret)
case NODE_CTF_EXPRESSION:
depth++;
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;
}
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)
iter->parent = node;
ret = ctf_visitor_parent_links(fd, depth + 1, iter);
if (ret)
ret = ctf_visitor_parent_links(fd, depth + 1, node->u._typedef.type_specifier_list);
if (ret)
return ret;
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)
iter->parent = node;
ret = ctf_visitor_parent_links(fd, depth + 1, iter);
if (ret)
ret = ctf_visitor_parent_links(fd, depth + 1, node->u.typealias_target.type_specifier_list);
if (ret)
return ret;
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)
iter->parent = node;
ret = ctf_visitor_parent_links(fd, depth + 1, iter);
if (ret)
ret = ctf_visitor_parent_links(fd, depth + 1, node->u.typealias_alias.type_specifier_list);
if (ret)
return ret;
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)
iter->parent = node;
ret = ctf_visitor_parent_links(fd, depth + 1, iter);
if (ret)
break;
case NODE_TYPE_SPECIFIER_LIST:
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)
iter->parent = node;
ret = ctf_visitor_parent_links(fd, depth + 1, iter);
if (ret)
break;
case NODE_FLOATING_POINT:
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)
iter->parent = node;
ret = ctf_visitor_parent_links(fd, depth + 1, iter);
if (ret)
}
break;
case NODE_INTEGER:
}
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)
iter->parent = node;
ret = ctf_visitor_parent_links(fd, depth + 1, iter);
if (ret)
}
break;
case NODE_STRING:
}
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)
iter->parent = node;
ret = ctf_visitor_parent_links(fd, depth + 1, iter);
if (ret)
}
break;
case NODE_ENUMERATOR:
}
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)
iter->parent = node;
ret = ctf_visitor_parent_links(fd, depth + 1, iter);
if (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)
iter->parent = node;
ret = ctf_visitor_parent_links(fd, depth + 1, iter);
if (ret)
node->u.struct_or_variant_declaration.type_specifier_list);
if (ret)
return ret;
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)
iter->parent = node;
ret = ctf_visitor_parent_links(fd, depth + 1, iter);
if (ret)
}
break;
case NODE_VARIANT:
}
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)
iter->parent = node;
ret = ctf_visitor_parent_links(fd, depth + 1, iter);
if (ret)
}
break;
case NODE_STRUCT:
}
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;
}
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);
siblings) {
iter->parent = node;
ret = ctf_visitor_parent_links(fd, depth + 1, iter);
#include "ctf-parser.h"
#include "ctf-ast.h"
#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)
#define fprintf_dbg(fd, fmt, args...) fprintf(fd, "%s: " fmt, __func__, ## args)
switch (node->parent->type) {
case NODE_CTF_EXPRESSION:
is_ctf_exp = 1;
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;
siblings) {
if (iter == node) {
is_ctf_exp_left = 1;
switch (node->u.unary_expression.link) {
case UNARY_LINK_UNKNOWN:
/* We don't allow empty link except on the first node of the list */
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,
&node->parent->u.ctf_expression.left :
&node->parent->u.ctf_expression.right,
struct ctf_node,
goto errperm;
}
/* We don't allow link on the first node of the list */
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,
&node->parent->u.ctf_expression.left :
&node->parent->u.ctf_expression.right,
struct ctf_node,
goto errperm;
}
/* We don't allow link on the first node of the list */
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");
struct ctf_node,
siblings) == node) {
fprintf(fd, "[error]: semantic error (link \"...\" is not allowed on the first node of the unary expression list)\n");
/*
* A nested type declarator is not allowed to contain pointers.
*/
/*
* 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:
goto errperm;
break; /* OK */
case NODE_TYPEALIAS_TARGET:
*/
if (node->u.type_declarator.type == TYPEDEC_NESTED)
goto errperm;
*/
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:
siblings) {
switch (iter->u.type_specifier.type) {
case TYPESPEC_FLOATING_POINT:
case TYPESPEC_STRUCT:
case TYPESPEC_VARIANT:
case TYPESPEC_ENUM:
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:
goto errperm;
break;
default:
- 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)
siblings) {
ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
if (ret)
return ret;
}
if (!node->u.type_declarator.u.nested.abstract_array) {
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__);
siblings) {
if (iter->type != NODE_UNARY_EXPRESSION) {
fprintf(fd, "[error] %s: expecting unary expression as length\n", __func__);
switch (node->type) {
case NODE_ROOT:
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;
}
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;
}
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;
}
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;
ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
if (ret)
return ret;
- 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;
ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
if (ret)
return ret;
- 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;
ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
if (ret)
return ret;
- 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;
ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
if (ret)
return ret;
- 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;
ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
if (ret)
return ret;
- 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;
ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
if (ret)
return ret;
- 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;
}
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;
ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
if (ret)
return ret;
node->u._typedef.type_specifier_list);
if (ret)
return ret;
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;
ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
if (ret)
return ret;
if (ret)
return ret;
nr_declarators = 0;
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;
ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
if (ret)
return ret;
if (ret)
return ret;
nr_declarators = 0;
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;
ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
if (ret)
return ret;
case NODE_UNARY_EXPRESSION:
goto errperm;
}
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;
ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
if (ret)
return ret;
- 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;
ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
if (ret)
return ret;
- 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;
ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
if (ret)
return ret;
- 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
siblings) {
switch (count++) {
case 0: if (iter->type != NODE_UNARY_EXPRESSION
- 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;
ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
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;
ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
if (ret)
return ret;
node->u.struct_or_variant_declaration.type_specifier_list);
if (ret)
return ret;
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;
ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
if (ret)
return ret;
case NODE_UNARY_EXPRESSION:
goto errperm;
}
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;
ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
if (ret)
return ret;
case NODE_UNARY_EXPRESSION:
goto errperm;
}
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;
ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
if (ret)
return ret;
print_tabs(fd, depth);
fprintf(fd, "<type_specifier_list>\n");
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;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
fprintf(fd, "<type_declarator>\n");
depth++;
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");
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)
siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
fprintf(fd, "<length>\n");
print_tabs(fd, depth);
fprintf(fd, "</length>\n");
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");
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)
siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
case NODE_ROOT:
print_tabs(fd, depth);
fprintf(fd, "<root>\n");
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;
}
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;
}
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;
}
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;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
case NODE_EVENT:
print_tabs(fd, depth);
fprintf(fd, "<event>\n");
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;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
case NODE_STREAM:
print_tabs(fd, depth);
fprintf(fd, "<stream>\n");
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;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
case NODE_ENV:
print_tabs(fd, depth);
fprintf(fd, "<env>\n");
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;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
case NODE_TRACE:
print_tabs(fd, depth);
fprintf(fd, "<trace>\n");
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;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
case NODE_CLOCK:
print_tabs(fd, depth);
fprintf(fd, "<clock>\n");
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;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
depth++;
print_tabs(fd, depth);
fprintf(fd, "<left>\n");
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;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
print_tabs(fd, depth);
fprintf(fd, "<right>\n");
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;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
print_tabs(fd, depth);
fprintf(fd, "<type_declarator_list>\n");
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;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
print_tabs(fd, depth);
fprintf(fd, "<type_declarator_list>\n");
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;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
print_tabs(fd, depth);
fprintf(fd, "<type_declarator_list>\n");
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;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
case NODE_FLOATING_POINT:
print_tabs(fd, depth);
fprintf(fd, "<floating_point>\n");
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;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
case NODE_INTEGER:
print_tabs(fd, depth);
fprintf(fd, "<integer>\n");
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;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
case NODE_STRING:
print_tabs(fd, depth);
fprintf(fd, "<string>\n");
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;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
if (node->u.enumerator.id)
fprintf(fd, " id=\"%s\"", node->u.enumerator.id);
fprintf(fd, ">\n");
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;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
print_tabs(fd, depth);
fprintf(fd, "<enumerator_list>\n");
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;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
print_tabs(fd, depth);
fprintf(fd, "<type_declarator_list>\n");
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;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
if (node->u.variant.choice)
fprintf(fd, " choice=\"%s\"", node->u.variant.choice);
fprintf(fd, ">\n");
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;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
node->u._struct.name);
else
fprintf(fd, "<struct>\n");
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");
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");
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;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
#include <glib.h>
#include <errno.h>
#include <stdio.h>
#include <glib.h>
#include <errno.h>
#include <stdio.h>
struct walk_data {
FILE *fp;
struct walk_data {
FILE *fp;
babeltrace/context.h \
babeltrace/iterator.h \
babeltrace/trace-collection.h \
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
babeltracectfinclude_HEADERS = \
babeltrace/ctf/events.h
babeltrace/compiler.h \
babeltrace/context-internal.h \
babeltrace/iterator-internal.h \
babeltrace/compiler.h \
babeltrace/context-internal.h \
babeltrace/iterator-internal.h \
babeltrace/prio_heap.h \
babeltrace/types.h \
babeltrace/ctf-ir/metadata.h \
babeltrace/prio_heap.h \
babeltrace/types.h \
babeltrace/ctf-ir/metadata.h \
* all copies or substantial portions of the Software.
*/
* 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>
#include <stdint.h>
#include <stdio.h>
#include <glib.h>
struct mmap_stream {
int fd;
struct mmap_stream {
int fd;
- struct cds_list_head list;
+ struct bt_list_head list;
};
struct mmap_stream_list {
};
struct mmap_stream_list {
- struct cds_list_head head;
+ struct bt_list_head head;
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
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
/* 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. */
/* Basic type for the double-link list. */
- 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 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. */
/* Initialize a new list head. */
-#define CDS_INIT_LIST_HEAD(ptr) \
+#define BT_INIT_LIST_HEAD(ptr) \
(ptr)->next = (ptr)->prev = (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
/* 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;
{
head->next->prev = newp;
newp->next = head->next;
/* Add new element at the tail of the list. */
static inline void
/* 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;
{
head->prev->next = newp;
newp->next = head;
/* Remove element from list. */
static inline void
/* 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;
{
next->prev = prev;
prev->next = next;
/* Remove element from list. */
static inline void
/* 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
}
/* 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
}
/* 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;
{
_new->next = old->next;
_new->prev = old->prev;
/* Join two lists. */
static inline void
/* 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)
{
/* Do nothing if the list which gets added is empty. */
if (add != add->next)
/* Get typed element from list at a given position. */
/* 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. */
((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. */
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. */
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)
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->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->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->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;
}
{
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 */
};
struct enum_range_to_quark {
};
struct enum_range_to_quark {
- struct cds_list_head node;
+ struct bt_list_head node;
struct enum_range range;
GQuark quark;
};
struct enum_range range;
GQuark quark;
};
*/
struct enum_table {
GHashTable *value_to_quark_set; /* (value, GQuark GArray) */
*/
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) */
};
GHashTable *quark_to_range_set; /* (GQuark, range GArray) */
};
#include <babeltrace/compiler.h>
#include <babeltrace/format.h>
#include <babeltrace/compiler.h>
#include <babeltrace/format.h>
+#include <babeltrace/types.h>
#include <inttypes.h>
static
#include <inttypes.h>
static
#include <babeltrace/compiler.h>
#include <babeltrace/format.h>
#include <babeltrace/compiler.h>
#include <babeltrace/format.h>
+#include <babeltrace/types.h>
#include <stdint.h>
#include <glib.h>
#include <stdint.h>
#include <glib.h>
get_uint_v(&v));
/* Range lookup */
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) {
if (iter->range.start._unsigned > v || iter->range.end._unsigned < v)
continue;
if (!ranges) {
get_int_v(&v));
/* Range lookup */
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) {
if (iter->range.start._signed > v || iter->range.end._signed < v)
continue;
if (!ranges) {
struct enum_range_to_quark *rtoq;
rtoq = g_new(struct enum_range_to_quark, 1);
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;
rtoq->range.start._signed = start;
rtoq->range.end._signed = end;
rtoq->quark = q;
struct enum_range_to_quark *rtoq;
rtoq = g_new(struct enum_range_to_quark, 1);
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;
rtoq->range.start._unsigned = start;
rtoq->range.end._unsigned = end;
rtoq->quark = q;
struct enum_range_to_quark *iter, *tmp;
g_hash_table_destroy(enum_declaration->table.value_to_quark_set);
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);
g_free(iter);
}
g_hash_table_destroy(enum_declaration->table.quark_to_range_set);
enum_val_equal,
enum_val_free,
enum_range_set_free);
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);
enum_declaration->table.quark_to_range_set = g_hash_table_new_full(g_direct_hash,
g_direct_equal,
NULL, enum_range_set_free);
#include <babeltrace/compiler.h>
#include <babeltrace/format.h>
#include <babeltrace/compiler.h>
#include <babeltrace/format.h>
+#include <babeltrace/types.h>
#include <endian.h>
static
#include <endian.h>
static
#include <babeltrace/compiler.h>
#include <babeltrace/align.h>
#include <babeltrace/format.h>
#include <babeltrace/compiler.h>
#include <babeltrace/align.h>
#include <babeltrace/format.h>
+#include <babeltrace/types.h>
#include <stdint.h>
static
#include <stdint.h>
static
#include <babeltrace/compiler.h>
#include <babeltrace/format.h>
#include <babeltrace/compiler.h>
#include <babeltrace/format.h>
+#include <babeltrace/types.h>
#include <inttypes.h>
static
#include <inttypes.h>
static
#include <babeltrace/compiler.h>
#include <babeltrace/align.h>
#include <babeltrace/format.h>
#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,
static
struct definition *_string_definition_new(struct declaration *declaration,
#include <babeltrace/compiler.h>
#include <babeltrace/format.h>
#include <babeltrace/compiler.h>
#include <babeltrace/format.h>
+#include <babeltrace/types.h>
#include <errno.h>
#ifndef max
#include <errno.h>
#ifndef max
#include <babeltrace/format.h>
#include <babeltrace/babeltrace-internal.h>
#include <babeltrace/format.h>
#include <babeltrace/babeltrace-internal.h>
+#include <babeltrace/types.h>
#include <limits.h>
#include <glib.h>
#include <errno.h>
#include <limits.h>
#include <glib.h>
#include <errno.h>
#include <babeltrace/compiler.h>
#include <babeltrace/format.h>
#include <babeltrace/compiler.h>
#include <babeltrace/format.h>
+#include <babeltrace/types.h>
#include <errno.h>
static
#include <errno.h>
static