Changeset 353ece46279797b5684fafdfc135b9104591fbc9
- Timestamp:
- 24/09/06 12:40:00
(2 years ago)
- Author:
- Clément Stenac <zorglub@videolan.org>
- git-committer:
- Clément Stenac <zorglub@videolan.org> 1159094400 +0000
- git-parent:
[a06213d7f406c886dba790418ef8cca43d7ad140]
- git-author:
- Clément Stenac <zorglub@videolan.org> 1159094400 +0000
- Message:
Convert hotkeys to using cond_wait/cond_signal
This removes useless wakeups and improves hotkeys reactivity
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| ra06213d |
r353ece4 |
|
| 171 | 171 | |
|---|
| 172 | 172 | /* Sleep a bit */ |
|---|
| 173 | | msleep( INTF_IDLE_SLEEP ); |
|---|
| | 173 | // msleep( INTF_IDLE_SLEEP ); |
|---|
| 174 | 174 | |
|---|
| 175 | 175 | /* Update the input */ |
|---|
| … | … | |
| 229 | 229 | if( !i_action ) |
|---|
| 230 | 230 | { |
|---|
| | 231 | vlc_mutex_lock( &p_intf->object_lock ); |
|---|
| | 232 | vlc_cond_wait( &p_intf->object_wait, &p_intf->object_lock ); |
|---|
| | 233 | vlc_mutex_unlock( &p_intf->object_lock ); |
|---|
| 231 | 234 | /* No key pressed, sleep a bit more */ |
|---|
| 232 | | msleep( INTF_IDLE_SLEEP ); |
|---|
| | 235 | // msleep( INTF_IDLE_SLEEP ); |
|---|
| 233 | 236 | continue; |
|---|
| 234 | 237 | } |
|---|
| … | … | |
| 747 | 750 | p_intf->p_sys->i_size++; |
|---|
| 748 | 751 | } |
|---|
| | 752 | vlc_mutex_lock( &p_intf->object_lock ); |
|---|
| | 753 | vlc_cond_signal( &p_intf->object_wait ); |
|---|
| | 754 | vlc_mutex_unlock( &p_intf->object_lock ); |
|---|
| 749 | 755 | vlc_mutex_unlock( &p_intf->p_sys->change_lock ); |
|---|
| 750 | 756 | |
|---|
| ra06213d |
r353ece4 |
|
| 262 | 262 | p_intf->b_die = VLC_TRUE; |
|---|
| 263 | 263 | if( p_intf->pf_run ) |
|---|
| | 264 | { |
|---|
| | 265 | vlc_cond_signal( &p_intf->object_wait ); |
|---|
| 264 | 266 | vlc_thread_join( p_intf ); |
|---|
| | 267 | } |
|---|
| 265 | 268 | } |
|---|
| 266 | 269 | } |
|---|