Changeset 21724f580a769fdb2205218bb2e1e1acb8f645b6
- Timestamp:
- 17/09/07 16:29:59
(1 year ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1190039399 +0000
- git-parent:
[8440f6c09557f0f7ba39c5302b93376bcea4a7b1]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1190039399 +0000
- Message:
Signal the playlist BEFORE unlocking it.
One should never signal a condition without the corresponding lock:
"if predictable scheduling behavior is required, then that mutex shall
be locked by the thread calling pthread_cond_broadcast()
or pthread_cond_signal()." -- POSIX
This only fixes the most obvious cases. There might be others.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| ra73e410 |
r21724f5 |
|
| 185 | 185 | p_playlist->p_preparse->i_waiting, |
|---|
| 186 | 186 | p_item ); |
|---|
| | 187 | vlc_cond_signal( &p_playlist->p_preparse->object_wait ); |
|---|
| 187 | 188 | vlc_mutex_unlock( &p_playlist->p_preparse->object_lock ); |
|---|
| 188 | | vlc_cond_signal( &p_playlist->p_preparse->object_wait ); |
|---|
| 189 | 189 | return VLC_SUCCESS; |
|---|
| 190 | 190 | } |
|---|
| … | … | |
| 219 | 219 | p_playlist->p_fetcher->i_waiting, |
|---|
| 220 | 220 | i, p ); |
|---|
| | 221 | vlc_cond_signal( &p_playlist->p_fetcher->object_wait ); |
|---|
| 221 | 222 | vlc_mutex_unlock( &p_playlist->p_fetcher->object_lock ); |
|---|
| 222 | | vlc_cond_signal( &p_playlist->p_fetcher->object_wait ); |
|---|
| 223 | 223 | return VLC_SUCCESS; |
|---|
| 224 | 224 | } |
|---|
| r52f8ccc |
r21724f5 |
|
| 545 | 545 | p_playlist->p_fetcher->i_waiting, |
|---|
| 546 | 546 | p_playlist->p_fetcher->i_waiting, p); |
|---|
| | 547 | vlc_cond_signal( &p_playlist->p_fetcher->object_wait ); |
|---|
| 547 | 548 | vlc_mutex_unlock( &p_playlist->p_fetcher->object_lock ); |
|---|
| 548 | | vlc_cond_signal( &p_playlist->p_fetcher->object_wait ); |
|---|
| 549 | 549 | } |
|---|
| 550 | 550 | /* We already have all needed meta, but we need art right now */ |
|---|
| … | … | |
| 560 | 560 | p_playlist->p_fetcher->i_waiting, |
|---|
| 561 | 561 | p_playlist->p_fetcher->i_waiting, p); |
|---|
| | 562 | vlc_cond_signal( &p_playlist->p_fetcher->object_wait ); |
|---|
| 562 | 563 | vlc_mutex_unlock( &p_playlist->p_fetcher->object_lock ); |
|---|
| 563 | | vlc_cond_signal( &p_playlist->p_fetcher->object_wait ); |
|---|
| 564 | 564 | } |
|---|
| 565 | 565 | else |
|---|