PatchworkOS
Loading...
Searching...
No Matches
smp.h File Reference
#include <kernel/cpu/cpu_id.h>
#include <kernel/cpu/interrupt.h>
#include <kernel/cpu/regs.h>
#include <kernel/defs.h>
#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef struct cpu cpu_t
 

Functions

void smp_bootstrap_init_early (void)
 Early initialization of the bootstrap CPU.
 
void smp_bootstrap_init (void)
 Initializes the bootstrap CPU structure.
 
void smp_others_init (void)
 Initializes the other CPUs.
 
void smp_halt_others (void)
 Halts all CPUs except the current one.
 
static uint16_t smp_cpu_amount (void)
 Returns the number of CPUs currently identified.
 
static cpu_tsmp_cpu (cpuid_t id)
 Returns a pointer to the cpu_t structure of the CPU with the given id.
 
static cpu_tsmp_self_unsafe (void)
 Returns a pointer to the cpu_t structure of the current CPU.
 
static cpuid_t smp_self_id_unsafe (void)
 Returns the id of the current CPU.
 
static cpu_tsmp_self (void)
 Returns a pointer to the cpu_t structure of the current CPU.
 
static void smp_put (void)
 Re-enables interrupts after a call to smp_self().
 

Variables

cpu_t_cpus [CPU_MAX]
 Array of pointers to cpu_t structures for each CPU.
 
uint16_t _cpuAmount
 The number of CPUs currently identified.
 

Typedef Documentation

◆ cpu_t

typedef struct cpu cpu_t

Definition at line 10 of file smp.h.