mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-02 22:43:17 +02:00
Make sleep threshold for delays configurable
This allows the minimum time that default_delay() will choose to sleep for instead of polling to be configured at build-time. The default remains unchanged at 100 milliseconds for now. The test's correctness has been checked by testing with minimum sleep time left at its default and set to a non-default value smaller than 100 microseconds (both pass without sleeping, verified with strace) and with the minimum sleep time set to 0 (causing the test to be skipped). The configured value from the macro needs to be stored in a const to avoid -Werror=type-limits errors when configured to be zero. Change-Id: Ida96e0816ac914ed69d6fd82ad90ebe89cdef1cc Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/81606 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
This commit is contained in:
@ -22,3 +22,6 @@ option('man-pages', type : 'feature', value : 'auto', description : 'build the m
|
||||
option('documentation', type : 'feature', value : 'auto', description : 'build the html documentation')
|
||||
option('ni845x_search_path', type : 'string', value : 'C:\Program Files (x86)\National Instruments\Ni-845x\MS Visual C',
|
||||
description : 'Path to search for the proprietary ni845x library and header (32-bit Windows only)')
|
||||
option('delay_minimum_sleep_us', type : 'integer', min : 0, value : 100000,
|
||||
description : 'Minimum time in microseconds to suspend execution for (rather than polling) when a delay is required.'
|
||||
+ ' Larger values may perform better on machines with low timer resolution, at the cost of increased power.')
|
||||
|
Reference in New Issue
Block a user