Changed the way user/kernel time is tracked for threads. Now, thread_at_kernel_entry()

and thread_at_kernel_exit() are always called for userland threads at the appropriate
situation (note, I've renamed those from *_atkernel_*).
The timing should be more accurate this way, and the thread::last_time_type field
is no longer needed: all interrupts are now added to the kernel time (where the
time is actually spent).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11331 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-02-11 03:10:21 +00:00
parent 4265bb4b19
commit 90bce836e0
6 changed files with 69 additions and 86 deletions
+2 -7
View File
@@ -31,9 +31,9 @@ struct thread *thread_dequeue_id(struct thread_queue *q, thread_id thr_id);
void scheduler_enqueue_in_run_queue(struct thread *thread);
void scheduler_remove_from_run_queue(struct thread *thread);
void thread_atkernel_entry(void);
void thread_at_kernel_entry(void);
// called when the thread enters the kernel on behalf of the thread
void thread_atkernel_exit(void);
void thread_at_kernel_exit(void);
status_t thread_init(struct kernel_args *args);
status_t thread_per_cpu_init(int32 cpu_num);
@@ -80,11 +80,6 @@ struct rlimit;
int _user_getrlimit(int resource, struct rlimit * rlp);
int _user_setrlimit(int resource, const struct rlimit * rlp);
#if 1
// XXX remove later
int thread_test(void);
#endif
#ifdef __cplusplus
}
#endif