#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...) */
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
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 */
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