On 29/7/21 5:19 pm, Sebastian Huber wrote: > On 29/07/2021 02:44, Chris Johns wrote: >>> +void _Per_CPU_Add_job( Per_CPU_Control *cpu, Per_CPU_Job *job ) >>> +{ >>> + ISR_lock_Context lock_context; >>> + >>> + _Atomic_Store_ulong( &job->done, 0, ATOMIC_ORDER_RELAXED ); >>> + _Assert( job->next == NULL ); >> Given the dispatch does not check the handler is adding ... >> >> _Assert( job->context->handler != NULL ); >> >> worth doing ? > > Yes, good idea. I added this: > > void _Per_CPU_Add_job( Per_CPU_Control *cpu, Per_CPU_Job *job ) > { > ISR_lock_Context lock_context; > > _Assert( job->context != NULL && job->context->handler != NULL ); > > _Atomic_Store_ulong( &job->done, 0, ATOMIC_ORDER_RELAXED ); > _Assert( job->next == NULL ); >
Nice. Chris _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel