dev.c, which has stubs we need
[akaros.git] / kern / include / env.h
index 9bba2e2..fbce2a2 100644 (file)
@@ -12,7 +12,7 @@
 #include <ros/procdata.h>
 #include <ros/procinfo.h>
 #include <ros/resource.h>
-#include <arch/trap.h>
+#include <trap.h>
 #include <ros/common.h>
 #include <arch/arch.h>
 #include <sys/queue.h>
@@ -20,6 +20,8 @@
 #include <mm.h>
 #include <vfs.h>
 #include <schedule.h>
+#include <devalarm.h>
+#include <ns.h>
 
 TAILQ_HEAD(vcore_tailq, vcore);
 /* 'struct proc_list' declared in sched.h (not ideal...) */
@@ -29,8 +31,8 @@ struct proc {
        TAILQ_ENTRY(proc) proc_arsc_link;
        TAILQ_ENTRY(proc) sibling_link;
        spinlock_t proc_lock;
-       trapframe_t env_tf;                                             // Saved registers
-       ancillary_state_t env_ancillary_state;  // State saved when descheduled
+       struct user_context scp_ctx;    /* context for an SCP.  TODO: move to vc0 */
+       char user[64]; /* user name */
        pid_t pid;
        /* Tempting to add a struct proc *parent, but we'd need to protect the use
         * of that reference from concurrent parent-death (letting init inherit
@@ -83,10 +85,15 @@ struct proc {
        struct namespace                        *ns;
        struct fs_struct                        fs_env;
        struct files_struct                     open_files;
+       struct pgrp                             *pgrp;
 
        /* UCQ hashlocks */
        struct hashlock                         *ucq_hashlock;
        struct small_hashlock           ucq_hl_noref;   /* don't reference directly */
+       /* For devalarm */
+       struct proc_alarm_set           alarmset;
+       struct cv_lookup_tailq          abortable_sleepers;
+       spinlock_t                                      abort_list_lock;
 };
 
 /* Til we remove all Env references */
@@ -99,15 +106,10 @@ typedef struct proc env_t;
 extern atomic_t num_envs;              // Number of envs
 
 int            env_setup_vm(env_t *e);
-void   env_push_ancillary_state(env_t* e);
-void   env_pop_ancillary_state(env_t* e);
 void   env_user_mem_free(env_t* e, void* start, size_t len);
 void   env_pagetable_free(env_t* e);
 
 typedef int (*mem_walk_callback_t)(env_t* e, pte_t* pte, void* va, void* arg);
 int            env_user_mem_walk(env_t* e, void* start, size_t len, mem_walk_callback_t callback, void* arg);
 
-// The following three functions do not return
-void   env_pop_tf(trapframe_t *tf) __attribute__((noreturn));
-
 #endif // !ROS_KERN_ENV_H