summaryrefslogtreecommitdiff
path: root/apps/codecs.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-03-25 02:34:12 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-03-25 02:34:12 +0000
commit27cf67733936abd75fcb1f8da765977cd75906ee (patch)
treef894211a8a0c77b402dd3250b2bee2d17dcfe13f /apps/codecs.c
parentbc2f8fd8f38a3e010cd67bbac358f6e9991153c6 (diff)
downloadrockbox-27cf67733936abd75fcb1f8da765977cd75906ee.tar.gz
rockbox-27cf67733936abd75fcb1f8da765977cd75906ee.zip
Add a complete priority inheritance implementation to the scheduler (all mutex ownership and queue_send calls are inheritable). Priorities are differential so that dispatch depends on the runnable range of priorities. Codec priority can therefore be raised in small steps (pcmbuf updated to enable). Simplify the kernel functions to ease implementation and use the same kernel.c for both sim and target (I'm tired of maintaining two ;_). 1) Not sure if a minor audio break at first buffering issue will exist on large-sector disks (the main mutex speed issue was genuinely resolved earlier). At this point it's best dealt with at the buffering level. It seems a larger filechunk could be used again. 2) Perhaps 64-bit sims will have some minor issues (finicky) but a backroll of the code of concern there is a 5-minute job. All kernel objects become incompatible so a full rebuild and update is needed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16791 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs.c')
-rw-r--r--apps/codecs.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/apps/codecs.c b/apps/codecs.c
index dfae463865..f2c74522cc 100644
--- a/apps/codecs.c
+++ b/apps/codecs.c
@@ -76,6 +76,7 @@ struct codec_api ci = {
76 false, /* stop_codec */ 76 false, /* stop_codec */
77 0, /* new_track */ 77 0, /* new_track */
78 0, /* seek_time */ 78 0, /* seek_time */
79 NULL, /* struct dsp_config *dsp */
79 NULL, /* get_codec_memory */ 80 NULL, /* get_codec_memory */
80 NULL, /* pcmbuf_insert */ 81 NULL, /* pcmbuf_insert */
81 NULL, /* set_elapsed */ 82 NULL, /* set_elapsed */
@@ -95,6 +96,23 @@ struct codec_api ci = {
95 PREFIX(sleep), 96 PREFIX(sleep),
96 yield, 97 yield,
97 98
99#if NUM_CORES > 1
100 create_thread,
101 thread_thaw,
102 thread_wait,
103 semaphore_init,
104 semaphore_wait,
105 semaphore_release,
106 event_init,
107 event_wait,
108 event_set_state,
109#endif
110
111#ifdef CACHE_FUNCTIONS_AS_CALL
112 flush_icache,
113 invalidate_icache,
114#endif
115
98 /* strings and memory */ 116 /* strings and memory */
99 strcpy, 117 strcpy,
100 strncpy, 118 strncpy,
@@ -147,24 +165,6 @@ struct codec_api ci = {
147 /* new stuff at the end, sort into place next time 165 /* new stuff at the end, sort into place next time
148 the API gets incompatible */ 166 the API gets incompatible */
149 167
150#ifdef CACHE_FUNCTIONS_AS_CALL
151 flush_icache,
152 invalidate_icache,
153#endif
154
155 NULL, /* struct dsp_config *dsp */
156
157#if NUM_CORES > 1
158 create_thread,
159 thread_thaw,
160 thread_wait,
161 semaphore_init,
162 semaphore_wait,
163 semaphore_release,
164 event_init,
165 event_wait,
166 event_set_state,
167#endif
168}; 168};
169 169
170void codec_get_full_path(char *path, const char *codec_root_fn) 170void codec_get_full_path(char *path, const char *codec_root_fn)