coreboot-kgpe-d16/src/commonlib
Yu-Ping Wu fc3576ab06 helpers: Introduce retry macro
Introduce a macro retry(attempts, condition, expr) for retrying a
condition, which is extensively used in coreboot.

Example usage:

 if (!retry(3, read32(REG) == 0, mdelay(1))
         printk(BIOS_ERR, "Error waiting for REG to be 0\n");

BUG=none
TEST=make tests/commonlib/bsd/helpers-test
TEST=emerge-cherry coreboot
BRANCH=none

Change-Id: I421e4dcab949616bd68b3a14231da744b9f74eeb
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55778
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2021-06-26 10:09:06 +00:00
..
bsd helpers: Introduce retry macro 2021-06-26 10:09:06 +00:00
include/commonlib nvs: Add Chrome OS NVS (CNVS) information to coreboot tables 2021-06-18 18:38:14 +00:00
storage
Makefile.inc cbfs: Pull handling of the CBFS_CACHE mem_pool into CBFS core 2021-03-08 22:31:29 +00:00
cbfs.c commonlib/cbfs.c: Remove unuse <console/console.h> 2021-02-15 10:51:24 +00:00
fsp_relocate.c
iobuf.c
mem_pool.c mem_pool: Track the last two allocations (not just one) 2021-04-06 07:50:05 +00:00
region.c commonlib/region: Turn addrspace_32bit into a more official API 2021-04-21 02:06:26 +00:00
sort.c