Hi Enno Luebbers, Enno wrote: > Hi, > >>> I've played a bit with the thread priorities of main() and the > delegate. >> However, even with the delegates having a higher priority than main(), > the >> failure still showed up. >> >> I've tried the same, but with changed priorities I could *not* > reproduce the >> error. (I did 20 tries). >> I've added the following lines: > [...] >> ecos-patched/ecos/packages/reconos/current/src/delegate.tmpl >> 334: cyg_handle_t my = cyg_thread_self(); >> 335: cyg_thread_set_priority(my, 1); >> >> Does this also work for you? > > I've added the same modifications to delegate.tmpl, and it seems to > work. This does however remove the possibility of an application to give > hardware threads different scheduling priorities when creating them. > Unfortunately, when trying it "the clean way" within the test routine by > creating the hardware threads with the appropriate pthread_attr to set > the POSIX scheduling priority, it didn't work reliably, but still > sporadically produced the 'too early' error. We need to look more > closely into this - maybe there's something wrong with the POSIX > routines for creating hardware threads. >
Could we add another argument to the rthread_attr struct? E.g. this would be specified together with the other rthread_attrs and in the reconos_delegate_thread() function the thread would set its priority accordingly. This way we still can specify different priorities for different delegate threads. The only restriction would be to set the priority of the delegate thread higher than the priority of the other threads in the system. I hope that would work. Cheers, Ariane > I've also created our first issue (yay!) in the github repository for > tracking this. > > Best, > - Enno > > _______________________________________________ > Reconos-devel_lists.reconos.de mailing list > reconos-devel@lists.reconos.de > https://ml01.ispgateway.de/mailman/listinfo/reconos-devel_lists.reconos.de _______________________________________________ Reconos-devel_lists.reconos.de mailing list reconos-devel@lists.reconos.de https://ml01.ispgateway.de/mailman/listinfo/reconos-devel_lists.reconos.de