Skip to content

Commit

Permalink
fix infinitie loop (revert my previous broken PR)
Browse files Browse the repository at this point in the history
  • Loading branch information
Azq2 committed Jan 13, 2019
1 parent 0f1531a commit dd79421
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions source/mycore/thread_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ void mythread_queue_list_entry_make_batch(mythread_t* mythread, mythread_queue_l
return;

size_t i = 0;
for(size_t from = mythread->id_increase; from < mythread->entries_length; from++) {
for(size_t from = mythread->id_increase; from <= mythread->entries_length; from++) {
entry->thread_param[from].use = i;
i++;
}
Expand All @@ -469,8 +469,9 @@ void mythread_queue_list_entry_make_stream(mythread_t* mythread, mythread_queue_
if(entry == NULL || mythread == NULL)
return;

for(size_t from = mythread->id_increase; from < mythread->entries_length; from++) {
entry->thread_param[from].use = 0;
for(size_t from = mythread->id_increase; from <= mythread->entries_length; from++) {
if (from < entry->thread_param_size)
entry->thread_param[from].use = 0;
}
}

Expand Down

0 comments on commit dd79421

Please sign in to comment.