Update thread make priority_more public

This commit is contained in:
sBubshait
2024-10-17 06:47:58 +01:00
parent dbb7fd56e3
commit fb268cdef0
2 changed files with 3 additions and 4 deletions

View File

@@ -70,9 +70,6 @@ static void *alloc_frame (struct thread *, size_t size);
static void schedule (void); static void schedule (void);
void thread_schedule_tail (struct thread *prev); void thread_schedule_tail (struct thread *prev);
static tid_t allocate_tid (void); static tid_t allocate_tid (void);
static bool priority_more (const struct list_elem *a_,
const struct list_elem *b_,
void *aux UNUSED);
/* Initializes the threading system by transforming the code /* Initializes the threading system by transforming the code
that's currently running into a thread. This can't work in that's currently running into a thread. This can't work in
@@ -366,7 +363,7 @@ thread_foreach (thread_action_func *func, void *aux)
/* Function that compares the two threads associated with the provided /* Function that compares the two threads associated with the provided
list_elem structures. Returns true if the thread associated with a_ has list_elem structures. Returns true if the thread associated with a_ has
a higher priority than that of b_. */ a higher priority than that of b_. */
static bool bool
priority_more (const struct list_elem *a_, const struct list_elem *b_, priority_more (const struct list_elem *a_, const struct list_elem *b_,
void *aux UNUSED) void *aux UNUSED)
{ {

View File

@@ -131,6 +131,8 @@ void thread_yield (void);
typedef void thread_action_func (struct thread *t, void *aux); typedef void thread_action_func (struct thread *t, void *aux);
void thread_foreach (thread_action_func *, void *); void thread_foreach (thread_action_func *, void *);
bool priority_more (const struct list_elem *a_, const struct list_elem *b_,
void *aux UNUSED);
int thread_get_priority (void); int thread_get_priority (void);
void thread_set_priority (int); void thread_set_priority (int);