当前位置: 首页>>代码示例>>C++>>正文


C++ TRACE_ENTER2函数代码示例

本文整理汇总了C++中TRACE_ENTER2函数的典型用法代码示例。如果您正苦于以下问题:C++ TRACE_ENTER2函数的具体用法?C++ TRACE_ENTER2怎么用?C++ TRACE_ENTER2使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了TRACE_ENTER2函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: avnd_evt_avd_admin_op_req_evh

/**
 * Dispatch admin operation requests to the real handler
 * @param cb
 * @param evt
 * 
 * @return uns32
 */
uns32 avnd_evt_avd_admin_op_req_evh(AVND_CB *cb, AVND_EVT *evt)
{
	uns32 rc = NCSCC_RC_FAILURE;
	AVSV_D2N_ADMIN_OP_REQ_MSG_INFO *info = &evt->info.avd->msg_info.d2n_admin_op_req_info;

	TRACE_ENTER2("%u", info->class_id);

	switch (info->class_id) {
	case AVSV_SA_AMF_NODE:
		rc = avnd_evt_node_admin_op_req(cb, evt);
		break;
	case AVSV_SA_AMF_COMP:
		rc = avnd_evt_comp_admin_op_req(cb, evt);
		break;
	case AVSV_SA_AMF_SU:
		rc = avnd_evt_su_admin_op_req(cb, evt);
		break;
	default:
		LOG_NO("%s: unsupported adm op for class %u", __FUNCTION__, info->class_id);
		break;
	}

	TRACE_LEAVE();
	return rc;
}
开发者ID:kenzaburo,项目名称:OpenSaf-FrameWork,代码行数:32,代码来源:avnd_di.c

示例2: eds_proc_unsubscribe_msg

/****************************************************************************
 * Name          : eds_proc_unsubscribe_msg
 *
 * Description   : This is the function which is called when eds receives a
 *                 EDSV_EDA_UNSUBSCRIBE message.
 *
 * Arguments     : msg  - Message that was posted to the EDS Mail box.
 *
 * Return Values : NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE
 *
 * Notes         : None.
 *****************************************************************************/
static uint32_t eds_proc_unsubscribe_msg(EDS_CB *cb, EDSV_EDS_EVT *evt)
{
	uint32_t rc = NCSCC_RC_SUCCESS;
	uint32_t async_rc = NCSCC_RC_SUCCESS;
	EDSV_EDA_UNSUBSCRIBE_PARAM *unsubscribe_param;
	EDS_CKPT_DATA ckpt;
	TRACE_ENTER2("agent dest: %" PRIx64, evt->fr_dest);

	unsubscribe_param = &(evt->info.msg.info.api_info.param.unsubscribe);
	/* Remove subscription from our lists */
	rc = eds_remove_subscription(cb,
				     unsubscribe_param->reg_id,
				     unsubscribe_param->chan_id,
				     unsubscribe_param->chan_open_id, unsubscribe_param->sub_id);
	if (rc == NCSCC_RC_SUCCESS) {
		/* Send an async checkpoint update to STANDBY EDS */
		if (cb->ha_state == SA_AMF_HA_ACTIVE) {
			memset(&ckpt, 0, sizeof(ckpt));
			m_EDSV_FILL_ASYNC_UPDATE_UNSUBSCRIBE(ckpt, unsubscribe_param)
			async_rc = send_async_update(cb, &ckpt, NCS_MBCSV_ACT_ADD);
			if (async_rc != NCSCC_RC_SUCCESS)
				TRACE("Async Update send failed for unsubscribe");
		}
	} else
		rc = NCSCC_RC_FAILURE;

	TRACE_LEAVE();
	return rc;
}
开发者ID:helioloureiro,项目名称:opensaf-fork,代码行数:41,代码来源:eds_evt.c

示例3: ntfsv_dealloc_notification

void ntfsv_dealloc_notification(ntfsv_send_not_req_t *param)
{
	TRACE_ENTER2("ntfsv_send_not_req_t ptr = %p " "notificationType = %#x", param, (int)param->notificationType);
	switch (param->notificationType) {
	case SA_NTF_TYPE_ALARM:
		ntfsv_free_alarm(&param->notification.alarm, true);
		break;
	case SA_NTF_TYPE_OBJECT_CREATE_DELETE:
		ntfsv_free_obj_create_del(&param->notification.objectCreateDelete, true);
		break;
	case SA_NTF_TYPE_ATTRIBUTE_CHANGE:
		ntfsv_free_attribute_change(&param->notification.attributeChange, true);
		break;
	case SA_NTF_TYPE_STATE_CHANGE:
		ntfsv_free_state_change(&param->notification.stateChange, true);
		break;
	case SA_NTF_TYPE_SECURITY_ALARM:
		ntfsv_free_security_alarm(&param->notification.securityAlarm, true);
		break;
	default:
		TRACE("notificationType not valid");
	}
	TRACE_1("free v_data.p_base %p", param->variable_data.p_base);
	free(param->variable_data.p_base);
	param->variable_data.p_base = NULL;
	param->variable_data.size = 0;
	TRACE_LEAVE();
}
开发者ID:indonexia2004,项目名称:opensaf-indo,代码行数:28,代码来源:ntfsv_mem.c

示例4: client_added_res_lib

void client_added_res_lib(SaAisErrorT error, unsigned int clientId, MDS_DEST mdsDest, MDS_SYNC_SND_CTXT *mdsCtxt)
{
	uns32 rc;
	ntfsv_msg_t msg;
	ntfsv_ckpt_msg_t ckpt;
	TRACE_ENTER2("clientId: %u, rv: %u", clientId, error);
	msg.type = NTFSV_NTFA_API_RESP_MSG;
	msg.info.api_resp_info.type = NTFSV_INITIALIZE_RSP;
	msg.info.api_resp_info.rc = error;
	msg.info.api_resp_info.param.init_rsp.client_id = clientId;
	rc = ntfs_mds_msg_send(ntfs_cb, &msg, &mdsDest, mdsCtxt, MDS_SEND_PRIORITY_HIGH);
	if (rc != NCSCC_RC_SUCCESS) {
		TRACE_LEAVE2("ntfs_mds_msg_send FAILED rc = %u", (unsigned int)rc);
		return;
	}

	if (error == SA_AIS_OK) {
		memset(&ckpt, 0, sizeof(ckpt));
		ckpt.header.ckpt_rec_type = NTFS_CKPT_INITIALIZE_REC;
		ckpt.header.num_ckpt_records = 1;
		ckpt.header.data_len = 1;
		ckpt.ckpt_rec.reg_rec.client_id = clientId;
		ckpt.ckpt_rec.reg_rec.mds_dest = mdsDest;
		update_standby(&ckpt, NCS_MBCSV_ACT_ADD);
	}
	TRACE_LEAVE();
}
开发者ID:kenzaburo,项目名称:OpenSaf-FrameWork,代码行数:27,代码来源:ntfs_com.c

示例5: amf_quiesced_state_handler

/****************************************************************************
 * Name          : amf_quiesced_state_handler
 *
 * Description   : This function is called upon receving an Quiesced state
 *                 assignment from AMF.
 *
 * Arguments     : invocation - Designates a particular invocation.
 *                 cb         - A pointer to the LGS control block. 
 *
 * Return Values : None
 *
 * Notes         : None
 *****************************************************************************/
static SaAisErrorT amf_quiesced_state_handler(lgs_cb_t *cb, SaInvocationT invocation)
{
	V_DEST_RL mds_role;
	SaAisErrorT rc = SA_AIS_OK;

	TRACE_ENTER2("HA AMF QUIESCED STATE request");
	close_all_files();

	/* Give up our IMM OI implementer role */
	immutilWrapperProfile.errorsAreFatal = 0;
	(void)immutil_saImmOiImplementerClear(cb->immOiHandle);
	immutilWrapperProfile.errorsAreFatal = 1;

	/*
	 ** Change the MDS VDSET role to Quiesced. Wait for MDS callback with type
	 ** MDS_CALLBACK_QUIESCED_ACK. Then change MBCSv role. Don't change
	 ** cb->ha_state now.
	 */

	mds_role = cb->mds_role;
	cb->mds_role = V_DEST_RL_QUIESCED;
	if ((rc = lgs_mds_change_role(cb)) != NCSCC_RC_SUCCESS) {
		LOG_ER("lgs_mds_change_role FAILED");
		rc = SA_AIS_ERR_FAILED_OPERATION;
		cb->mds_role = mds_role;
		goto done;
	}

	cb->amf_invocation_id = invocation;
	cb->is_quiesced_set = true;
done:
	return rc;
}
开发者ID:helioloureiro,项目名称:opensaf-fork,代码行数:46,代码来源:lgs_amf.c

示例6: amf_standby_state_handler

/****************************************************************************
 * Name          : amf_standby_state_handler
 *
 * Description   : This function is called upon receving an standby state
 *                 assignment from AMF.
 *
 * Arguments     : invocation - Designates a particular invocation.
 *                 cb         - A pointer to the NTFS control block. 
 *
 * Return Values : None
 *
 * Notes         : None
 *****************************************************************************/
static SaAisErrorT amf_standby_state_handler(SaInvocationT invocation)
{
	TRACE_ENTER2("HA STANDBY request");
	ntfs_cb->mds_role = V_DEST_RL_STANDBY;
	TRACE_LEAVE();
	return SA_AIS_OK;
}
开发者ID:helioloureiro,项目名称:opensaf-fork,代码行数:20,代码来源:ntfs_amf.c

示例7: avnd_su_curr_info_del

/****************************************************************************
  Name          : avnd_su_curr_info_del
 
  Description   : This routine deletes the dynamic info associated with this 
                  SU. This includes deleting the dynamic info for all it's 
                  components. If the SU is marked failed, the error 
                  escalation parameters are retained.
 
  Arguments     : cb - ptr to the AvND control block
                  su - ptr to the su
 
  Return Values : NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE
 
  Notes         : SIs associated with this SU are not deleted.
******************************************************************************/
uns32 avnd_su_curr_info_del(AVND_CB *cb, AVND_SU *su)
{
	AVND_COMP *comp = 0;
	uns32 rc = NCSCC_RC_SUCCESS;
	TRACE_ENTER2("'%s'", su->name.value);

	/* reset err-esc param & oper state (if su is healthy) */
	if (!m_AVND_SU_IS_FAILED(su)) {
		su->su_err_esc_level = AVND_ERR_ESC_LEVEL_0;
		su->comp_restart_cnt = 0;
		su->su_restart_cnt = 0;
		m_AVND_SEND_CKPT_UPDT_ASYNC_UPDT(cb, su, AVND_CKPT_SU_CONFIG);
		/* stop su_err_esc_tmr TBD Later */

		/* disable the oper state (if pi su) */
		if (m_AVND_SU_IS_PREINSTANTIABLE(su)) {
			m_AVND_SU_OPER_STATE_SET(su, SA_AMF_OPERATIONAL_DISABLED);
			m_AVND_SEND_CKPT_UPDT_ASYNC_UPDT(cb, su, AVND_CKPT_SU_OPER_STATE);
		}
	}

	/* scan & delete the current info store in each component */
	for (comp = m_AVND_COMP_FROM_SU_DLL_NODE_GET(m_NCS_DBLIST_FIND_FIRST(&su->comp_list));
	     comp; comp = m_AVND_COMP_FROM_SU_DLL_NODE_GET(m_NCS_DBLIST_FIND_NEXT(&comp->su_dll_node))) {
		rc = avnd_comp_curr_info_del(cb, comp);
		if (NCSCC_RC_SUCCESS != rc)
			goto done;
	}

 done:
	TRACE_LEAVE2("%u", rc);
	return rc;
}
开发者ID:kenzaburo,项目名称:OpenSaf-FrameWork,代码行数:48,代码来源:avnd_su.c

示例8: avnd_node_oper_req

static uns32 avnd_node_oper_req(AVND_CB *cb, AVSV_PARAM_INFO *param)
{
	uns32 rc = NCSCC_RC_FAILURE;

	TRACE_ENTER2("'%s'", param->name.value);

	switch (param->act) {
	case AVSV_OBJ_OPR_MOD:
		switch (param->attr_id) {
		case saAmfNodeSuFailoverProb_ID:
			assert(sizeof(SaTimeT) == param->value_len);
			cb->su_failover_prob = m_NCS_OS_NTOHLL_P(param->value);
			break;
		case saAmfNodeSuFailoverMax_ID:
			assert(sizeof(uns32) == param->value_len);
			cb->su_failover_max = m_NCS_OS_NTOHL(*(uns32 *)(param->value));
			break;
		default:
			LOG_NO("%s: Unsupported attribute %u", __FUNCTION__, param->attr_id);
			goto done;
		}
		break;
		
	default:
		LOG_NO("%s: Unsupported action %u", __FUNCTION__, param->act);
		goto done;
	}

	rc = NCSCC_RC_SUCCESS;

done:
	TRACE_LEAVE();
	return rc;
}
开发者ID:kenzaburo,项目名称:OpenSaf-FrameWork,代码行数:34,代码来源:avnd_di.c

示例9: avnd_dequeue_async_update_msgs

/****************************************************************************\
 * Function: avnd_dequeue_async_update_msgs
 *
 * Purpose:  De-queue async update messages.
 *
 * Input: cb - AVND CB pointer.
 *        pr_or_fr - TRUE - If we have to process the message.
 *                   FALSE - If we have to FREE the message.
 *
 * Returns: NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE.
 *
 * NOTES:
 *
 * 
\**************************************************************************/
uns32 avnd_dequeue_async_update_msgs(AVND_CB *cb, NCS_BOOL pr_or_fr)
{
	uns32 status = NCSCC_RC_SUCCESS;
	AVND_ASYNC_UPDT_MSG_QUEUE *updt_msg;

	TRACE_ENTER2("%u",pr_or_fr);

	/*
	 * This is a FIFO queue. Remove first message first entered in the 
	 * queue and then process it.
	 */
	while (NULL != (updt_msg = cb->async_updt_msgs.async_updt_queue)) {
		cb->async_updt_msgs.async_updt_queue = updt_msg->next;

		/*
		 * Process de-queued message.
		 */
		if (pr_or_fr)
			status = avnd_dec_ckpt_data_func_list[updt_msg->dec.i_reo_type] (cb, &updt_msg->dec);

		free(updt_msg);
	}

	/* All messages are dequeued. Set tail to NULL */
	cb->async_updt_msgs.tail = NULL;

	TRACE_LEAVE();
	return status;
}
开发者ID:kenzaburo,项目名称:OpenSaf-FrameWork,代码行数:44,代码来源:avnd_mbcsv.c

示例10: cluster_ccb_completed_cb

static SaAisErrorT cluster_ccb_completed_cb(CcbUtilOperationData_t *opdata)
{
	SaAisErrorT rc = SA_AIS_ERR_BAD_OPERATION;

	TRACE_ENTER2("CCB ID %llu, '%s'", opdata->ccbId, opdata->objectName.value);

	switch (opdata->operationType) {
	case CCBUTIL_CREATE:
		LOG_ER("SaAmfCluster objects cannot be created");
		goto done;
		break;
	case CCBUTIL_MODIFY:
		rc = ccb_completed_modify_hdlr(opdata);
		break;
	case CCBUTIL_DELETE:
		LOG_ER("SaAmfCluster objects cannot be deleted");
		goto done;
		break;
	default:
		assert(0);
		break;
	}

 done:
	return rc;
}
开发者ID:kenzaburo,项目名称:OpenSaf-FrameWork,代码行数:26,代码来源:avd_cluster.c

示例11: adest

/****************************************************************************
  Name          : avnd_mds_red_send
 
  Description   : This routine sends the mds message to specified AvD.
 
  Arguments     : cb       - ptr to the AvND control block
                  msg      - ptr to the message
                  dest     - ptr to the MDS destination
                  adest    - ptr to the MDS adest(anchor) 
 
  Return Values : NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE
 
  Notes         : This funtion as of now is only used to send the ACK-NACK msg
                  to AvD. This funtion is introduced to overcome the problem
                  of MDS dropping a msg when the role has changed but MDS in 
                  AvND has not updated its tables about the role change.
                  Due to this problem MDS will try to send the msg to old
                  active which may not be there in the system and hence the
                  msg will be dropped.
                  With this funtion we are sending msg to the new active AvD
                  directly, without looking for its MDS role as seen by AvND. 
******************************************************************************/
uns32 avnd_mds_red_send(AVND_CB *cb, AVND_MSG *msg, MDS_DEST *dest, MDS_DEST *adest)
{
	NCSMDS_INFO mds_info;
	MDS_SEND_INFO *send_info = &mds_info.info.svc_send;
	MDS_SENDTYPE_RED_INFO *send = &send_info->info.red;
	uns32 rc = NCSCC_RC_SUCCESS;
	TRACE_ENTER2("Msg type '%u'", msg->type);

	/* populate the mds params */
	memset(&mds_info, 0, sizeof(NCSMDS_INFO));

	mds_info.i_mds_hdl = cb->mds_hdl;
	mds_info.i_svc_id = NCSMDS_SVC_ID_AVND;
	mds_info.i_op = MDS_SEND;

	send_info->i_msg = (NCSCONTEXT)msg;
	send_info->i_priority = MDS_SEND_PRIORITY_MEDIUM;

	/* this is be used only for ACK NACK for AVD */
	if (msg->type != AVND_MSG_AVD)
		assert(0);

	send_info->i_to_svc = NCSMDS_SVC_ID_AVD;
	send_info->i_sendtype = MDS_SENDTYPE_RED;
	send->i_to_vdest = *dest;
	send->i_to_anc = *adest;	/* assumption-:ADEST is same as anchor */

	/* send the message */
	rc = ncsmds_api(&mds_info);
	if (NCSCC_RC_SUCCESS != rc)
		LOG_CR("AVND MDS send failed: Msg type = %u, vdest = %llu, anchor = %llu",msg->type,send->i_to_vdest,send->i_to_anc);

	TRACE_LEAVE2("rc '%u'", rc);
	return rc;
}
开发者ID:kenzaburo,项目名称:OpenSaf-FrameWork,代码行数:57,代码来源:avnd_mds.c

示例12: amf_active_state_handler

/****************************************************************************
 * Name          : amf_active_state_handler
 *
 * Description   : This function is called upon receving an active state
 *                 assignment from AMF.
 *
 * Arguments     : invocation - Designates a particular invocation.
 *                 cb         - A pointer to the SMFD control block. 
 *
 * Return Values : None
 *
 * Notes         : None 
 *****************************************************************************/
static SaAisErrorT amf_active_state_handler(smfd_cb_t * cb,
					    SaInvocationT invocation)
{
	SaAisErrorT rc = SA_AIS_OK;
	TRACE_ENTER2("HA ACTIVE request");
	cb->mds_role = V_DEST_RL_ACTIVE;

        //Initialize the OI handle and get the selection object
        if (campaign_oi_init(cb) != NCSCC_RC_SUCCESS) {
                LOG_ER("campaign_oi_init FAIL");
		rc = SA_AIS_ERR_FAILED_OPERATION;
        }

	//Read SMF configuration data and set cb data structure
	if (read_config_and_set_control_block(cb) != NCSCC_RC_SUCCESS) {
		LOG_ER("read_config_and_set_control_block FAIL");
		rc = SA_AIS_ERR_FAILED_OPERATION;
	}

        //Set class implementers, recreate campaign objects and start callbackUtil thread
	if (campaign_oi_activate(cb) != NCSCC_RC_SUCCESS) {
		LOG_ER("amf_active_state_handler oi activate FAIL");
		rc = SA_AIS_ERR_FAILED_OPERATION;
	}

	TRACE_LEAVE();
	return rc;
}
开发者ID:indonexia2004,项目名称:opensaf-indo,代码行数:41,代码来源:smfd_amf.c

示例13: ava_hdl_cbk_rec_prc

/****************************************************************************
  Name          : ava_hdl_cbk_rec_prc
 
  Description   : This routine invokes the registered callback routine.
 
  Arguments     : cb      - ptr to the AvA control block
                  hdl_rec - ptr to the hdl rec
                  cbk_rec - ptr to the callback record
 
  Return Values : None
 
  Notes         : It may so happen that the callbacks that are dispatched may 
                  finalize on the amf handle. Release AMF handle to the handle
                  manager before dispatching. Else Finalize blocks while 
                  destroying the association with handle manager.
******************************************************************************/
void ava_hdl_cbk_rec_prc(AVSV_AMF_CBK_INFO *info, SaAmfCallbacksT *reg_cbk)
{
	TRACE_ENTER2("CallbackType = %d",info->type);

	/* invoke the corresponding callback */
	switch (info->type) {
	case AVSV_AMF_HC:
		{
			AVSV_AMF_HC_PARAM *hc = &info->param.hc;
			if (reg_cbk->saAmfHealthcheckCallback) {
				hc->comp_name.length = hc->comp_name.length;
				TRACE("Invoking Healthcheck Callback:\
					InvocationId = %llx, Component Name =  %s, Healthcheck Key = %s",
					info->inv, hc->comp_name.value, hc->hc_key.key);
				reg_cbk->saAmfHealthcheckCallback(info->inv, &hc->comp_name, &hc->hc_key);
			}
		}
		break;

	case AVSV_AMF_COMP_TERM:
		{
			AVSV_AMF_COMP_TERM_PARAM *comp_term = &info->param.comp_term;

			if (reg_cbk->saAmfComponentTerminateCallback) {
				comp_term->comp_name.length = comp_term->comp_name.length;
				TRACE("Invoking component's saAmfComponentTerminateCallback: InvocationId = %llx,\
					 component name = %s",info->inv, comp_term->comp_name.value);
				reg_cbk->saAmfComponentTerminateCallback(info->inv, &comp_term->comp_name);
			}
		}
开发者ID:helioloureiro,项目名称:opensaf-fork,代码行数:46,代码来源:ava_hdl.c

示例14: amf_quiescing_state_handler

/****************************************************************************
 * Name          : amf_quiescing_state_handler
 *
 * Description   : This function is called upon receving an Quiescing state
 *                 assignment from AMF.
 *
 * Arguments     : invocation - Designates a particular invocation.
 *                 cb         - A pointer to the SMFD control block. 
 *
 * Return Values : None
 *
 * Notes         : None
 *****************************************************************************/
static SaAisErrorT amf_quiescing_state_handler(smfd_cb_t * cb,
					       SaInvocationT invocation)
{
	TRACE_ENTER2("HA QUIESCING request");

	return saAmfCSIQuiescingComplete(cb->amf_hdl, invocation, SA_AIS_OK);
}
开发者ID:indonexia2004,项目名称:opensaf-indo,代码行数:20,代码来源:smfd_amf.c

示例15: ntfa_startup

/**
 * 
 * 
 * @return unsigned int
 */
unsigned int ntfa_startup(void)
{
	unsigned int rc = NCSCC_RC_SUCCESS;
	pthread_mutex_lock(&ntfa_lock);

	TRACE_ENTER2("ntfa_use_count: %u", ntfa_use_count);
	if (ntfa_use_count > 0) {
		/* Already created, just increment the use_count */
		ntfa_use_count++;
		goto done;
	} else {
		if ((rc = ncs_agents_startup()) != NCSCC_RC_SUCCESS) {
			TRACE("ncs_agents_startup FAILED");
			goto done;
		}

		if ((rc = ntfa_create()) != NCSCC_RC_SUCCESS) {
			ncs_agents_shutdown();
			goto done;
		} else
			ntfa_use_count = 1;
	}

 done:
	pthread_mutex_unlock(&ntfa_lock);
	TRACE_LEAVE2("rc: %u, ntfa_use_count: %u", rc, ntfa_use_count);
	return rc;
}
开发者ID:kenzaburo,项目名称:OpenSaf-FrameWork,代码行数:33,代码来源:ntfa_util.c


注:本文中的TRACE_ENTER2函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。