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
|
|
@ -216,7 +216,7 @@ struct batt_info
|
|||
|
||||
#define BUF_ELEMENTS (sizeof(bat)/sizeof(struct batt_info))
|
||||
|
||||
static struct thread_entry *thread_id;
|
||||
static unsigned int thread_id;
|
||||
static struct event_queue thread_q;
|
||||
static bool in_usb_mode;
|
||||
static unsigned int buf_idx;
|
||||
|
|
@ -537,7 +537,7 @@ int main(void)
|
|||
if ((thread_id = rb->create_thread(thread, thread_stack,
|
||||
sizeof(thread_stack), 0, "Battery Benchmark"
|
||||
IF_PRIO(, PRIORITY_BACKGROUND)
|
||||
IF_COP(, CPU))) == NULL)
|
||||
IF_COP(, CPU))) == 0)
|
||||
{
|
||||
rb->splash(HZ, "Cannot create thread!");
|
||||
return PLUGIN_ERROR;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue