forked from len0rd/rockbox
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
This commit is contained in:
parent
40ff47c7ee
commit
8cfbd3604f
32 changed files with 329 additions and 234 deletions
|
@ -82,12 +82,12 @@
|
|||
#define CODEC_ENC_MAGIC 0x52454E43 /* RENC */
|
||||
|
||||
/* increase this every time the api struct changes */
|
||||
#define CODEC_API_VERSION 27
|
||||
#define CODEC_API_VERSION 28
|
||||
|
||||
/* update this to latest version if a change to the api struct breaks
|
||||
backwards compatibility (and please take the opportunity to sort in any
|
||||
new function which are "waiting" at the end of the function table) */
|
||||
#define CODEC_MIN_API_VERSION 27
|
||||
#define CODEC_MIN_API_VERSION 28
|
||||
|
||||
/* codec return codes */
|
||||
enum codec_status {
|
||||
|
@ -164,14 +164,14 @@ struct codec_api {
|
|||
void (*yield)(void);
|
||||
|
||||
#if NUM_CORES > 1
|
||||
struct thread_entry *
|
||||
unsigned int
|
||||
(*create_thread)(void (*function)(void), void* stack,
|
||||
size_t stack_size, unsigned flags, const char *name
|
||||
IF_PRIO(, int priority)
|
||||
IF_COP(, unsigned int core));
|
||||
|
||||
void (*thread_thaw)(struct thread_entry *thread);
|
||||
void (*thread_wait)(struct thread_entry *thread);
|
||||
void (*thread_thaw)(unsigned int thread_id);
|
||||
void (*thread_wait)(unsigned int thread_id);
|
||||
void (*semaphore_init)(struct semaphore *s, int max, int start);
|
||||
void (*semaphore_wait)(struct semaphore *s);
|
||||
void (*semaphore_release)(struct semaphore *s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue