vthread: allow programs to have threads exit on halt.
[akaros.git] / user / vmm / include / vmm / sched.h
index c9a7136..a098cf7 100644 (file)
@@ -30,6 +30,7 @@ struct guest_thread {
        struct uthread                          uthread;
        struct ctlr_thread                      *buddy;
        unsigned int                            gpc_id;
+       bool                                            halt_exit;
        uth_mutex_t                                     halt_mtx;
        uth_cond_var_t                          halt_cv;
 };
@@ -80,4 +81,8 @@ void start_guest_thread(struct guest_thread *gth);
 struct task_thread *vmm_run_task(struct virtual_machine *vm,
                                  void (*func)(void *), void *arg);
 
+int vthread_attr_init(struct virtual_machine *vm, int vmmflags);
+int vthread_attr_kernel_init(struct virtual_machine *vm, int vmmflags);
+int vthread_create(struct virtual_machine *vm, int guest, void *rip, void *arg);
+
 __END_DECLS