diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2022-02-15 19:13:01 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-02-15 19:13:01 +0000 |
commit | 15940eb7032ee053c104a6433f3aa47372502caa (patch) | |
tree | 9edf3f8ef5199ea12f7976d02f5fd76eb7b5baf2 /hifi/xaf/hifi-dpf/include/xf-sched.h | |
parent | c3c21217df4789b6f5405c0cb070be12929e16ad (diff) | |
parent | cc6feb3510ad89a5ee7337d4c48fcba254ed9ee0 (diff) | |
download | hikey-15940eb7032ee053c104a6433f3aa47372502caa.tar.gz |
Merge "hikey960: Remove hifi dsp support." am: cc6feb3510
Original change: https://android-review.googlesource.com/c/device/linaro/hikey/+/1980355
Change-Id: I15b40e6fe8858909ab43e530c9b044f963f93458
Diffstat (limited to 'hifi/xaf/hifi-dpf/include/xf-sched.h')
-rw-r--r-- | hifi/xaf/hifi-dpf/include/xf-sched.h | 98 |
1 files changed, 0 insertions, 98 deletions
diff --git a/hifi/xaf/hifi-dpf/include/xf-sched.h b/hifi/xaf/hifi-dpf/include/xf-sched.h deleted file mode 100644 index 3c04436c..00000000 --- a/hifi/xaf/hifi-dpf/include/xf-sched.h +++ /dev/null @@ -1,98 +0,0 @@ -/******************************************************************************* -* Copyright (C) 2018 Cadence Design Systems, Inc. -* -* Permission is hereby granted, free of charge, to any person obtaining -* a copy of this software and associated documentation files (the -* "Software"), to use this Software with Cadence processor cores only and -* not with any other processors and platforms, subject to -* the following conditions: -* -* The above copyright notice and this permission notice shall be included -* in all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -******************************************************************************/ - -/******************************************************************************* - * xf-sched.h - * - * Non-preemptive earliest-deadline-first scheduler - * - ******************************************************************************/ - -#ifndef __XF_SCHED_H -#define __XF_SCHED_H - -/******************************************************************************* - * Types definitions - ******************************************************************************/ - -/* ...scheduler data */ -typedef rb_tree_t xf_sched_t; - -/* ...scheduling item */ -typedef rb_node_t xf_task_t; - -/******************************************************************************* - * Helpers - ******************************************************************************/ - -/* ...retrieve timestamp from task handle */ -static inline u32 xf_task_timestamp(xf_task_t *t) -{ - /* ...wipe out last bit of "color" */ - return (((rb_node_t *)t)->color & ~1); -} - -/* ...set task decoding timestamp */ -static inline u32 xf_task_timestamp_set(xf_task_t *t, u32 ts) -{ - /* ...technically, wiping out last bit of timestamp is not needed */ - return (((rb_node_t *)t)->color = ts); -} - -/* ...compare two timestamps with respect to wrap-around */ -static inline int xf_timestamp_before(u32 t0, u32 t1) -{ - /* ...distance between active items is never high */ - return ((s32)(t0 - t1) < 0); -} - -/* ...current scheduler timestamp */ -static inline u32 xf_sched_timestamp(xf_sched_t *sched) -{ - /* ...don't quite care about last bit */ - return ((rb_tree_t *)sched)->root.color; -} - -/* ...set scheduler timestamp */ -static inline u32 xf_sched_timestamp_set(xf_sched_t *sched, u32 ts) -{ - /* ...wipe out last bit (black color is 0) */ - return (((rb_tree_t *)sched)->root.color = ts & ~0x1); -} - -/******************************************************************************* - * Entry points - ******************************************************************************/ - -/* ...place message into scheduler queue */ -extern void xf_sched_put(xf_sched_t *sched, xf_task_t *t, u32 ts); - -/* ...get first item from the scheduler */ -extern xf_task_t * xf_sched_get(xf_sched_t *sched); - -/* ...cancel task execution */ -extern void xf_sched_cancel(xf_sched_t *sched, xf_task_t *t); - -/* ...initialize scheduler */ -extern void xf_sched_init(xf_sched_t *sched); - -#endif /* __XF_SCHED_H */ |