mirror of https://github.com/thesofproject/sof.git
coherent: add a missing coherent_shared_thread() implementation
Under Zephyr when CONFIG_INCOHERENT isn't selected, coherent_shared_thread() is undefined, add a missing implementation. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
parent
dff5c1bbc8
commit
8871bb3087
|
@ -386,6 +386,16 @@ static inline void __coherent_init_thread(struct coherent *c, const size_t size)
|
|||
|
||||
#define coherent_init_thread(object, member) __coherent_init_thread(&(object)->member, \
|
||||
sizeof(*object))
|
||||
|
||||
static inline void __coherent_shared_thread(struct coherent *c, const size_t size)
|
||||
{
|
||||
k_mutex_lock(&c->mutex, K_FOREVER);
|
||||
c->shared = true;
|
||||
k_mutex_unlock(&c->mutex);
|
||||
}
|
||||
|
||||
#define coherent_shared_thread(object, member) __coherent_shared_thread(&(object)->member, \
|
||||
sizeof(*object))
|
||||
#endif /* __ZEPHYR__ */
|
||||
|
||||
#endif /* CONFIG_INCOHERENT */
|
||||
|
|
Loading…
Reference in New Issue