您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ stats_init函数代码示例

51自学网 2021-06-03 08:23:07
  C++
这篇教程C++ stats_init函数代码示例写得很实用,希望能帮到您。

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

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

示例1: main

int main(int argc, char** argv){        /*        主线程主体流程:        conn_init;        thread_init;        还得有一个        stat_init        stats的结构是用来记录当前的状态的,stats是一个静态变量            server_socket 请求,分发        注册事件loop    */    int retval;    main_base = event_init();    FILE *portnumber_file = NULL;    portnumber_file = fopen("/tmp/portnumber.file", "a");    stats_init();    conn_init();    thread_init(NUM_OF_THREADS);    server_socket("127.0.0.1", SERVER_PORT, tcp_transport, portnumber_file);    if (event_base_loop(main_base, 0) != 0) {	printf("event_base_loop error");        retval = EXIT_FAILURE;    }    return retval;    exit(0);}
开发者ID:wadee,项目名称:go_proj,代码行数:32,


示例2: app_startup

voidapp_startup(void){  msg_init(FALSE);  iv_set_fatal_msg_handler(app_fatal);  iv_init();  g_thread_init(NULL);  crypto_init();  hostname_global_init();  dns_caching_global_init();  dns_caching_thread_init();  afinter_global_init();  child_manager_init();  alarm_init();  stats_init();  tzset();  log_msg_global_init();  log_tags_global_init();  log_source_global_init();  log_template_global_init();  value_pairs_global_init();  service_management_init();  scratch_buffers_allocator_init();  main_loop_thread_resource_init();  nondumpable_setlogger(nondumpable_allocator_logger);  secret_storage_init();  transport_factory_id_global_init();}
开发者ID:jszigetvari,项目名称:syslog-ng,代码行数:28,


示例3: main

/** * main * * The main task for the project. This function initializes the packages, calls * init_tasks to initialize additional tasks (and possibly other objects), * then starts serving events from default event queue. * * @return int NOTE: this function should never return! */intmain(int argc, char **argv){    int rc;#ifdef ARCH_sim    mcu_sim_parse_args(argc, argv);#endif    sysinit();    cbmem_init(&cbmem, cbmem_buf, MAX_CBMEM_BUF);    log_register("log", &my_log, &log_cbmem_handler, &cbmem, LOG_SYSLEVEL);    stats_init(STATS_HDR(g_stats_gpio_toggle),               STATS_SIZE_INIT_PARMS(g_stats_gpio_toggle, STATS_SIZE_32),               STATS_NAME_INIT_PARMS(gpio_stats));    stats_register("gpio_toggle", STATS_HDR(g_stats_gpio_toggle));    conf_load();    reboot_start(hal_reset_cause());    init_tasks();    while (1) {        os_eventq_run(os_eventq_dflt_get());    }    /* Never exit */    return rc;}
开发者ID:vrahane,项目名称:incubator-mynewt-core,代码行数:41,


示例4: test_stats

voidtest_stats(){  GString *reply = NULL;  GString *command = g_string_sized_new(128);  StatsCounterItem *counter = NULL;  gchar **stats_result;  stats_init();  stats_lock();  stats_register_counter(0, SCS_CENTER, "id", "received", SC_TYPE_PROCESSED, &counter);  stats_unlock();  g_string_assign(command,"STATS");  reply = control_connection_send_stats(command);  stats_result = g_strsplit(reply->str, "/n", 2);  assert_string(stats_result[0], "SourceName;SourceId;SourceInstance;State;Type;Number",                "Bad reply");  g_strfreev(stats_result);  g_string_free(reply, TRUE);  g_string_free(command, TRUE);  stats_destroy();  return;}
开发者ID:Achint08,项目名称:syslog-ng,代码行数:26,


示例5: main

/** * main * * The main function for the project. This function initializes the os, calls * init_tasks to initialize tasks (and possibly other objects), then starts the * OS. We should not return from os start. * * @return int NOTE: this function should never return! */intmain(int argc, char **argv){    int rc;#ifdef ARCH_sim    mcu_sim_parse_args(argc, argv);#endif    sysinit();    cbmem_init(&cbmem, cbmem_buf, MAX_CBMEM_BUF);    log_register("log", &my_log, &log_cbmem_handler, &cbmem, LOG_SYSLEVEL);    stats_init(STATS_HDR(g_stats_gpio_toggle),               STATS_SIZE_INIT_PARMS(g_stats_gpio_toggle, STATS_SIZE_32),               STATS_NAME_INIT_PARMS(gpio_stats));    stats_register("gpio_toggle", STATS_HDR(g_stats_gpio_toggle));    conf_load();    log_reboot(HARD_REBOOT);    init_tasks();    os_start();    /* os start should never return. If it does, this should be an error */    assert(0);    return rc;}
开发者ID:apache,项目名称:incubator-mynewt-core,代码行数:42,


示例6: test_action_execute_drop

/* Try to execute action with the drop action, which should succeed */static voidtest_action_execute_drop(int argc, char *argv[]){	struct rte_mbuf buf_free;	struct rte_mbuf buf_drop;	struct action action_multiple[MAX_ACTIONS] = {0};	struct action action_drop[MAX_ACTIONS] = {0};	stats_init();	stats_vswitch_clear();	/* TODO: Break this into multiple tests? */	/* check that mbuf is freed on drop */	assert(memcmp(&buf_free, &buf_drop, sizeof(buf_drop)) != 0);	buf_drop.pkt.next = NULL; /* Required for rte_pktmbuf_free */	memcpy(&buf_free, &buf_drop, sizeof(buf_drop));	assert(memcmp(&buf_free, &buf_drop, sizeof(buf_drop)) == 0);	action_drop_build(&action_drop[0]);	action_null_build(&action_drop[1]);	action_execute(action_drop, &buf_free);	assert(memcmp(&buf_free, &buf_drop, sizeof(buf_drop)) != 0);	/* check that vswitch rx drop stats are increased */	stats_vswitch_clear();	assert(stats_vswitch_rx_drop_get() == 0);	action_drop_build(&action_drop[0]);	action_null_build(&action_drop[1]);	action_execute(action_drop, &buf_drop);	assert(stats_vswitch_rx_drop_get() == 1);}
开发者ID:Grace-Liu,项目名称:dpdk-ovs,代码行数:30,


示例7: race_set

void race_set(struct race_t* pRace, const char* name,    unsigned str, unsigned dex, unsigned con, unsigned intel, unsigned wis){    pRace->name[0] = '/0';    strcat(pRace->name, name);    stats_init(&pRace->stats, str, dex, con, intel, wis);}
开发者ID:metiscus,项目名称:meow,代码行数:7,


示例8: main

int main(int argc, char **argv) {	char *config_xml;	if (argc != 2) {		printf("Usage: %s config.xml /n", argv[0]);		return (EXIT_SUCCESS);	}	// GET Ctrl+C signal;	signal(SIGINT, exit_proc);	/** Read configure file */	config_xml = argv[1];	parse_doc(config_xml);	/** Initialize NFQUEUE forwarding process, logging files e.t.c */	if(!nfqp_init() || !glb_init() || !stats_init() /* MYSQL , */){		exit_proc();	}	nfqp_analyzer_function();	return(EXIT_SUCCESS);}
开发者ID:SolitaryX88,项目名称:FlowEinziehen,代码行数:35,


示例9: tcs34725_init

/** * Expects to be called back through os_dev_create(). * * @param The device object associated with this color sensor * @param Argument passed to OS device init, unused * * @return 0 on success, non-zero error on failure. */inttcs34725_init(struct os_dev *dev, void *arg){    struct tcs34725 *tcs34725;    struct sensor *sensor;    int rc;    if (!arg || !dev) {        rc = SYS_ENODEV;        goto err;    }    tcs34725 = (struct tcs34725 *) dev;    tcs34725->cfg.mask = SENSOR_TYPE_ALL;    sensor = &tcs34725->sensor;    /* Initialise the stats entry */    rc = stats_init(        STATS_HDR(g_tcs34725stats),        STATS_SIZE_INIT_PARMS(g_tcs34725stats, STATS_SIZE_32),        STATS_NAME_INIT_PARMS(tcs34725_stat_section));    SYSINIT_PANIC_ASSERT(rc == 0);    /* Register the entry with the stats registry */    rc = stats_register("tcs34725", STATS_HDR(g_tcs34725stats));    SYSINIT_PANIC_ASSERT(rc == 0);    rc = sensor_init(sensor, dev);    if (rc != 0) {        goto err;    }    /* Add the color sensor driver */    rc = sensor_set_driver(sensor, SENSOR_TYPE_COLOR,                           (struct sensor_driver *) &g_tcs34725_sensor_driver);    if (rc != 0) {        goto err;    }    /* Set the interface */    rc = sensor_set_interface(sensor, arg);    if (rc) {        goto err;    }    rc = sensor_mgr_register(sensor);    if (rc != 0) {        goto err;    }    rc = sensor_set_type_mask(sensor, tcs34725->cfg.mask);    if (rc) {        goto err;    }    return (0);err:    return (rc);}
开发者ID:ccollins476ad,项目名称:incubator-mynewt-core,代码行数:68,


示例10: while

// initialisationvoid DataFlash_MAVLink::Init(const struct LogStructure *structure, uint8_t num_types){    DataFlash_Backend::Init(structure, num_types);    _blocks = NULL;    while (_blockcount >= 8) { // 8 is a *magic* number        _blocks = (struct dm_block *) malloc(_blockcount * sizeof(_blocks[0]));        if (_blocks != NULL) {            break;        }        _blockcount /= 2;    }    if (_blocks == NULL) {        return;    }    free_all_blocks();    stats_init();    _initialised = true;    _logging_started = true; // in actual fact, we throw away                             // everything until a client connects.                             // This stops calls to start_new_log from                             // the vehicles}
开发者ID:3drobotics,项目名称:ardupilot-solo,代码行数:27,


示例11: while

// initialisationvoid DataFlash_MAVLink::Init(){    semaphore = hal.util->new_semaphore();    if (semaphore == nullptr) {        AP_HAL::panic("Failed to create DataFlash_MAVLink semaphore");        return;    }    DataFlash_Backend::Init();    _blocks = nullptr;    while (_blockcount >= 8) { // 8 is a *magic* number        _blocks = (struct dm_block *) malloc(_blockcount * sizeof(_blocks[0]));        if (_blocks != nullptr) {            break;        }        _blockcount /= 2;    }    if (_blocks == nullptr) {        return;    }    free_all_blocks();    stats_init();    _initialised = true;    _logging_started = true; // in actual fact, we throw away                             // everything until a client connects.                             // This stops calls to start_new_log from                             // the vehicles}
开发者ID:Hurisa,项目名称:ardupilot,代码行数:33,


示例12: test_stats_vport_xxx_clear

/* Try to clear stats for all vport counters, which should succeed */static voidtest_stats_vport_xxx_clear(int argc, char *argv[]){	int vportid = 0;	stats_init();	stats_vport_clear_all();	/* increment stats so there's something to clear */	for (vportid = 0; vportid < MAX_VPORTS; vportid++) {		stats_vport_rx_increment(vportid, 23);		stats_vport_rx_drop_increment(vportid, 23);		stats_vport_tx_increment(vportid, 23);		stats_vport_tx_drop_increment(vportid, 23);		stats_vport_overrun_increment(vportid, 23);		stats_vport_rx_increment(vportid, 19);		stats_vport_rx_drop_increment(vportid, 19);		stats_vport_tx_increment(vportid, 19);		stats_vport_tx_drop_increment(vportid, 19);		stats_vport_overrun_increment(vportid, 19);	}	for (vportid = 0; vportid < MAX_VPORTS; vportid++) {		stats_vport_clear(vportid);		assert(stats_vport_rx_get(vportid) == 0);		assert(stats_vport_rx_drop_get(vportid) == 0);		assert(stats_vport_tx_get(vportid) == 0);		assert(stats_vport_tx_drop_get(vportid) == 0);		assert(stats_vport_overrun_get(vportid) == 0);	}}
开发者ID:Grace-Liu,项目名称:dpdk-ovs,代码行数:32,


示例13: test_reset_stats

voidtest_reset_stats(){  GString *reply = NULL;  GString *command = g_string_sized_new(128);  StatsCounterItem *counter = NULL;  stats_init();  stats_lock();  stats_register_counter(0, SCS_CENTER, "id", "received", SC_TYPE_PROCESSED, &counter);  stats_counter_set(counter, 666);  stats_unlock();  g_string_assign(command, "RESET_STATS");  reply = control_connection_reset_stats(command);  assert_string(reply->str, "The statistics of syslog-ng have been reset to 0.", "Bad reply");  g_string_free(reply, TRUE);  g_string_assign(command, "STATS");  reply = control_connection_send_stats(command);  assert_string(reply->str, "SourceName;SourceId;SourceInstance;State;Type;Number/ncenter;id;received;a;processed;0/n", "Bad reply");  g_string_free(reply, TRUE);  stats_destroy();  g_string_free(command, TRUE);  return;}
开发者ID:Achint08,项目名称:syslog-ng,代码行数:27,


示例14: i1480u_init

static inlinevoid i1480u_init(struct i1480u *i1480u){	/* nothing so far... doesn't it suck? */	spin_lock_init(&i1480u->lock);	INIT_LIST_HEAD(&i1480u->tx_list);	spin_lock_init(&i1480u->tx_list_lock);	wlp_options_init(&i1480u->options);	edc_init(&i1480u->tx_errors);	edc_init(&i1480u->rx_errors);#ifdef i1480u_FLOW_CONTROL	edc_init(&i1480u->notif_edc);#endif	stats_init(&i1480u->lqe_stats);	stats_init(&i1480u->rssi_stats);	wlp_init(&i1480u->wlp);}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:17,


示例15: setup

static voidsetup(void){  g_thread_init(NULL);  stats_init();  scratch_buffers_global_init();  scratch_buffers_allocator_init();}
开发者ID:jszigetvari,项目名称:syslog-ng,代码行数:8,


示例16: lwip_init

/** * Perform Sanity check of user-configurable values, and initialize all modules. */voidlwip_init(void){  /* Sanity check user-configurable values */  lwip_sanity_check();  /* Modules initialization */  stats_init();#if !NO_SYS  sys_init();#endif /* !NO_SYS */  mem_init();  memp_init();  pbuf_init();  netif_init();#if LWIP_SOCKET  lwip_socket_init();#endif /* LWIP_SOCKET */  ip_init();#if LWIP_ARP  etharp_init();#endif /* LWIP_ARP */#if LWIP_RAW  raw_init();#endif /* LWIP_RAW */#if LWIP_UDP  udp_init();#endif /* LWIP_UDP */#if LWIP_TCP  tcp_init();#endif /* LWIP_TCP */#if LWIP_SNMP  snmp_init();#endif /* LWIP_SNMP */#if LWIP_AUTOIP  autoip_init();#endif /* LWIP_AUTOIP */#if LWIP_IGMP  igmp_init();#endif /* LWIP_IGMP */#if LWIP_DNS  dns_init();#endif /* LWIP_DNS */#if LWIP_TIMERS  sys_timeouts_init();#endif /* LWIP_TIMERS */#if !NO_SYS  /* in the Xilinx lwIP 1.2.0 port, lwip_init() was added as a convenience utility function     to initialize all the lwIP layers. lwIP 1.3.0 introduced lwip_init() in the base lwIP     itself. However a user cannot use lwip_init() regardless of whether it is raw or socket     modes. The following call to lwip_sock_init() is made to make sure that lwIP is properly     initialized in both raw & socket modes with just a call to lwip_init().   */  lwip_sock_init();#endif}
开发者ID:GiannisRambo,项目名称:lwip,代码行数:61,


示例17: lwip_init

/** * Perform Sanity check of user-configurable values, and initialize all modules. */voidlwip_init(void){  /*++ Changed by Espressif ++*/  MEMP_NUM_TCP_PCB = 5;  TCP_WND = (4 * TCP_MSS);  TCP_MAXRTX = 3;  TCP_SYNMAXRTX = 6;  /*--                      --*/  /* Modules initialization */  stats_init();#if !NO_SYS  sys_init();#endif /* !NO_SYS *//*++ Changed by Espressif ++*/#if 0  mem_init(&_bss_end);#endif/*--                      --*/  memp_init();  pbuf_init();  netif_init();#if LWIP_SOCKET  lwip_socket_init();#endif /* LWIP_SOCKET */  ip_init();#if LWIP_ARP  etharp_init();#endif /* LWIP_ARP */#if LWIP_RAW  raw_init();#endif /* LWIP_RAW */#if LWIP_UDP  udp_init();#endif /* LWIP_UDP */#if LWIP_TCP  tcp_init();#endif /* LWIP_TCP */#if LWIP_SNMP  snmp_init();#endif /* LWIP_SNMP */#if LWIP_AUTOIP  autoip_init();#endif /* LWIP_AUTOIP */#if LWIP_IGMP  igmp_init();#endif /* LWIP_IGMP */#if LWIP_DNS  dns_init();#endif /* LWIP_DNS */#if LWIP_TIMERS  sys_timeouts_init();#endif /* LWIP_TIMERS */}
开发者ID:sdelavega,项目名称:smart.js,代码行数:60,


示例18: bno055_init

/** * Expects to be called back through os_dev_create(). * * @param The device object associated with this accellerometer * @param Argument passed to OS device init, unused * * @return 0 on success, non-zero error on failure. */intbno055_init(struct os_dev *dev, void *arg){    struct bno055 *bno055;    struct sensor *sensor;    int rc;    bno055 = (struct bno055 *) dev;    rc = bno055_default_cfg(&bno055->cfg);    if (rc) {        goto err;    }#if MYNEWT_VAL(BNO055_LOG)    log_register("bno055", &_log, &log_console_handler, NULL, LOG_SYSLEVEL);#endif    sensor = &bno055->sensor;#if MYNEWT_VAL(BNO055_STATS)    /* Initialise the stats entry */    rc = stats_init(        STATS_HDR(g_bno055stats),        STATS_SIZE_INIT_PARMS(g_bno055stats, STATS_SIZE_32),        STATS_NAME_INIT_PARMS(bno055_stat_section));    SYSINIT_PANIC_ASSERT(rc == 0);    /* Register the entry with the stats registry */    rc = stats_register("bno055", STATS_HDR(g_bno055stats));    SYSINIT_PANIC_ASSERT(rc == 0);#endif    rc = sensor_init(sensor, dev);    if (rc != 0) {        goto err;    }    /* Add the accelerometer/magnetometer driver */    rc = sensor_set_driver(sensor, SENSOR_TYPE_ACCELEROMETER         |            SENSOR_TYPE_MAGNETIC_FIELD | SENSOR_TYPE_GYROSCOPE       |            SENSOR_TYPE_TEMPERATURE    | SENSOR_TYPE_ROTATION_VECTOR |            SENSOR_TYPE_GRAVITY        | SENSOR_TYPE_LINEAR_ACCEL    |            SENSOR_TYPE_EULER, (struct sensor_driver *) &g_bno055_sensor_driver);    if (rc != 0) {        goto err;    }    rc = sensor_mgr_register(sensor);    if (rc != 0) {        goto err;    }    return (0);err:    return (rc);}
开发者ID:a3zzat,项目名称:incubator-mynewt-core,代码行数:64,


示例19: Java_com_android_spinningcube_SpinningCubeLib_init

JNIEXPORT void JNICALL Java_com_android_spinningcube_SpinningCubeLib_init(JNIEnv * env, jobject obj,  jint width, jint height, jstring vShader, jstring fShader){    if(!gVertexShader && !gFragmentShader) {	gVertexShader = env->GetStringUTFChars(vShader, 0);	gFragmentShader = env->GetStringUTFChars(fShader, 0);    }    setupGraphics(width, height);    stats_init(&stats);}
开发者ID:a-s-j,项目名称:spinningcube,代码行数:10,


示例20: init_stats

static void init_stats(system_data_t *sysdata){	assert(sysdata);	assert(sysdata->stats == NULL);		sysdata->stats = (stats_t *) malloc(sizeof(stats_t));	stats_init(sysdata->stats);	sysdata->stats->sysdata = sysdata;	stats_start(sysdata->stats);}
开发者ID:hyper,项目名称:rqd,代码行数:10,


示例21: network_init

void network_init(){	struct ip_addr ipaddr, netmask, gw;	printf("trying to initialize network.../n");#ifdef STATS	stats_init();#endif /* STATS */	mem_init();	memp_init();	pbuf_init(); 	netif_init();	ip_init();	udp_init();	tcp_init();	etharp_init();	printf("ok now the NIC/n");		if (!netif_add(&netif, &ipaddr, &netmask, &gw, NULL, enet_init, ip_input))	{		printf("netif_add failed!/n");		return;	}		netif_set_default(&netif);		dhcp_start(&netif);		mftb(&last_tcp);	mftb(&last_dhcp);		printf("/nWaiting for DHCP");	int i;		for (i=0; i<10; i++) {		mdelay(500);		network_poll();				printf(".");				if (netif.ip_addr.addr)			break;	}		if (netif.ip_addr.addr) {		printf("%u.%u.%u.%u/n",				(netif.ip_addr.addr >> 24) & 0xFF,			(netif.ip_addr.addr >> 16) & 0xFF,			(netif.ip_addr.addr >>  8) & 0xFF,			(netif.ip_addr.addr >>  0) & 0xFF);					printf("/n");	} else {
开发者ID:CJP1973,项目名称:xell,代码行数:55,


示例22: lwip_init

/** * Perform Sanity check of user-configurable values, and initialize all modules. */voidlwip_init(void){  esp_ms_timer_init(); // espressif  /* Modules initialization */  stats_init();#if !NO_SYS  sys_init();#endif /* !NO_SYS */  mem_init();  memp_init();  pbuf_init();  netif_init();#if LWIP_IPV4  ip_init();#if LWIP_ARP  etharp_init();#endif /* LWIP_ARP */#endif /* LWIP_IPV4 */#if LWIP_RAW  raw_init();#endif /* LWIP_RAW */#if LWIP_UDP  udp_init();#endif /* LWIP_UDP */#if LWIP_TCP  tcp_init();#endif /* LWIP_TCP */#if LWIP_SNMP  snmp_init();#endif /* LWIP_SNMP */#if LWIP_AUTOIP  autoip_init();#endif /* LWIP_AUTOIP */#if LWIP_IGMP  igmp_init();#endif /* LWIP_IGMP */#if LWIP_DNS  dns_init();#endif /* LWIP_DNS */#if LWIP_IPV6  ip6_init();  nd6_init();#if LWIP_IPV6_MLD  mld6_init();#endif /* LWIP_IPV6_MLD */#endif /* LWIP_IPV6 */#if PPP_SUPPORT  ppp_init();#endif#if LWIP_TIMERS  sys_timeouts_init();#endif /* LWIP_TIMERS */}
开发者ID:alemoke,项目名称:esp8266-frankenstein,代码行数:58,


示例23: main

int main(int argc, char *argv[]) {	struct fuse_args args = FUSE_ARGS_INIT(argc, argv);	init_syslog();	uopt_init();	if (fuse_opt_parse(&args, NULL, unionfs_opts, unionfs_opt_proc) == -1) RETURN(1);	if (uopt.debug)	debug_init();	if (!uopt.doexit) {		if (uopt.nbranches == 0) {			printf("You need to specify at least one branch!/n");			RETURN(1);		}		if (uopt.stats_enabled) stats_init(&stats);	}	// enable fuse permission checks, we need to set this, even we we are	// not root, since we don't have our own access() function	int uid = getuid();	int gid = getgid();	bool default_permissions = true;		if (uid != 0 && gid != 0 && uopt.relaxed_permissions) {		default_permissions = false;	} else if (uopt.relaxed_permissions) {		// protec the user of a very critical security issue		fprintf(stderr, "Relaxed permissions disallowed for root!/n");		exit(1);	}		if (default_permissions) {		if (fuse_opt_add_arg(&args, "-odefault_permissions")) {			fprintf(stderr, "Severe failure, can't enable permssion checks, aborting!/n");			exit(1);		}	}	unionfs_post_opts();#ifdef FUSE_CAP_BIG_WRITES	/* libfuse > 0.8 supports large IO, also for reads, to increase performance 	 * We support any IO sizes, so lets enable that option */	if (fuse_opt_add_arg(&args, "-obig_writes")) {		fprintf(stderr, "Failed to enable big writes!/n");		exit(1);	}#endif	umask(0);	int res = fuse_main(args.argc, args.argv, &unionfs_oper, NULL);	RETURN(uopt.doexit ? uopt.retval : res);}
开发者ID:luckpizza,项目名称:unionfs-fuse-for-android,代码行数:54,


示例24: test_stats_vswitch_increment

/* Try to increment stats for all vswitch counters, which should * succeed */static voidtest_stats_vswitch_increment(int argc, char *argv[]){	stats_init();	stats_vswitch_clear();	stats_vswitch_rx_drop_increment(23);	stats_vswitch_tx_drop_increment(23);	stats_vswitch_rx_drop_increment(19);	stats_vswitch_tx_drop_increment(19);}
开发者ID:Grace-Liu,项目名称:dpdk-ovs,代码行数:13,


示例25: _thread_process

void _thread_process(moThread *thread) {	moModule *module = (moModule *)thread->getUserData();	stats_init(&module->stats);	while ( !thread->wantQuit() ) {		if ( !module->needUpdate(true) )			continue;		stats_wait(&module->stats);		module->update();		stats_process(&module->stats);	}}
开发者ID:JDPennock,项目名称:Movid,代码行数:12,


示例26: lwip_init

/** * Perform Sanity check of user-configurable values, and initialize all modules. */void ICACHE_FLASH_ATTRlwip_init(void){    /* Modules initialization */    stats_init();#if !NO_SYS    sys_init();#endif /* !NO_SYS */    mem_init();    memp_init();    pbuf_init();    netif_init();#if LWIP_SOCKET    lwip_socket_init();#endif /* LWIP_SOCKET */    ip_init();#if LWIP_ARP    etharp_init();#endif /* LWIP_ARP */#if LWIP_RAW    raw_init();#endif /* LWIP_RAW */#if LWIP_UDP    udp_init();#endif /* LWIP_UDP */#if LWIP_TCP    tcp_init();#endif /* LWIP_TCP */#if LWIP_SNMP    snmp_init();#endif /* LWIP_SNMP */#if LWIP_AUTOIP    autoip_init();#endif /* LWIP_AUTOIP */#if LWIP_IGMP    igmp_init();#endif /* LWIP_IGMP */#if LWIP_DNS    dns_init();#endif /* LWIP_DNS */#if LWIP_IPV6    ip6_init();    nd6_init();#if LWIP_IPV6_MLD    mld6_init();#endif /* LWIP_IPV6_MLD */#endif /* LWIP_IPV6 */#if LWIP_TIMERS    sys_timeouts_init();#endif /* LWIP_TIMERS */}
开发者ID:houzhenggang,项目名称:esp8266-rtos-sdk,代码行数:55,


示例27: main

/** * main * * The main task for the project. This function initializes the packages, calls * init_tasks to initialize additional tasks (and possibly other objects), * then starts serving events from default event queue. * * @return int NOTE: this function should never return! */intmain(int argc, char **argv){    int rc;#ifdef ARCH_sim    mcu_sim_parse_args(argc, argv);#endif    sysinit();    rc = conf_register(&test_conf_handler);    assert(rc == 0);    cbmem_init(&cbmem, cbmem_buf, MAX_CBMEM_BUF);    log_register("log", &my_log, &log_cbmem_handler, &cbmem, LOG_SYSLEVEL);    stats_init(STATS_HDR(g_stats_gpio_toggle),               STATS_SIZE_INIT_PARMS(g_stats_gpio_toggle, STATS_SIZE_32),               STATS_NAME_INIT_PARMS(gpio_stats));    stats_register("gpio_toggle", STATS_HDR(g_stats_gpio_toggle));    flash_test_init();    conf_load();    log_reboot(hal_reset_cause());    init_tasks();    /* If this app is acting as the loader in a split image setup, jump into     * the second stage application instead of starting the OS.     */#if MYNEWT_VAL(SPLIT_LOADER)    {        void *entry;        rc = split_app_go(&entry, true);        if(rc == 0) {            hal_system_restart(entry);        }    }#endif    /*     * As the last thing, process events from default event queue.     */    while (1) {        os_eventq_run(os_eventq_dflt_get());    }}
开发者ID:a3zzat,项目名称:incubator-mynewt-core,代码行数:60,


示例28: main

int main(int argc, char** argv) {    stats_init();    int i = 0;    while (++i < 5000) {        stats_add(ARANDN, ARANDN, ARANDN);        if (i % 10 == 0) {            printf("xsum: %d/nysum: %d/nzsum: %d/nptr: %d/n/n", stats.xsum, stats.ysum, stats.zsum, stats.aptr);        }    }    return 0;}
开发者ID:ColoradoSchoolOfMines,项目名称:parking_sensor,代码行数:14,


示例29: control

static int control(struct af_instance_s *af, int cmd, void *arg){    struct af_stats *s = af->setup;    switch(cmd) {        case AF_CONTROL_REINIT:            return stats_init(af, s, arg);        case AF_CONTROL_PRE_DESTROY:            stats_print(s);            return AF_OK;    }    return AF_UNKNOWN;}
开发者ID:HermiG,项目名称:mplayer2,代码行数:14,


示例30: mpu6050_init

/** * Expects to be called back through os_dev_create(). * * @param The device object associated with this accellerometer * @param Argument passed to OS device init, unused * * @return 0 on success, non-zero error on failure. */intmpu6050_init(struct os_dev *dev, void *arg){    struct mpu6050 *mpu;    struct sensor *sensor;    int rc;    if (!arg || !dev) {        return SYS_ENODEV;    }    mpu = (struct mpu6050 *) dev;    mpu->cfg.mask = SENSOR_TYPE_ALL;    log_register(dev->od_name, &_log, &log_console_handler, NULL, LOG_SYSLEVEL);    sensor = &mpu->sensor;    /* Initialise the stats entry */    rc = stats_init(        STATS_HDR(g_mpu6050stats),        STATS_SIZE_INIT_PARMS(g_mpu6050stats, STATS_SIZE_32),        STATS_NAME_INIT_PARMS(mpu6050_stat_section));    SYSINIT_PANIC_ASSERT(rc == 0);    /* Register the entry with the stats registry */    rc = stats_register(dev->od_name, STATS_HDR(g_mpu6050stats));    SYSINIT_PANIC_ASSERT(rc == 0);    rc = sensor_init(sensor, dev);    if (rc) {        return rc;    }    /* Add the accelerometer/gyroscope driver */    rc = sensor_set_driver(sensor, SENSOR_TYPE_GYROSCOPE |        SENSOR_TYPE_ACCELEROMETER,            (struct sensor_driver *) &g_mpu6050_sensor_driver);    if (rc) {        return rc;    }    rc = sensor_set_interface(sensor, arg);    if (rc) {        return rc;    }    return sensor_mgr_register(sensor);}
开发者ID:vrahane,项目名称:incubator-mynewt-core,代码行数:57,



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


C++ stats_prefix_find函数代码示例
C++ stats函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。