示例#1
0
void rwmsg_broker_main(uint32_t sid,
		       uint32_t instid,
		       uint32_t bro_instid,
		       rwsched_instance_ptr_t rws,
		       rwsched_tasklet_ptr_t tinfo,
		       rwcal_module_ptr_t rwcal,
		       uint32_t usemainq,
           rwtasklet_info_t *rwtasklet_info,
		       rwmsg_broker_t **bro_out) {
  
  rwmsg_broker_t *bro;
  rwmsg_endpoint_t *ep;

  ep = rwmsg_endpoint_create(sid, instid, bro_instid, rws, tinfo, rwtrace_init(), NULL);

  bro = rwmsg_broker_create(sid, bro_instid, NULL, rws, tinfo, rwcal, usemainq, ep, rwtasklet_info);
  if (bro_out) {
    *bro_out = bro;
  }

  /* Decrement by one, such that broker_halt will release the endpoint */
  RW_ASSERT(ep->refct >= 2);
  rwmsg_endpoint_release(ep);

  return;
}
示例#2
0
文件: rift.c 项目: RIFTIO/RIFT.ware
/**
 * Initializes the RW.TRACE context and sets the severity as specified in the
 * command line.
 */
static void controller_init_trace(rwcli_controller_t* inst)
{
  inst->trace_ctxt = rwtrace_init();
  RW_ASSERT(inst->trace_ctxt);

  if (rift_cmdargs.trace_level == -1) {
    // trace level not set, using ERROR as default
    rift_cmdargs.trace_level = RWTRACE_SEVERITY_ERROR;
  }

  rwtrace_ctx_category_destination_set(inst->trace_ctxt, RWTRACE_CATEGORY_RWCLI,
                RWTRACE_DESTINATION_CONSOLE);
  rwtrace_ctx_category_severity_set(inst->trace_ctxt, RWTRACE_CATEGORY_RWCLI,
                (rwtrace_category_t)rift_cmdargs.trace_level);
}
示例#3
0
文件: rift.c 项目: mash0304/RIFT.ware
void rift_init_trace()
{
  rwcli_trace = rwtrace_init();
  RW_ASSERT(rwcli_trace);

  if (rift_cmdargs.trace_level == -1) {
    // trace level not set, using ERROR as default
    rift_cmdargs.trace_level = RWTRACE_SEVERITY_ERROR;
  }

  rwtrace_ctx_category_destination_set(rwcli_trace, RWTRACE_CATEGORY_RWCLI,
                RWTRACE_DESTINATION_CONSOLE);
  rwtrace_ctx_category_severity_set(rwcli_trace, RWTRACE_CATEGORY_RWCLI,
                (rwtrace_category_t)rift_cmdargs.trace_level);
}