mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-28 21:28:21 +00:00
smp: let other processors run threads
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
#ifndef _PGCACHE_H
|
||||
#define _PGCACHE_H
|
||||
|
||||
void pgcache_init();
|
||||
int pgcache_getpage(vnode_t *node, uintmax_t offset, void **ret);
|
||||
int pgcache_setdirty(void *addr);
|
||||
|
||||
#endif
|
||||
@@ -11,6 +11,7 @@
|
||||
#define SCHED_THREAD_FLAGS_RUNNING 2
|
||||
#define SCHED_THREAD_FLAGS_SLEEP 4
|
||||
#define SCHED_THREAD_FLAGS_INTERRUPTIBLE 8
|
||||
#define SCHED_THREAD_FLAGS_PREEMPTED 16
|
||||
|
||||
#define SCHED_PROC_STATE_NORMAL 0
|
||||
#define SCHED_PROC_STATE_ZOMBIE 1
|
||||
@@ -91,5 +92,6 @@ void sched_destroyproc(proc_t *);
|
||||
void sched_destroythread(thread_t *);
|
||||
void sched_targetcpu(struct cpu_t *cpu);
|
||||
void sched_sleepus(size_t us);
|
||||
void sched_apentry();
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
#ifndef _SMP_H
|
||||
#define _SMP_H
|
||||
|
||||
#define ARCH_SMP_IPI_TARGET 0
|
||||
#define ARCH_SMP_IPI_SELF 1
|
||||
#define ARCH_SMP_IPI_ALL 2
|
||||
#define ARCH_SMP_IPI_OTHERCPUS 3
|
||||
|
||||
extern size_t arch_smp_cpusawake;
|
||||
|
||||
void arch_smp_wakeup();
|
||||
void arch_smp_sendipi(cpu_t *targcpu, isr_t *isr, int target);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user