"stream-class-addr=%p, stream-class-id=%" PRId64,
notit, notit->meta.sc,
notit->meta.sc->id);
- stream = bt_get(notit->medium.medops.borrow_stream(
+ stream = bt_object_get_ref(notit->medium.medops.borrow_stream(
notit->meta.sc->ir_sc, notit->cur_data_stream_id,
notit->medium.data));
BT_LOGV("User function returned: stream-addr=%p", stream);
goto end;
}
- BT_MOVE(notit->stream, stream);
+ BT_OBJECT_MOVE_REF(notit->stream, stream);
end:
- bt_put(stream);
+ bt_object_put_ref(stream);
return status;
}
goto end;
error:
- BT_PUT(packet);
+ BT_OBJECT_PUT_REF_AND_RESET(packet);
status = BT_NOTIF_ITER_STATUS_ERROR;
end:
- BT_MOVE(notit->packet, packet);
+ BT_OBJECT_MOVE_REF(notit->packet, packet);
return status;
}
goto end;
error:
- BT_PUT(notif);
+ BT_OBJECT_PUT_REF_AND_RESET(notif);
status = BT_NOTIF_ITER_STATUS_ERROR;
end:
- BT_MOVE(notit->event_notif, notif);
+ BT_OBJECT_MOVE_REF(notit->event_notif, notif);
return status;
}
stack_clear(notit->stack);
notit->meta.sc = NULL;
notit->meta.ec = NULL;
- BT_PUT(notit->packet);
- BT_PUT(notit->stream);
- BT_PUT(notit->event_notif);
+ BT_OBJECT_PUT_REF_AND_RESET(notit->packet);
+ BT_OBJECT_PUT_REF_AND_RESET(notit->stream);
+ BT_OBJECT_PUT_REF_AND_RESET(notit->event_notif);
release_all_dscopes(notit);
notit->cur_dscope_field = NULL;
notit->cur_packet_offset);
stack_clear(notit->stack);
notit->meta.ec = NULL;
- BT_PUT(notit->packet);
- BT_PUT(notit->event_notif);
+ BT_OBJECT_PUT_REF_AND_RESET(notit->packet);
+ BT_OBJECT_PUT_REF_AND_RESET(notit->event_notif);
release_all_dscopes(notit);
notit->cur_dscope_field = NULL;
base_fc = bt_field_borrow_class(base_field);
BT_ASSERT(base_fc);
- switch (bt_field_class_get_id(base_fc)) {
- case BT_FIELD_CLASS_ID_STRUCTURE:
+ switch (bt_field_class_get_type(base_fc)) {
+ case BT_FIELD_CLASS_TYPE_STRUCTURE:
{
BT_ASSERT(index <
bt_field_class_structure_get_member_count(
base_field, index);
break;
}
- case BT_FIELD_CLASS_ID_STATIC_ARRAY:
- case BT_FIELD_CLASS_ID_DYNAMIC_ARRAY:
+ case BT_FIELD_CLASS_TYPE_STATIC_ARRAY:
+ case BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY:
BT_ASSERT(index < bt_field_array_get_length(base_field));
next_field = bt_field_array_borrow_element_field_by_index(
base_field, index);
break;
- case BT_FIELD_CLASS_ID_VARIANT:
+ case BT_FIELD_CLASS_TYPE_VARIANT:
BT_ASSERT(index == 0);
next_field = bt_field_variant_borrow_selected_option_field(
base_field);
BT_LOGV("Unsigned integer function called from BFCR: "
"notit-addr=%p, bfcr-addr=%p, fc-addr=%p, "
- "fc-id=%d, fc-in-ir=%d, value=%" PRIu64,
- notit, notit->bfcr, fc, fc->id, fc->in_ir, value);
+ "fc-type=%d, fc-in-ir=%d, value=%" PRIu64,
+ notit, notit->bfcr, fc, fc->type, fc->in_ir, value);
if (likely(int_fc->meaning == CTF_FIELD_CLASS_MEANING_NONE)) {
goto update_def_clock;
field = borrow_next_field(notit);
BT_ASSERT(field);
BT_ASSERT(bt_field_borrow_class(field) == fc->ir_fc);
- BT_ASSERT(bt_field_get_class_id(field) == BT_FIELD_CLASS_ID_UNSIGNED_INTEGER ||
- bt_field_get_class_id(field) == BT_FIELD_CLASS_ID_UNSIGNED_ENUMERATION);
+ BT_ASSERT(bt_field_get_class_type(field) == BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER ||
+ bt_field_get_class_type(field) == BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION);
bt_field_unsigned_integer_set_value(field, value);
stack_top(notit->stack)->index++;
BT_LOGV("Unsigned integer character function called from BFCR: "
"notit-addr=%p, bfcr-addr=%p, fc-addr=%p, "
- "fc-id=%d, fc-in-ir=%d, value=%" PRIu64,
- notit, notit->bfcr, fc, fc->id, fc->in_ir, value);
+ "fc-type=%d, fc-in-ir=%d, value=%" PRIu64,
+ notit, notit->bfcr, fc, fc->type, fc->in_ir, value);
BT_ASSERT(int_fc->meaning == CTF_FIELD_CLASS_MEANING_NONE);
BT_ASSERT(!int_fc->mapped_clock_class);
BT_ASSERT(int_fc->storing_index < 0);
}
string_field = stack_top(notit->stack)->base;
- BT_ASSERT(bt_field_get_class_id(string_field) == BT_FIELD_CLASS_ID_STRING);
+ BT_ASSERT(bt_field_get_class_type(string_field) == BT_FIELD_CLASS_TYPE_STRING);
/* Append character */
str[0] = (char) value;
BT_LOGV("Signed integer function called from BFCR: "
"notit-addr=%p, bfcr-addr=%p, fc-addr=%p, "
- "fc-id=%d, fc-in-ir=%d, value=%" PRId64,
- notit, notit->bfcr, fc, fc->id, fc->in_ir, value);
+ "fc-type=%d, fc-in-ir=%d, value=%" PRId64,
+ notit, notit->bfcr, fc, fc->type, fc->in_ir, value);
BT_ASSERT(int_fc->meaning == CTF_FIELD_CLASS_MEANING_NONE);
if (unlikely(int_fc->storing_index >= 0)) {
field = borrow_next_field(notit);
BT_ASSERT(field);
BT_ASSERT(bt_field_borrow_class(field) == fc->ir_fc);
- BT_ASSERT(bt_field_get_class_id(field) == BT_FIELD_CLASS_ID_SIGNED_INTEGER ||
- bt_field_get_class_id(field) == BT_FIELD_CLASS_ID_SIGNED_ENUMERATION);
+ BT_ASSERT(bt_field_get_class_type(field) == BT_FIELD_CLASS_TYPE_SIGNED_INTEGER ||
+ bt_field_get_class_type(field) == BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION);
bt_field_signed_integer_set_value(field, value);
stack_top(notit->stack)->index++;
BT_LOGV("Floating point number function called from BFCR: "
"notit-addr=%p, bfcr-addr=%p, fc-addr=%p, "
- "fc-id=%d, fc-in-ir=%d, value=%f",
- notit, notit->bfcr, fc, fc->id, fc->in_ir, value);
+ "fc-type=%d, fc-in-ir=%d, value=%f",
+ notit, notit->bfcr, fc, fc->type, fc->in_ir, value);
BT_ASSERT(fc->in_ir);
field = borrow_next_field(notit);
BT_ASSERT(field);
BT_ASSERT(bt_field_borrow_class(field) == fc->ir_fc);
- BT_ASSERT(bt_field_get_class_id(field) == BT_FIELD_CLASS_ID_REAL);
+ BT_ASSERT(bt_field_get_class_type(field) == BT_FIELD_CLASS_TYPE_REAL);
bt_field_real_set_value(field, value);
stack_top(notit->stack)->index++;
return status;
BT_LOGV("String (beginning) function called from BFCR: "
"notit-addr=%p, bfcr-addr=%p, fc-addr=%p, "
- "fc-id=%d, fc-in-ir=%d",
- notit, notit->bfcr, fc, fc->id, fc->in_ir);
+ "fc-type=%d, fc-in-ir=%d",
+ notit, notit->bfcr, fc, fc->type, fc->in_ir);
BT_ASSERT(fc->in_ir);
field = borrow_next_field(notit);
BT_ASSERT(field);
BT_ASSERT(bt_field_borrow_class(field) == fc->ir_fc);
- BT_ASSERT(bt_field_get_class_id(field) == BT_FIELD_CLASS_ID_STRING);
+ BT_ASSERT(bt_field_get_class_type(field) == BT_FIELD_CLASS_TYPE_STRING);
ret = bt_field_string_clear(field);
BT_ASSERT(ret == 0);
BT_LOGV("String (substring) function called from BFCR: "
"notit-addr=%p, bfcr-addr=%p, fc-addr=%p, "
- "fc-id=%d, fc-in-ir=%d, string-length=%zu",
- notit, notit->bfcr, fc, fc->id, fc->in_ir,
+ "fc-type=%d, fc-in-ir=%d, string-length=%zu",
+ notit, notit->bfcr, fc, fc->type, fc->in_ir,
len);
BT_ASSERT(fc->in_ir);
field = stack_top(notit->stack)->base;
BT_LOGV("String (end) function called from BFCR: "
"notit-addr=%p, bfcr-addr=%p, fc-addr=%p, "
- "fc-id=%d, fc-in-ir=%d",
- notit, notit->bfcr, fc, fc->id, fc->in_ir);
+ "fc-type=%d, fc-in-ir=%d",
+ notit, notit->bfcr, fc, fc->type, fc->in_ir);
BT_ASSERT(fc->in_ir);
/* Pop string field */
BT_LOGV("Compound (beginning) function called from BFCR: "
"notit-addr=%p, bfcr-addr=%p, fc-addr=%p, "
- "fc-id=%d, fc-in-ir=%d",
- notit, notit->bfcr, fc, fc->id, fc->in_ir);
+ "fc-type=%d, fc-in-ir=%d",
+ notit, notit->bfcr, fc, fc->type, fc->in_ir);
if (!fc->in_ir) {
goto end;
* Change BFCR "unsigned int" callback if it's a text
* array/sequence.
*/
- if (fc->id == CTF_FIELD_CLASS_ID_ARRAY ||
- fc->id == CTF_FIELD_CLASS_ID_SEQUENCE) {
+ if (fc->type == CTF_FIELD_CLASS_TYPE_ARRAY ||
+ fc->type == CTF_FIELD_CLASS_TYPE_SEQUENCE) {
struct ctf_field_class_array_base *array_fc = (void *) fc;
if (array_fc->is_text) {
int ret;
- BT_ASSERT(bt_field_get_class_id(field) ==
- BT_FIELD_CLASS_ID_STRING);
+ BT_ASSERT(bt_field_get_class_type(field) ==
+ BT_FIELD_CLASS_TYPE_STRING);
notit->done_filling_string = false;
ret = bt_field_string_clear(field);
BT_ASSERT(ret == 0);
BT_LOGV("Compound (end) function called from BFCR: "
"notit-addr=%p, bfcr-addr=%p, fc-addr=%p, "
- "fc-id=%d, fc-in-ir=%d",
- notit, notit->bfcr, fc, fc->id, fc->in_ir);
+ "fc-type=%d, fc-in-ir=%d",
+ notit, notit->bfcr, fc, fc->type, fc->in_ir);
if (!fc->in_ir) {
goto end;
* Reset BFCR "unsigned int" callback if it's a text
* array/sequence.
*/
- if (fc->id == CTF_FIELD_CLASS_ID_ARRAY ||
- fc->id == CTF_FIELD_CLASS_ID_SEQUENCE) {
+ if (fc->type == CTF_FIELD_CLASS_TYPE_ARRAY ||
+ fc->type == CTF_FIELD_CLASS_TYPE_SEQUENCE) {
struct ctf_field_class_array_base *array_fc = (void *) fc;
if (array_fc->is_text) {
- BT_ASSERT(bt_field_get_class_id(
+ BT_ASSERT(bt_field_get_class_type(
stack_top(notit->stack)->base) ==
- BT_FIELD_CLASS_ID_STRING);
+ BT_FIELD_CLASS_TYPE_STRING);
bt_bfcr_set_unsigned_int_cb(notit->bfcr,
bfcr_unsigned_int_cb);
}
status = set_current_stream(notit);
if (status != BT_NOTIF_ITER_STATUS_OK) {
- BT_PUT(ret);
+ BT_OBJECT_PUT_REF_AND_RESET(ret);
goto end;
}
}
- BT_PUT(notit->packet);
+ BT_OBJECT_PUT_REF_AND_RESET(notit->packet);
*notification = notif;
}
void bt_notif_iter_destroy(struct bt_notif_iter *notit)
{
- BT_PUT(notit->packet);
- BT_PUT(notit->stream);
+ BT_OBJECT_PUT_REF_AND_RESET(notit->packet);
+ BT_OBJECT_PUT_REF_AND_RESET(notit->stream);
release_all_dscopes(notit);
BT_LOGD("Destroying CTF plugin notification iterator: addr=%p", notit);