Sound Open Firmware
Loading...
Searching...
No Matches
coherent Struct Reference

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

#include <src/include/sof/coherent.h>

Collaboration diagram for coherent:

Data Fields

union { 
 
   struct { 
 
      struct k_spinlock   lock 
 Spinlock synchronizing multi-core access. More...
 
      k_spinlock_key_t   key 
 Spinlock key storing interrupt flags. More...
 
   }  
 
   struct k_mutex   mutex 
 Mutex synchronizing thread-level access when sleeping is allowed. More...
 
};  
 
uint8_t sleep_allowed
 Non-zero if context allows sleeping/blocking mutex operations.
 
uint8_t shared
 Non-zero if object is shared across non-coherent cores.
 
uint16_t core
 Owner core ID when object is not shared.
 
struct list_item list
 Node for coherent tracking list iteration.
 

Detailed Description

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

Ensures cache line alignment and synchronizes cached/uncached state transitions across DSP cores. Must only be manipulated via coherent_* APIs.

Field Documentation

◆ [union]

union { ... } coherent

◆ core

uint16_t coherent::core

Owner core ID when object is not shared.

◆ key

k_spinlock_key_t coherent::key

Spinlock key storing interrupt flags.

◆ list

struct list_item coherent::list

Node for coherent tracking list iteration.

◆ lock

struct k_spinlock coherent::lock

Spinlock synchronizing multi-core access.

◆ mutex

struct k_mutex coherent::mutex

Mutex synchronizing thread-level access when sleeping is allowed.

◆ shared

uint8_t coherent::shared

Non-zero if object is shared across non-coherent cores.

◆ sleep_allowed

uint8_t coherent::sleep_allowed

Non-zero if context allows sleeping/blocking mutex operations.


The documentation for this struct was generated from the following file: