Sound Open Firmware
Loading...
Searching...
No Matches
coherent.h File Reference

Cache-coherent multi-core shared memory access abstractions. More...

Include dependency graph for coherent.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  coherent
 Header embedded at start of multi-core shared memory objects for cache coherence. More...
 

Macros

#define __coherent   __aligned(PLATFORM_DCACHE_ALIGN)
 Cache line alignment specifier for coherent shared memory objects.
 
#define ADDR_IS_INCOHERENT(_c)
 
#define ADDR_IS_COHERENT(_c)
 
#define CORE_CHECK_STRUCT_FIELD
 
#define CORE_CHECK_STRUCT_INIT(_c, is_shared)
 
#define CORE_CHECK_STRUCT(_c)
 
#define CHECK_COHERENT_CORE(_c)
 
#define CHECK_ISR()   __ASSERT(!k_is_in_isr(), "Attempt to sleep in ISR!")
 
#define CHECK_SLEEP(_c)
 
#define CHECK_ATOMIC(_c)
 
#define coherent_init(type, member)
 Allocate and initialize a coherent shared object with spinlock protection.
 
#define coherent_shared(object, member)
 Mark an allocated coherent object as actively shared across multiple DSP cores.
 
#define coherent_init_thread(type, member)
 Allocate and initialize a coherent shared object with mutex protection for thread context.
 
#define coherent_shared_thread(object, member)
 Mark a thread-capable coherent object as shared across multiple DSP cores.
 
#define coherent_free(object, member)
 Invalidate cache and free a coherent shared memory object.
 
#define coherent_free_thread   coherent_free
 Free a thread-capable coherent shared memory object.
 
#define is_coherent_shared(object, member)   ((object)->member.shared)
 Query whether a coherent object is configured for multi-core shared mode.
 

Functions

static struct coherent * coherent_acquire (struct coherent *c, const size_t size)
 Acquire exclusive access to a cache-coherent shared object in atomic/spinlock context.
 
static void coherent_release (struct coherent *c, const size_t size)
 Release exclusive access to a cache-coherent shared object in atomic/spinlock context.
 
static void * __coherent_init (size_t offset, const size_t size)
 Internal helper to allocate and initialize a coherent shared object.
 
static void __coherent_shared (struct coherent *c, const size_t size)
 Internal helper to mark an allocated coherent object as actively shared.
 
static struct coherent * coherent_acquire_thread (struct coherent *c, const size_t size)
 Acquire exclusive access to a cache-coherent shared object in thread/mutex context.
 
static void coherent_release_thread (struct coherent *c, const size_t size)
 Release exclusive access to a cache-coherent shared object in thread/mutex context.
 
static void * __coherent_init_thread (size_t offset, const size_t size)
 Internal helper to allocate and initialize a thread-capable coherent shared object.
 
static void __coherent_shared_thread (struct coherent *c, const size_t size)
 Internal helper to mark a thread-capable coherent object as actively shared.
 

Detailed Description

Cache-coherent multi-core shared memory access abstractions.