Contexts for RT debugging
[lttng-modules.git] / lttng-abi.c
index d47280f502f61c3c4a5792752443030caeb58c2b..b3de09264783cd69c7996eb53515182aa205768f 100644 (file)
@@ -236,6 +236,14 @@ long lttng_abi_add_context(struct file *file,
                return lttng_add_hostname_to_ctx(ctx);
        case LTTNG_KERNEL_CONTEXT_CPU_ID:
                return lttng_add_cpu_id_to_ctx(ctx);
+       case LTTNG_KERNEL_CONTEXT_INTERRUPTIBLE:
+               return lttng_add_interruptible_to_ctx(ctx);
+       case LTTNG_KERNEL_CONTEXT_NEED_RESCHEDULE:
+               return lttng_add_need_reschedule_to_ctx(ctx);
+       case LTTNG_KERNEL_CONTEXT_PREEMPTIBLE:
+               return lttng_add_preemptible_to_ctx(ctx);
+       case LTTNG_KERNEL_CONTEXT_MIGRATABLE:
+               return lttng_add_migratable_to_ctx(ctx);
        default:
                return -EINVAL;
        }
@@ -1676,6 +1684,7 @@ int __init lttng_abi_init(void)
        int ret = 0;
 
        wrapper_vmalloc_sync_all();
+       lttng_clock_ref();
        lttng_proc_dentry = proc_create_data("lttng", S_IRUSR | S_IWUSR, NULL,
                                        &lttng_fops, NULL);
        
@@ -1685,14 +1694,17 @@ int __init lttng_abi_init(void)
                goto error;
        }
        lttng_stream_override_ring_buffer_fops();
+       return 0;
 
 error:
+       lttng_clock_unref();
        return ret;
 }
 
 /* No __exit annotation because used by init error path too. */
 void lttng_abi_exit(void)
 {
+       lttng_clock_unref();
        if (lttng_proc_dentry)
                remove_proc_entry("lttng", NULL);
 }
This page took 0.023472 seconds and 4 git commands to generate.