*/
extern void cod_delete(struct cod_manager *cod_mgr_obj);
-/*
- * ======== cod_exit ========
- * Purpose:
- * Discontinue usage of the COD module.
- * Parameters:
- * None.
- * Returns:
- * None.
- * Requires:
- * COD initialized.
- * Ensures:
- * Resources acquired in cod_init(void) are freed.
- */
-extern void cod_exit(void);
-
/*
* ======== cod_get_base_lib ========
* Purpose:
extern int cod_get_sym_value(struct cod_manager *cod_mgr_obj,
char *str_sym, u32 * pul_value);
-/*
- * ======== cod_init ========
- * Purpose:
- * Initialize the COD module's private state.
- * Parameters:
- * None.
- * Returns:
- * TRUE if initialized; FALSE if error occurred.
- * Requires:
- * Ensures:
- * A requirement for each of the other public COD functions.
- */
-extern bool cod_init(void);
-
/*
* ======== cod_load_base ========
* Purpose:
struct cod_manager *cod_mgr;
};
-static u32 refs = 0L;
-
static struct dbll_fxns ldr_fxns = {
(dbll_close_fxn) dbll_close,
(dbll_create_fxn) dbll_create,
kfree(cod_mgr_obj);
}
-/*
- * ======== cod_exit ========
- * Purpose:
- * Discontinue usage of the COD module.
- *
- */
-void cod_exit(void)
-{
- refs--;
-}
-
/*
* ======== cod_get_base_lib ========
* Purpose:
return 0;
}
-/*
- * ======== cod_init ========
- * Purpose:
- * Initialize the COD module's private state.
- *
- */
-bool cod_init(void)
-{
- bool ret = true;
-
- if (ret)
- refs++;
-
- return ret;
-}
-
/*
* ======== cod_load_base ========
* Purpose:
if (api_c_refs == 0) {
/* Release all modules initialized in api_init(). */
- cod_exit();
dev_exit();
chnl_exit();
msg_exit();
bool api_init(void)
{
bool ret = true;
- bool fdev, fcod, fchnl, fmsg, fio;
+ bool fdev, fchnl, fmsg, fio;
bool fmgr, fproc, fnode, fdisp, fstrm, frmm;
if (api_c_refs == 0) {
fmsg = msg_mod_init();
fio = io_init();
fdev = dev_init();
- fcod = cod_init();
- ret = fdev && fchnl && fcod && fmsg && fio;
+ ret = fdev && fchnl && fmsg && fio;
ret = ret && fmgr && fproc && frmm;
if (!ret) {
if (fdev)
dev_exit();
- if (fcod)
- cod_exit();
-
if (frmm)
rmm_exit();
refs--;
if (refs == 0) {
- cod_exit();
list_for_each_entry_safe(rv, rv_tmp, ®_key_list, link) {
list_del(&rv->link);
kfree(rv->path);
*/
bool dcd_init(void)
{
- bool init_cod;
bool ret = true;
- if (refs == 0) {
- /* Initialize required modules. */
- init_cod = cod_init();
-
- if (!init_cod) {
- ret = false;
- /* Exit initialized modules. */
- if (init_cod)
- cod_exit();
- }
-
+ if (refs == 0)
INIT_LIST_HEAD(®_key_list);
- }
if (ret)
refs++;