{
enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
- if (unlikely(buf_available_bits(notit) == 0)) {
+ if (G_UNLIKELY(buf_available_bits(notit) == 0)) {
/*
* This _cannot_ return BT_MSG_ITER_STATUS_OK
* _and_ no bits.
/* Check if we have some content left */
if (notit->cur_exp_packet_content_size >= 0) {
- if (unlikely(packet_at(notit) ==
+ if (G_UNLIKELY(packet_at(notit) ==
notit->cur_exp_packet_content_size)) {
/* No more events! */
BT_LOGV("Reached end of packet: notit-addr=%p, "
"cur=%zu", notit, packet_at(notit));
notit->state = STATE_EMIT_MSG_PACKET_END_MULTI;
goto end;
- } else if (unlikely(packet_at(notit) >
+ } else if (G_UNLIKELY(packet_at(notit) >
notit->cur_exp_packet_content_size)) {
/* That's not supposed to happen */
BT_LOGV("Before decoding event header field: cursor is passed the packet's content: "
"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)) {
+ if (G_LIKELY(int_fc->meaning == CTF_FIELD_CLASS_MEANING_NONE)) {
goto update_def_clock;
}
}
update_def_clock:
- if (unlikely(int_fc->mapped_clock_class)) {
+ if (G_UNLIKELY(int_fc->mapped_clock_class)) {
update_default_clock(notit, value, int_fc->base.size);
}
- if (unlikely(int_fc->storing_index >= 0)) {
+ if (G_UNLIKELY(int_fc->storing_index >= 0)) {
g_array_index(notit->stored_values, uint64_t,
(uint64_t) int_fc->storing_index) = value;
}
- if (unlikely(!fc->in_ir)) {
+ if (G_UNLIKELY(!fc->in_ir)) {
goto end;
}
BT_ASSERT(!int_fc->mapped_clock_class);
BT_ASSERT(int_fc->storing_index < 0);
- if (unlikely(!fc->in_ir)) {
+ if (G_UNLIKELY(!fc->in_ir)) {
goto end;
}
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)) {
+ if (G_UNLIKELY(int_fc->storing_index >= 0)) {
g_array_index(notit->stored_values, uint64_t,
(uint64_t) int_fc->storing_index) = (uint64_t) value;
}
- if (unlikely(!fc->in_ir)) {
+ if (G_UNLIKELY(!fc->in_ir)) {
goto end;
}
"fc-type=%d, fc-in-ir=%d, value=%f",
notit, notit->bfcr, fc, fc->type, fc->in_ir, value);
- if (unlikely(!fc->in_ir)) {
+ if (G_UNLIKELY(!fc->in_ir)) {
goto end;
}
"fc-type=%d, fc-in-ir=%d",
notit, notit->bfcr, fc, fc->type, fc->in_ir);
- if (unlikely(!fc->in_ir)) {
+ if (G_UNLIKELY(!fc->in_ir)) {
goto end;
}
notit, notit->bfcr, fc, fc->type, fc->in_ir,
len);
- if (unlikely(!fc->in_ir)) {
+ if (G_UNLIKELY(!fc->in_ir)) {
goto end;
}
"fc-type=%d, fc-in-ir=%d",
notit, notit->bfcr, fc, fc->type, fc->in_ir);
- if (unlikely(!fc->in_ir)) {
+ if (G_UNLIKELY(!fc->in_ir)) {
goto end;
}
while (true) {
status = handle_state(notit);
- if (unlikely(status == BT_MSG_ITER_STATUS_AGAIN)) {
+ if (G_UNLIKELY(status == BT_MSG_ITER_STATUS_AGAIN)) {
BT_LOGV_STR("Medium returned BT_MSG_ITER_STATUS_AGAIN.");
goto end;
- } else if (unlikely(status != BT_MSG_ITER_STATUS_OK)) {
+ } else if (G_UNLIKELY(status != BT_MSG_ITER_STATUS_OK)) {
BT_LOGW("Cannot handle state: notit-addr=%p, state=%s",
notit, state_string(notit->state));
goto end;
while (true) {
status = handle_state(notit);
- if (unlikely(status == BT_MSG_ITER_STATUS_AGAIN)) {
+ if (G_UNLIKELY(status == BT_MSG_ITER_STATUS_AGAIN)) {
BT_LOGV_STR("Medium returned BT_MSG_ITER_STATUS_AGAIN.");
goto end;
- } else if (unlikely(status != BT_MSG_ITER_STATUS_OK)) {
+ } else if (G_UNLIKELY(status != BT_MSG_ITER_STATUS_OK)) {
BT_LOGW("Cannot handle state: notit-addr=%p, state=%s",
notit, state_string(notit->state));
goto end;