LK already has events APIs. To support events protocols in UEFI spec, I created a wrapper object for LK events. This wrapper object keeps additional data that are necessary to support UEFI events spec: * Notification function, or callbacks * Argument for the notification function * Type of this UEFI event (which specifies when the callback should be called) The events API is essential for supporting async I/O in UEFI. Intended use case looks like: * UEFI app creates an event object, attatch callback to this event * UEFI app calls LK for asynchronous read/write on a block device, with the newly created events object * LK executes IO operation in background, after IO finishes, signal the specified event object * UEFI's callback gets executed
11 lines
241 B
C
11 lines
241 B
C
#ifndef __LIB_UEFI_BLOCKIO_PROTOCOL_H_
|
|
#define __LIB_UEFI_BLOCKIO_PROTOCOL_H_
|
|
|
|
#include <uefi/types.h>
|
|
|
|
EfiStatus open_block_device(EfiHandle handle, void **intf);
|
|
|
|
EfiStatus list_block_devices(size_t *num_handles, EfiHandle **buf);
|
|
|
|
#endif
|