1 /* See COPYRIGHT for copyright information. */
8 LIST_HEAD(Env_list
, Env
);
9 extern struct Env
*envs
; // All environments
10 extern struct Env
*curenv
; // the current env
13 int env_alloc(struct Env
**e
, u_int parent_id
);
14 void env_free(struct Env
*);
15 void env_create(u_char
*binary
, int size
);
16 void env_destroy(struct Env
*e
);
18 int envid2env(u_int envid
, struct Env
**penv
, int checkperm
);
19 void env_run(struct Env
*e
);
20 void env_pop_tf(struct Trapframe
*tf
);
22 // for the grading script
23 #define ENV_CREATE2(x, y) \
25 extern u_char x[], y[]; \
26 env_create(x, (int)y); \
29 #define ENV_CREATE(x) \
31 extern u_char _binary_obj_##x##_start[], \
32 _binary_obj_##x##_size[]; \
33 env_create(_binary_obj_##x##_start, \
34 (int)_binary_obj_##x##_size); \
37 #endif // !_KERN_ENV_H_