ptos: ke: Add per-processor scheduler queue + PBI packer
Signed-off-by: Chloe M <chloe@mensia.org>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 2026, Chloe M.
|
||||
* Provided under the BSD-3 clause.
|
||||
*
|
||||
* Description: Scheduler management
|
||||
* Author: Chloe M.
|
||||
*/
|
||||
|
||||
#ifndef _KE_SCHED_H_
|
||||
#define _KE_SCHED_H_ 1
|
||||
|
||||
#include <ps/thread.h>
|
||||
#include <ptdef.h>
|
||||
#include <queue.h>
|
||||
|
||||
/*
|
||||
* Represents a scheduler queue that threads can be pulled
|
||||
* from and added to.
|
||||
*
|
||||
* @ThreadQueue: Represents the actual queue that holds threads
|
||||
* @QueueEntries: Represents the number of entries in the queue
|
||||
*/
|
||||
typedef struct {
|
||||
TAILQ_HEAD(, _THREAD) ThreadQueue;
|
||||
USIZE QueueEntries;
|
||||
} SCHED_QUEUE;
|
||||
|
||||
/* Macro used to initialize the scheduler queue */
|
||||
#define SCHED_QUEUE_INIT(SQ_P) \
|
||||
TAILQ_INIT(&(SQ_P)->ThreadQueue); \
|
||||
(SQ_P)->QueueEntries = 0;
|
||||
|
||||
#endif /* !_KE_SCHED_H_ */
|
||||
Reference in New Issue
Block a user