int lttng_add_comm_to_ctx(struct lttng_ctx **ctx)
{
struct lttng_ctx_field *field;
- int ret;
field = lttng_append_context(ctx);
if (!field)
- return ret;
+ return -ENOMEM;
field->event_field.name = "comm";
field->event_field.type.atype = atype_array;
field->event_field.type.u.array.elem_type.atype = atype_integer;
int lttng_add_nice_to_ctx(struct lttng_ctx **ctx)
{
struct lttng_ctx_field *field;
- int ret;
field = lttng_append_context(ctx);
if (!field)
- return ret;
+ return -ENOMEM;
field->event_field.name = "nice";
field->event_field.type.atype = atype_integer;
field->event_field.type.u.basic.integer.size = sizeof(int) * CHAR_BIT;
int lttng_add_pid_to_ctx(struct lttng_ctx **ctx)
{
struct lttng_ctx_field *field;
- int ret;
field = lttng_append_context(ctx);
if (!field)
- return ret;
+ return -ENOMEM;
field->event_field.name = "pid";
field->event_field.type.atype = atype_integer;
field->event_field.type.u.basic.integer.size = sizeof(pid_t) * CHAR_BIT;
int lttng_add_ppid_to_ctx(struct lttng_ctx **ctx)
{
struct lttng_ctx_field *field;
- int ret;
field = lttng_append_context(ctx);
if (!field)
- return ret;
+ return -ENOMEM;
field->event_field.name = "ppid";
field->event_field.type.atype = atype_integer;
field->event_field.type.u.basic.integer.size = sizeof(pid_t) * CHAR_BIT;
field = lttng_append_context(ctx);
if (!field)
- return ret;
+ return -ENOMEM;
field->event_field.name = "prio";
field->event_field.type.atype = atype_integer;
field->event_field.type.u.basic.integer.size = sizeof(int) * CHAR_BIT;
int lttng_add_tid_to_ctx(struct lttng_ctx **ctx)
{
struct lttng_ctx_field *field;
- int ret;
field = lttng_append_context(ctx);
if (!field)
- return ret;
+ return -ENOMEM;
field->event_field.name = "tid";
field->event_field.type.atype = atype_integer;
field->event_field.type.u.basic.integer.size = sizeof(pid_t) * CHAR_BIT;
int lttng_add_vpid_to_ctx(struct lttng_ctx **ctx)
{
struct lttng_ctx_field *field;
- int ret;
field = lttng_append_context(ctx);
if (!field)
- return ret;
+ return -ENOMEM;
field->event_field.name = "vpid";
field->event_field.type.atype = atype_integer;
field->event_field.type.u.basic.integer.size = sizeof(pid_t) * CHAR_BIT;
int lttng_add_vppid_to_ctx(struct lttng_ctx **ctx)
{
struct lttng_ctx_field *field;
- int ret;
field = lttng_append_context(ctx);
if (!field)
- return ret;
+ return -ENOMEM;
field->event_field.name = "vppid";
field->event_field.type.atype = atype_integer;
field->event_field.type.u.basic.integer.size = sizeof(pid_t) * CHAR_BIT;
field = lttng_append_context(ctx);
if (!field)
- return ret;
+ return -ENOMEM;
field->event_field.name = "vtid";
field->event_field.type.atype = atype_integer;
field->event_field.type.u.basic.integer.size = sizeof(pid_t) * CHAR_BIT;