implement thread_get_nice & thread_get_recent_cpu

This commit is contained in:
2024-10-15 19:56:46 +01:00
parent 82cc108c38
commit 630fbaa3ab
2 changed files with 4 additions and 3 deletions

View File

@@ -4,6 +4,7 @@
#include <debug.h>
#include <list.h>
#include <stdint.h>
#include "threads/fixed-point.h"
/* States in a thread's life cycle. */
enum thread_status
@@ -95,7 +96,7 @@ struct thread
/* MLFQS items */
int nice; /* Nice value for this thread */
int32_t recent_cpu; /* Amount of time this process received */
fp32_t recent_cpu; /* Amount of time this process received */
#ifdef USERPROG
/* Owned by userprog/process.c. */