[U-Boot] [PATCH 04/10] efi_loader: implement queueing of the notification function

Heinrich Schuchardt xypron.glpk at gmx.de
Mon Sep 25 06:08:22 UTC 2017


On 09/25/2017 04:11 AM, Simon Glass wrote:
> Hi Heinrich,
> 
> On 15 September 2017 at 02:06, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>> For the correct implementation of the task priority level (TPL)
>> calling the notification function must be queued.
>>
>> Add a status field 'queued' to events.
>>
>> In function efi_signal_event set status queued if a notification
>> function exists and reset it after we have called the function.
>> A later patch will add a check of the TPL here.
>>
>> In efi_create_event and efi_close_event unset the queued status.
>>
>> In function efi_wait_for_event and efi_check_event
>> queue the notification function.
>>
>> In efi_timer_check call the efi_notify_event
>> if the status queued is set.
>> For all timer events set status signaled.
>>
>> In efi_console_timer_notify set the signaled state of the
>> WaitForKey event.
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
>> ---
>>  include/efi_loader.h          |  4 +++-
>>  lib/efi_loader/efi_boottime.c | 40 ++++++++++++++++++++++++++++++----------
>>  lib/efi_loader/efi_console.c  |  4 +++-
>>  3 files changed, 36 insertions(+), 12 deletions(-)
>>
>> diff --git a/include/efi_loader.h b/include/efi_loader.h
>> index f74b33d589..25398ba40c 100644
>> --- a/include/efi_loader.h
>> +++ b/include/efi_loader.h
>> @@ -131,7 +131,8 @@ struct efi_object {
>>   * @nofify_function:   Function to call when the event is triggered
>>   * @notify_context:    Data to be passed to the notify function
>>   * @trigger_type:      Type of timer, see efi_set_timer
>> - * @signaled:          The notify function was already called
>> + * @queued:            The notification functionis queued
> 
> functions

function is

> 
> What does this actually mean? Can you expand the comment a bit? I'm
> not sure what a value of (for example) 3 would mean. Or if it is just
> *whether* the function is queued, then you could use a bool.

Yes
bool is_signaled
bool is_queued
would make sense.

Regards

Heinrich

> 
>> + * @signaled:          The event occured
> 
> occurred
> 



More information about the U-Boot mailing list