PatchworkOS  966e257
A non-POSIX operating system.
Loading...
Searching...
No Matches
ipi.c File Reference
#include <kernel/cpu/cpu.h>
#include <kernel/cpu/ipi.h>
#include <kernel/cpu/irq.h>
#include <kernel/log/log.h>
#include <kernel/log/panic.h>
#include <kernel/sync/lock.h>
#include <kernel/sync/rwlock.h>
#include <errno.h>
#include <string.h>
Include dependency graph for ipi.c:

Go to the source code of this file.

Functions

void ipi_cpu_ctx_init (ipi_cpu_ctx_t *ctx)
 Initialize per-CPU IPI context.
 
void ipi_handle_pending (interrupt_frame_t *frame, cpu_t *self)
 Handle pending IPIs on the current CPU.
 
uint64_t ipi_chip_register (ipi_chip_t *chip)
 Register an IPI chip.
 
void ipi_chip_unregister (ipi_chip_t *chip)
 Unregister the IPI chip.
 
uint64_t ipi_chip_amount (void)
 Get the number of registered IPI chips.
 
static uint64_t ipi_push (cpu_t *cpu, ipi_func_t func, void *private)
 
uint64_t ipi_send (cpu_t *cpu, ipi_flags_t flags, ipi_func_t func, void *private)
 Send an IPI to one or more CPUs.
 
void ipi_wake_up (cpu_t *cpu, ipi_flags_t flags)
 Wake up one or more CPUs.
 
void ipi_invoke (void)
 Invoke a IPI interrupt on the current CPU.
 

Variables

static ipi_chip_tregisteredChip = NULL
 
static rwlock_t chipLock = RWLOCK_CREATE()
 

Function Documentation

◆ ipi_push()

static uint64_t ipi_push ( cpu_t cpu,
ipi_func_t  func,
void *  private 
)
static

Definition at line 108 of file ipi.c.

Here is the caller graph for this function:

Variable Documentation

◆ registeredChip

ipi_chip_t* registeredChip = NULL
static

Definition at line 12 of file ipi.c.

◆ chipLock

rwlock_t chipLock = RWLOCK_CREATE()
static

Definition at line 13 of file ipi.c.