--- Gnu-Mach/kern/task.h 2020/09/02 04:36:57 1.1 +++ Gnu-Mach/kern/task.h 2020/09/02 04:45:21 1.1.1.4 @@ -1,25 +1,25 @@ -/* +/* * Mach Operating System * Copyright (c) 1993-1988 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * + * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. */ @@ -34,10 +34,6 @@ #ifndef _KERN_TASK_H_ #define _KERN_TASK_H_ -#include -#include -#include - #include #include #include @@ -49,14 +45,8 @@ #include #include #include -#include - -#if NET_ATM -typedef struct nw_ep_owned { - unsigned int ep; - struct nw_ep_owned *next; -} nw_ep_owned_s, *nw_ep_owned_t; -#endif +#include +#include struct task { /* Synchronization/destruction information */ @@ -86,6 +76,8 @@ struct task { time_value_t total_system_time; /* total system time for dead threads */ + time_value_t creation_time; /* time stamp at creation */ + /* IPC structures */ decl_simple_lock_data(, itk_lock_data) struct ipc_port *itk_self; /* not a right, doesn't hold ref */ @@ -102,19 +94,23 @@ struct task { sample_control_t pc_sample; -#if NORMA_TASK - long child_node; /* if != -1, node for new children */ -#endif /* NORMA_TASK */ - #if FAST_TAS -#define TASK_FAST_TAS_NRAS 8 +#define TASK_FAST_TAS_NRAS 8 vm_offset_t fast_tas_base[TASK_FAST_TAS_NRAS]; vm_offset_t fast_tas_end[TASK_FAST_TAS_NRAS]; #endif /* FAST_TAS */ -#if NET_ATM - nw_ep_owned_t nw_ep_owned; -#endif /* NET_ATM */ + /* Hardware specific data. */ + machine_task_t machine; + + /* Statistics */ + natural_t faults; /* page faults counter */ + natural_t zero_fills; /* zero fill pages counter */ + natural_t reactivations; /* reactivated pages counter */ + natural_t pageins; /* actual pageins couter */ + natural_t cow_faults; /* copy-on-write faults counter */ + natural_t messages_sent; /* messages sent counter */ + natural_t messages_received; /* messages received counter */ }; #define task_lock(task) simple_lock(&(task)->lock) @@ -162,22 +158,19 @@ extern kern_return_t task_assign( extern kern_return_t task_assign_default( task_t task, boolean_t assign_threads); +extern void consider_task_collect(void); /* * Internal only routines */ -extern void task_init(); -extern void task_reference(); -extern void task_deallocate(); -extern kern_return_t task_hold(); -extern kern_return_t task_dowait(); -extern kern_return_t task_release(); -extern kern_return_t task_halt(); - -extern kern_return_t task_suspend_nowait(); -extern task_t kernel_task_create(); +extern void task_init(void); +extern void task_reference(task_t); +extern void task_deallocate(task_t); +extern kern_return_t task_hold(task_t); +extern kern_return_t task_dowait(task_t, boolean_t); +extern kern_return_t task_release(task_t); extern task_t kernel_task; -#endif _KERN_TASK_H_ +#endif /* _KERN_TASK_H_ */