PatchworkOS  dbbdc99
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/cpu/percpu.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

 PERCPU_DEFINE_CTOR (static void, pcpu_ipi)
 
void ipi_handle_pending (interrupt_frame_t *frame)
 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 *data)
 
uint64_t ipi_send (cpu_t *cpu, ipi_flags_t flags, ipi_func_t func, void *data)
 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

◆ PERCPU_DEFINE_CTOR()

PERCPU_DEFINE_CTOR ( static void  ,
pcpu_ipi   
)

Definition at line 16 of file ipi.c.

Here is the call graph for this function:

◆ ipi_push()

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

Definition at line 110 of file ipi.c.

Here is the caller graph for this function:

Variable Documentation

◆ registeredChip

ipi_chip_t* registeredChip = NULL
static

Definition at line 13 of file ipi.c.

◆ chipLock

rwlock_t chipLock = RWLOCK_CREATE()
static

Definition at line 14 of file ipi.c.