Name
ec_config_rsrc_get — Return a resource list blobject from the configuration system
Synopsis
#include "configuration.h"
| ec_blobject * **ec_config_rsrc_get** (
| id, | |
| | registering)
; | |
Description
This function returns a resource list blobject from the configuration system.
Warning
When you are finished with the returned object, you must call ec_blobject_delref to dispose of it.
When the registering
parameter is EC_CFG_RSRC_REGISTERING
, the configuration system will return the resource list from the currently-being-assembled configuration transaction. If the resource list does not exist in the currently-being-assembled transaction, then it will be created.
When the registering
parameter is EC_CFG_RSRC_CONSUMING
, the configuration system will return the resource list from the currently active configuration transaction. If the resource list does not exist in the active transaction, NULL will be returned.
The configuration system semantics are such that there will be a new instance of the resource list for each new configuration generation. That means that modules that register resources against this list will need to ensure that they register them explicitly from their ext_init module function each time it is invoked with EC_MODULE_INIT_INIT
.
- id
-
Resource list identifier returned by
ec_config_rsrc_create
- registering
-
Constant that indicates either a read or a write operation.
It can be one of the following values:
/** Indicates that the caller is consuming the existing, committed resource */ #define EC_CFG_RSRC_CONSUMING 0 /** Indicates that the caller is modifying the pending resource */ #define EC_CFG_RSRC_REGISTERING 1
This function returns a ec_blobject or NULL
.
This hook can be called in any thread.