blob: ea6e4ccf89d195fb702440c0858ab259dd9e0d0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#pragma once
#include "kernel/spinlock.h"
#include "kernel/proc_def.h"
struct RunQueue
{
Spinlock lock;
struct Proc *heads[N_PRIO];
struct Proc *tails[N_PRIO];
uint64 count;
void init(const char *name);
void enqueue(struct Proc *p);
struct Proc *dequeue();
struct Proc *steal();
};
|