* Block current thread until work is available for it. */
| 142 | * Block current thread until work is available for it. |
| 143 | */ |
| 144 | static void |
| 145 | taskset_thread_wait4start( taskset_thread_t *thread ) |
| 146 | { |
| 147 | hb_lock( thread->lock ); |
| 148 | while ( !thread->begin ) |
| 149 | { |
| 150 | hb_cond_wait( thread->begin_cond, thread->lock ); |
| 151 | } |
| 152 | |
| 153 | /* |
| 154 | * We've been released for one run. Insure we block the next |
| 155 | * time through the loop. |
| 156 | */ |
| 157 | thread->begin = 0; |
| 158 | hb_unlock( thread->lock ); |
| 159 | } |
| 160 | |
| 161 | /* |
| 162 | * Current thread has completed its work. Indicate completion, |
no test coverage detected