[PATCH 4/4] score: Move per-CPU jobs support

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Jul 29 07:19:58 UTC 2021


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 );


-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/


More information about the devel mailing list