AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
cpu.h File Reference
#include <core/system.h>
#include <cpu/cpu.h>

Go to the source code of this file.

Data Structures

struct  cpu
 A processor, and what runs on it. More...

Macros

#define CPUS_MAX   32

Functions

void arch_cpu_kick (struct cpu *cpu)
 Makes another CPU enter the kernel now, with an inter-processor interrupt: to run a thread that just became ready if it's idle, or so that its thread sees it was killed or takes its signals.

Variables

struct cpu cpus [CPUS_MAX]
int cpus_count

Macro Definition Documentation

◆ CPUS_MAX

#define CPUS_MAX   32

Definition at line 21 of file cpu.h.

Referenced by x86_apic_setup(), and x86_smp_init().

Function Documentation

◆ arch_cpu_kick()

void arch_cpu_kick ( struct cpu * cpu)

Makes another CPU enter the kernel now, with an inter-processor interrupt: to run a thread that just became ready if it's idle, or so that its thread sees it was killed or takes its signals.

Each architecture implements it; with one CPU, it does nothing.

Parameters
cputhe CPU

Definition at line 14 of file smp.c.

References arch_cpu::apic_id, cpu::arch, arch_cpu_kick(), ICR_ASSERT, x86_lapic_ipi(), and X86_WAKE_VECTOR.

Referenced by arch_cpu_kick(), arch_sched_init(), sched_cpu_wake(), and sched_thread_kick().

Variable Documentation

◆ cpus

◆ cpus_count