mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-15 16:12:28 -05:00
UISIMULATOR: Give the host OS some needed context switching hints (which _is_ supposed to work on Linux - but I can't tell on VMWare - and does on Windows). I guess I'll know for sure soon. Give sleep() even more genuine behavior. Add some button driver sync with the rockbox threads that should have been there for some time - this is basically interrupt-like processing as any thread not in the kernel pool should be considered. Make the screendump work again by posting the request. Perhaps help out shutting down for some users but not in the way I'd prefer - to think about.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14646 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
424750ea95
commit
0107dfc827
8 changed files with 74 additions and 16 deletions
|
|
@ -225,6 +225,15 @@ void queue_post(struct event_queue *q, long id, intptr_t data)
|
|||
wakeup_thread(&q->thread);
|
||||
}
|
||||
|
||||
/* Special thread-synced queue_post for button driver or any other preemptive sim thread */
|
||||
void queue_syncpost(struct event_queue *q, long id, intptr_t data)
|
||||
{
|
||||
thread_sdl_lock();
|
||||
/* No rockbox threads can be running here */
|
||||
queue_post(q, id, data);
|
||||
thread_sdl_unlock();
|
||||
}
|
||||
|
||||
#ifdef HAVE_EXTENDED_MESSAGING_AND_NAME
|
||||
intptr_t queue_send(struct event_queue *q, long id, intptr_t data)
|
||||
{
|
||||
|
|
@ -332,6 +341,17 @@ int queue_broadcast(long id, intptr_t data)
|
|||
return num_queues;
|
||||
}
|
||||
|
||||
/* Special thread-synced queue_broadcast for button driver or any other preemptive sim thread */
|
||||
int queue_syncbroadcast(long id, intptr_t data)
|
||||
{
|
||||
int i;
|
||||
thread_sdl_lock();
|
||||
/* No rockbox threads can be running here */
|
||||
i = queue_broadcast(id, data);
|
||||
thread_sdl_unlock();
|
||||
return i;
|
||||
}
|
||||
|
||||
void yield(void)
|
||||
{
|
||||
switch_thread(true, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue