assert(!ret);
}
-int _ctf_float_copy(struct stream_pos *destp,
+static int _ctf_float_copy(struct bt_stream_pos *destp,
struct definition_float *dest_definition,
- struct stream_pos *srcp,
+ struct bt_stream_pos *srcp,
const struct definition_float *src_definition)
{
int ret;
return 0;
}
-int ctf_float_read(struct stream_pos *ppos, struct definition *definition)
+int ctf_float_read(struct bt_stream_pos *ppos, struct bt_definition *definition)
{
struct definition_float *float_definition =
container_of(definition, struct definition_float, p);
float_definition->declaration;
struct ctf_stream_pos *pos = ctf_pos(ppos);
union doubleIEEE754 u;
- struct definition *tmpdef;
+ struct bt_definition *tmpdef;
struct definition_float *tmpfloat;
struct ctf_stream_pos destp;
struct mmap_align mma;
}
end_unref:
- definition_unref(tmpdef);
+ bt_definition_unref(tmpdef);
end:
float_unlock();
return ret;
}
-int ctf_float_write(struct stream_pos *ppos, struct definition *definition)
+int ctf_float_write(struct bt_stream_pos *ppos, struct bt_definition *definition)
{
struct definition_float *float_definition =
container_of(definition, struct definition_float, p);
float_definition->declaration;
struct ctf_stream_pos *pos = ctf_pos(ppos);
union doubleIEEE754 u;
- struct definition *tmpdef;
+ struct bt_definition *tmpdef;
struct definition_float *tmpfloat;
struct ctf_stream_pos srcp;
struct mmap_align mma;
ret = _ctf_float_copy(ppos, float_definition, &srcp.parent, tmpfloat);
end_unref:
- definition_unref(tmpdef);
+ bt_definition_unref(tmpdef);
end:
float_unlock();
return ret;
}
+static
void __attribute__((constructor)) ctf_float_init(void)
{
static_float_declaration =
- float_declaration_new(FLT_MANT_DIG,
+ bt_float_declaration_new(FLT_MANT_DIG,
sizeof(float) * CHAR_BIT - FLT_MANT_DIG,
BYTE_ORDER,
__alignof__(float));
static_double_declaration =
- float_declaration_new(DBL_MANT_DIG,
+ bt_float_declaration_new(DBL_MANT_DIG,
sizeof(double) * CHAR_BIT - DBL_MANT_DIG,
BYTE_ORDER,
__alignof__(double));
}
+static
void __attribute__((destructor)) ctf_float_fini(void)
{
- declaration_unref(&static_float_declaration->p);
- declaration_unref(&static_double_declaration->p);
+ bt_declaration_unref(&static_float_declaration->p);
+ bt_declaration_unref(&static_double_declaration->p);
}