/tomo/pyhst

To get this branch, use:
bzr branch http://darksoft.org/webbzr/tomo/pyhst

« back to all changes in this revision

Viewing changes to hw_sched.c

  • Committer: Suren A. Chilingaryan
  • Date: 2017-04-07 01:21:18 UTC
  • Revision ID: csa@suren.me-20170407012118-7ih8b26m13tfvfzd
Fix few bugs in scheduller causing crashes in non-threaded mode (still inoperational)

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
        ctx->thread[ctx->n_threads] = hw_thread_create(ctx, ctx->n_threads, NULL, ppu_run, NULL);
147
147
        if (ctx->thread[ctx->n_threads]) {
148
148
#ifndef HW_USE_THREADS
149
 
            ctx->thread[ctx->n_threads]->status = HW_THREAD_STATUS_IDLE;
 
149
            ctx->thread[ctx->n_threads]->status = HW_THREAD_STATUS_STARTING;
150
150
#endif /* HW_USE_THREADS */
151
151
            ++ctx->n_threads;
152
152
        }
226
226
#ifndef HW_USE_THREADS
227
227
                ctx->thread[thread_id]->status = HW_THREAD_STATUS_DONE;
228
228
#endif /* HW_USE_THREADS */
229
 
                return thread_id;
 
229
                return thread_id;
230
230
            } else {
231
231
                return HW_SCHED_CHUNK_INVALID;
232
232
            }