/**
 * Handler for heapbuf mp get config API.
 *
 * \param ctp	Thread's associated context information.
 * \param msg	The actual devctl() message.
 * \param ocb	OCB associated with client's session.
 *
 * \return POSIX errno value.
 *
 * \retval EOK		Success.
 * \retval ENOTSUP	Unsupported devctl().
 */
int syslink_heapbufmp_getconfig(resmgr_context_t *ctp, io_devctl_t *msg, syslink_ocb_t *ocb) {

	HeapBufMPDrv_CmdArgs *		cargs = (HeapBufMPDrv_CmdArgs *) (_DEVCTL_DATA (msg->i));

    HeapBufMP_Config *config = (HeapBufMP_Config *)(cargs+1);

	HeapBufMP_getConfig (config);
	cargs->apiStatus = HeapBufMP_S_SUCCESS;

	SETIOV(&ctp->iov[0], &msg->o, sizeof(msg->o) + sizeof(HeapBufMPDrv_CmdArgs));
	SETIOV(&ctp->iov[1], config, sizeof(HeapBufMP_Config));

   return _RESMGR_NPARTS(2);
}
示例#2
0
/*!
 *  @brief      Function to get tyhe default values for confiurations.
 *
 *  @param      config   Configuration values.
 */
Void
Ipc_getConfig (Ipc_Config * config)
{
    GT_1trace (curTrace, GT_ENTER, "Ipc_getConfig", config);

    GT_assert (curTrace, (config != NULL));

#if !defined(SYSLINK_BUILD_OPTIMIZE)
    if (config == NULL) {
        GT_setFailureReason (curTrace,
                             GT_4CLASS,
                             "Ipc_getConfig",
                             Ipc_E_INVALIDARG,
                             "Argument of type (Ipc_getConfig *) passed "
                             "is null!");
    }
    else {
#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
        /* Initialize Utils as the get config functions expects
         * this module to be initialized
         */
        UsrUtilsDrv_setup();

#if 0 /* TBD:Temporarily comment. */
        /* Get the SysMemMgr default config */
        SysMemMgr_getConfig (&config->sysMemMgrConfig);
#endif /* TBD: Temporarily comment. */

        /* Get the MultiProc default config */
        MultiProc_getConfig (&config->multiProcConfig);

        /* Get the SharedRegion default config */
        SharedRegion_getConfig (&config->sharedRegionConfig);

        /* Get the GateMP default config */
        GateMP_getConfig (&config->gateMPConfig);

        /* Get the MESSAGEQ default config */
        MessageQ_getConfig (&config->messageQConfig);

        /* Get the NOTIFY default config */
        Notify_getConfig (&config->notifyConfig);

        /* Get the PROCMGR default config */
        ProcMgr_getConfig (&config->procMgrConfig);

        /* Get the HeapBufMP default config */
        HeapBufMP_getConfig (&config->heapBufMPConfig);

        /* Get the HeapMemMP default config */
        HeapMemMP_getConfig (&config->heapMemMPConfig);

        /* Get the LISTMP default config */
        ListMP_getConfig (&config->listMPConfig);

#if 0 /* TBD:Temporarily comment. */
        /* Get the HeapMultiBuf default config */
        HeapMultiBuf_getConfig (&config->heapMultiBufConfig);

        /* Get the ClientNotifyMgr default config */
        ClientNotifyMgr_getConfig (&config->cliNotifyMgrCfgParams) ;

        /*  Get the FrameQBufMgr default config */
        FrameQBufMgr_getConfig (&config->frameQBufMgrCfgParams) ;

        /*  Get the FrameQ default config */
        FrameQ_getConfig (&config->frameQCfgParams) ;
#endif /* TBD: Temporarily comment. */

        UsrUtilsDrv_destroy();

#if !defined(SYSLINK_BUILD_OPTIMIZE)
    }
#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */

    GT_0trace (curTrace, GT_LEAVE, "Ipc_getConfig");
}