mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
Merge functionality of wakeups and semaphores-- fewer APIs and object types. semaphore_wait takes a timeout now so codecs and plugins have to be made incompatible. Don't make semaphores for targets not using them.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29492 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
05e180a130
commit
12375d1d3a
38 changed files with 294 additions and 311 deletions
|
|
@ -107,7 +107,7 @@ struct
|
|||
#ifdef HAVE_LCD_SLEEP
|
||||
bool display_on;
|
||||
bool waking;
|
||||
struct wakeup initwakeup;
|
||||
struct semaphore initwakeup;
|
||||
#endif
|
||||
} lcd_state IBSS_ATTR;
|
||||
|
||||
|
|
@ -188,7 +188,7 @@ static inline unsigned bcm_read32(unsigned address)
|
|||
static void continue_lcd_awake(void)
|
||||
{
|
||||
lcd_state.waking = false;
|
||||
wakeup_signal(&(lcd_state.initwakeup));
|
||||
semaphore_release(&(lcd_state.initwakeup));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -357,7 +357,7 @@ void lcd_init_device(void)
|
|||
/* lcd_write_data needs an even number of 16 bit values */
|
||||
flash_vmcs_length = ((flash_vmcs_length + 3) >> 1) & ~1;
|
||||
}
|
||||
wakeup_init(&(lcd_state.initwakeup));
|
||||
semaphore_init(&(lcd_state.initwakeup), 1, 0);
|
||||
lcd_state.waking = false;
|
||||
|
||||
if (GPO32_VAL & 0x4000)
|
||||
|
|
@ -620,7 +620,7 @@ void lcd_awake(void)
|
|||
*/
|
||||
lcd_state.waking = true;
|
||||
tick_add_task(&lcd_tick);
|
||||
wakeup_wait(&(lcd_state.initwakeup), TIMEOUT_BLOCK);
|
||||
semaphore_wait(&(lcd_state.initwakeup), TIMEOUT_BLOCK);
|
||||
|
||||
send_event(LCD_EVENT_ACTIVATION, NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue