[PATCH 4/4] score: Move per-CPU jobs support
Chris Johns
chrisj at rtems.org
Thu Jul 29 08:28:47 UTC 2021
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
More information about the devel
mailing list