diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2008-12-10 08:57:10 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2008-12-10 08:57:10 +0000 |
commit | 8cfbd3604fac14f629244e521ad24ffa9938c790 (patch) | |
tree | 16dc096519b8b537bb7d4b73e0c97f5f33ee752b /apps/codecs.h | |
parent | 40ff47c7eea41ac893d7af5c5b97ace52a5ffade (diff) | |
download | rockbox-8cfbd3604fac14f629244e521ad24ffa9938c790.tar.gz rockbox-8cfbd3604fac14f629244e521ad24ffa9938c790.zip |
Use cookies for thread identification instead of pointers directly which gives a buffer against wrongly identifying a thread when the slot is recycled (which has been nagging me for awhile). A slot gets 255 uses before it repeats. Everything gets incompatible so a full update is required.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19377 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs.h')
-rw-r--r-- | apps/codecs.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/codecs.h b/apps/codecs.h index 4194524e6d..d765daba2a 100644 --- a/apps/codecs.h +++ b/apps/codecs.h | |||
@@ -82,12 +82,12 @@ | |||
82 | #define CODEC_ENC_MAGIC 0x52454E43 /* RENC */ | 82 | #define CODEC_ENC_MAGIC 0x52454E43 /* RENC */ |
83 | 83 | ||
84 | /* increase this every time the api struct changes */ | 84 | /* increase this every time the api struct changes */ |
85 | #define CODEC_API_VERSION 27 | 85 | #define CODEC_API_VERSION 28 |
86 | 86 | ||
87 | /* update this to latest version if a change to the api struct breaks | 87 | /* update this to latest version if a change to the api struct breaks |
88 | backwards compatibility (and please take the opportunity to sort in any | 88 | backwards compatibility (and please take the opportunity to sort in any |
89 | new function which are "waiting" at the end of the function table) */ | 89 | new function which are "waiting" at the end of the function table) */ |
90 | #define CODEC_MIN_API_VERSION 27 | 90 | #define CODEC_MIN_API_VERSION 28 |
91 | 91 | ||
92 | /* codec return codes */ | 92 | /* codec return codes */ |
93 | enum codec_status { | 93 | enum codec_status { |
@@ -164,14 +164,14 @@ struct codec_api { | |||
164 | void (*yield)(void); | 164 | void (*yield)(void); |
165 | 165 | ||
166 | #if NUM_CORES > 1 | 166 | #if NUM_CORES > 1 |
167 | struct thread_entry * | 167 | unsigned int |
168 | (*create_thread)(void (*function)(void), void* stack, | 168 | (*create_thread)(void (*function)(void), void* stack, |
169 | size_t stack_size, unsigned flags, const char *name | 169 | size_t stack_size, unsigned flags, const char *name |
170 | IF_PRIO(, int priority) | 170 | IF_PRIO(, int priority) |
171 | IF_COP(, unsigned int core)); | 171 | IF_COP(, unsigned int core)); |
172 | 172 | ||
173 | void (*thread_thaw)(struct thread_entry *thread); | 173 | void (*thread_thaw)(unsigned int thread_id); |
174 | void (*thread_wait)(struct thread_entry *thread); | 174 | void (*thread_wait)(unsigned int thread_id); |
175 | void (*semaphore_init)(struct semaphore *s, int max, int start); | 175 | void (*semaphore_init)(struct semaphore *s, int max, int start); |
176 | void (*semaphore_wait)(struct semaphore *s); | 176 | void (*semaphore_wait)(struct semaphore *s); |
177 | void (*semaphore_release)(struct semaphore *s); | 177 | void (*semaphore_release)(struct semaphore *s); |