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


C++ rest_init函数代码示例

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


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

示例1: PROCESS_THREAD

PROCESS_THREAD(flexibity_buzzer, ev, data)
{
  PROCESS_BEGIN();
  SENSORS_ACTIVATE(button_sensor);
  SENSORS_ACTIVATE(battery_sensor);

  /* PWM for buzzer */
  pwm_init_stopped(TMR3, 1500, 10000);

#ifdef WITH_COAP
  PRINTF("COAP Server\n");
#else
  PRINTF("HTTP Server\n");
#endif

  rest_init();

#if DEBUG
  rest_activate_resource(&resource_mem);
#endif
  rest_activate_resource(&resource_buzzer);
  rest_activate_resource(&resource_pwr);
  rest_activate_resource(&resource_led);
  rest_activate_resource(&resource_button);
  rest_activate_resource(&resource_id);
  rest_activate_resource(&resource_discover);

  PROCESS_END();
}
开发者ID:Flexibity,项目名称:contiki,代码行数:29,代码来源:buzzer.c

示例2: mod_instantiate

/*
 *	Do any per-module initialization that is separate to each
 *	configured instance of the module.  e.g. set up connections
 *	to external databases, read configuration files, set up
 *	dictionary entries, etc.
 *
 *	If configuration information is given in the config section
 *	that must be referenced in later calls, store a handle to it
 *	in *instance otherwise put a null pointer there.
 */
static int mod_instantiate(CONF_SECTION *conf, void *instance)
{
	rlm_rest_t *inst = instance;

	/*
	 *	Parse sub-section configs.
	 */
	if (
		(parse_sub_section(conf, &inst->authorize, MOD_AUTHORIZE) < 0) ||
		(parse_sub_section(conf, &inst->authenticate, MOD_AUTHENTICATE) < 0) ||
		(parse_sub_section(conf, &inst->accounting, MOD_ACCOUNTING) < 0) ||

/* @todo add behaviour for checksimul */
/*		(parse_sub_section(conf, &inst->checksimul, MOD_SESSION) < 0) || */
		(parse_sub_section(conf, &inst->post_auth, MOD_POST_AUTH) < 0))
	{
		return -1;
	}

	/*
	 *	Initialise REST libraries.
	 */
	if (rest_init(inst) < 0) {
		return -1;
	}

	inst->connect_timeout = ((inst->connect_timeout_tv.tv_usec * 1000) +
				 (inst->connect_timeout_tv.tv_sec / 1000));
	inst->pool = fr_connection_pool_module_init(conf, inst, mod_conn_create, mod_conn_alive, NULL);
	if (!inst->pool) return -1;

	return 0;
}
开发者ID:xunmengdeganjue,项目名称:workTest,代码行数:43,代码来源:rlm_rest.c

示例3: PROCESS_THREAD

PROCESS_THREAD(rest_server_example, ev, data)
{
  PROCESS_BEGIN();

#ifdef WITH_COAP
  PRINTF("COAP Server\n");
#else
  PRINTF("HTTP Server\n");
#endif

  rest_init();

#if defined (PLATFORM_HAS_LIGHT)
  SENSORS_ACTIVATE(light_sensor);
  rest_activate_resource(&resource_light);
#endif
#if defined (PLATFORM_HAS_LEDS)
  rest_activate_resource(&resource_led);
  rest_activate_resource(&resource_toggle);
#endif /*defined (PLATFORM_HAS_LEDS)*/

  rest_activate_resource(&resource_helloworld);
  rest_activate_resource(&resource_discover);

  PROCESS_END();
}
开发者ID:1uk3,项目名称:contiki,代码行数:26,代码来源:rest-server-example.c

示例4: main

/*The Main Program*/
int main(int argc, char** argv) {
    /* defines the tray_icon, as well as init gtk*/
    g_set_application_name(PACKAGE_NAME);
    parse_command_line_options(argc,argv);
    register_thread("Main Thread");
    if (!queue_init())
        print("queue_init FAILED",NULL,ERROR);
    print("Glade File",glade_file,DEBUG);
    g_thread_init(NULL);
    gtk_init(NULL,NULL);
    gtk_init(&argc, &argv);
    Hosts_lock = g_mutex_new();
    Userpath_lock = g_mutex_new();
    g_mutex_lock(Userpath_lock);
    Userpath = g_strdup(getenv("HOME"));
    g_mutex_unlock(Userpath_lock);

    settings_init();
    rest_init();
    if (!xml_init())
        print("xml_init FAILED",NULL,ERROR);
    init_hostname();
    /*sets the tray icon from the create_tray_icon*/
    create_tray_icon();
    playing_info_music pInfo = {"Artist","Album","Song",0,0,0};
    /* declares the playing info struct, and print if, if _DEBUG is definded at the top of msdaemon.c*/
    /*inits the dbus and get the first set of info*/
    dbus_init();
    pInfo = dbus_get_playing_info_music();
    print_playing_info_music(pInfo);
    get_active_devices(NULL);
    update_song_info();
    GError *error;
    if ( (network_thread = g_thread_create((GThreadFunc)rest_thread_handler, NULL, FALSE, &error)) == NULL){
        print("Error Creating Network Thread",error->message,ERROR);
        g_error_free(error);
    }

    if ( (file_thread = g_thread_create((GThreadFunc)file_thread_handler, NULL, FALSE, &error)) == NULL){
        print("Error Creating Network Thread",error->message,ERROR);
        g_error_free(error);
    }
    if ( (gui_thread = g_thread_create((GThreadFunc)gui_thread_handler, NULL, FALSE, &error)) == NULL){
        print("Error Creating Network Thread",error->message,ERROR);
        g_error_free(error);
    }

    g_timeout_add (1000,(GSourceFunc) get_next_command,NULL);
    g_timeout_add (300000,(GSourceFunc) update_active_devices,NULL);
    init_status_window(FALSE,glade_file);
    start_tray();
    g_free(Userpath);

    deauthenticate();
    return 0;
}
开发者ID:KevinAnthony,项目名称:rchip,代码行数:57,代码来源:main.c

示例5: start

int start()
{
	jparse_init();
	rest_init();
	http_start();
	device_init();
#ifdef _DEBUG
	billing_init();
#endif
#ifndef _MSC_VER
	const char *initrc = initSearch(search_file.c_str());
	if (initrc && initrc[0]) {
		api_log_printf("%s\r\n", initrc);
		searcher = NULL;
	}
	else {
		searcher = makeSearcher();
	}
#endif

	api_listen_tcp(api_tag, host.c_str(), port.c_str(), &handlers);

	size_t num_cores;

	#ifdef WIN32
		SYSTEM_INFO sysinfo;
		GetSystemInfo(&sysinfo);
		num_cores = sysinfo.dwNumberOfProcessors;
	#elif MACOS
	    int nm[2];
		size_t len = 4;
		uint32_t count;

		nm[0] = CTL_HW; nm[1] = HW_AVAILCPU;
	    sysctl(nm, 2, &count, &len, NULL, 0);

	    if(count < 1) {
		    nm[1] = HW_NCPU;
			sysctl(nm, 2, &count, &len, NULL, 0);
	        if(count < 1) { count = 1; }
		}
	    num_cores = count;
	#else
		num_cores = sysconf(_SC_NPROCESSORS_ONLN);
	#endif

	CPUINFO *cpu_info = cpu_get_info();
	api_log_printf("[HTTP] CPU INFO: Brand name: %s, cores count: %u, Hyper threads: %s\r\n",
		cpu_info->vendor.c_str(), num_cores, (cpu_info->hyper_threads) ? "yes" : "no");

	thread_pool_init(num_cores - 1);

	api_log_printf("[HTTP] Started\r\n");

	return 0;
}
开发者ID:chenbk85,项目名称:tps5,代码行数:56,代码来源:module.cpp

示例6: TaskEntry

void TaskEntry(void)
{
		SysTaskCreate(keventd,
			NULL,
			"keventd",
			5,
			NULL,
			0
		);
#ifdef FS
			rest_init();
#endif

		usrAppInit();
}
开发者ID:hominlinx,项目名称:hot-pot-lab,代码行数:15,代码来源:main.c

示例7: PROCESS_THREAD

PROCESS_THREAD(rest_example, ev, data)
{
  PROCESS_BEGIN();
  
  /*start the http server*/
  process_start(&httpdProcess, NULL);
  /*Init the restful api*/
  rest_init();
  
  /*Resources should be activated*/
  rest_activate_resource( &resource_helloworld );
  rest_activate_resource( &resource_service );
  rest_activate_resource( &resource_ledControl );
  rest_activate_resource( &resource_configure );
  
  PROCESS_END();
}
开发者ID:kincki,项目名称:contiki,代码行数:17,代码来源:rest-example.c

示例8: mod_instantiate

/*
 *	Do any per-module initialization that is separate to each
 *	configured instance of the module.  e.g. set up connections
 *	to external databases, read configuration files, set up
 *	dictionary entries, etc.
 *
 *	If configuration information is given in the config section
 *	that must be referenced in later calls, store a handle to it
 *	in *instance otherwise put a null pointer there.
 */
static int mod_instantiate(CONF_SECTION *conf, void *instance)
{
	rlm_rest_t *inst = instance;
	char const *xlat_name;

	xlat_name = cf_section_name2(conf);
	if (!xlat_name) {
		xlat_name = cf_section_name1(conf);
	}

	inst->xlat_name = xlat_name;

	/*
	 *	Register the rest xlat function
	 */
	xlat_register(inst->xlat_name, rest_xlat, rest_uri_escape, inst);

	/*
	 *	Parse sub-section configs.
	 */
	if (
		(parse_sub_section(conf, &inst->authorize, RLM_COMPONENT_AUTZ) < 0) ||
		(parse_sub_section(conf, &inst->authenticate, RLM_COMPONENT_AUTH) < 0) ||
		(parse_sub_section(conf, &inst->accounting, RLM_COMPONENT_ACCT) < 0) ||

/* @todo add behaviour for checksimul */
/*		(parse_sub_section(conf, &inst->checksimul, RLM_COMPONENT_SESS) < 0) || */
		(parse_sub_section(conf, &inst->post_auth, RLM_COMPONENT_POST_AUTH) < 0))
	{
		return -1;
	}

	/*
	 *	Initialise REST libraries.
	 */
	if (rest_init(inst) < 0) {
		return -1;
	}

	inst->conn_pool = fr_connection_pool_module_init(conf, inst, mod_conn_create, mod_conn_alive, NULL);
	if (!inst->conn_pool) {
		return -1;
	}

	return 0;
}
开发者ID:ncopa,项目名称:freeradius-server,代码行数:56,代码来源:rlm_rest.c

示例9: mod_instantiate

/*
 *	Do any per-module initialization that is separate to each
 *	configured instance of the module.  e.g. set up connections
 *	to external databases, read configuration files, set up
 *	dictionary entries, etc.
 *
 *	If configuration information is given in the config section
 *	that must be referenced in later calls, store a handle to it
 *	in *instance otherwise put a null pointer there.
 */
static int mod_instantiate(CONF_SECTION *conf, void *instance)
{
	rlm_rest_t *inst = instance;
	char const *xlat_name;

	xlat_name = cf_section_name2(conf);
	if (!xlat_name) {
		xlat_name = cf_section_name1(conf);
	}

	inst->xlat_name = xlat_name;

	/*
	 *	Parse sub-section configs.
	 */
	if (
		(parse_sub_section(conf, &inst->authorize,
				   RLM_COMPONENT_AUTZ) < 0) ||
		(parse_sub_section(conf, &inst->authenticate,
				   RLM_COMPONENT_AUTH) < 0) ||
		(parse_sub_section(conf, &inst->accounting,
				   RLM_COMPONENT_ACCT) < 0) ||
		(parse_sub_section(conf, &inst->checksimul,
				   RLM_COMPONENT_SESS) < 0) ||
		(parse_sub_section(conf, &inst->postauth,
				   RLM_COMPONENT_POST_AUTH) < 0))
	{
		return -1;
	}

	/*
	 *	Initialise REST libraries.
	 */
	if (rest_init(inst) < 0) {
		return -1;
	}

	inst->conn_pool = fr_connection_pool_init(conf, inst, mod_conn_create, mod_conn_alive, mod_conn_delete, NULL);
	if (!inst->conn_pool) {
		return -1;
	}

	return 0;
}
开发者ID:dpocock,项目名称:freeradius-server,代码行数:54,代码来源:rlm_rest.c

示例10: iotkit_init

/**
 * Initialises the library
 *
 */
void iotkit_init() {
    int store_path_length = 0;
    char *config_file_path = NULL;
    char *config_dir_path = NULL;

    if(isFileExists(CONFIGURATION_FILE_NAME)) {
        store_path_length = strlen(CURRENT_DIR) + strlen(CONFIGURATION_FILE_NAME) + 2;
        config_file_path = (char *)malloc(sizeof(char) * store_path_length);
        strcpy(config_file_path, CURRENT_DIR);
    } else {
        store_path_length = strlen(DEFAULT_CONFIG_DIR) + strlen(CONFIGURATION_FILE_NAME) + 2;
        config_file_path = (char *)malloc(sizeof(char) * store_path_length);
        strcpy(config_file_path, DEFAULT_CONFIG_DIR);
    }

    strcat(config_file_path, CONFIGURATION_FILE_NAME);

    parseConfiguration(config_file_path);
    parseAuthorizationToken();
    parseDeviceToken();
    parseComponentsList();

    if(!isInitialized) {
        CURLcode code = rest_init(configurations.isSecure);
        if(code) {
            fprintf(stderr, "Unable to initialize CURL %d\n", code);
        } else {
            isInitialized = true;
            #if DEBUG
                puts("Library initialized successfully");
            #endif
        }
    } else {
        #if DEBUG
            puts("Library is already initialized and doesn't need to be re-initialized");
        #endif
    }
}
开发者ID:enableiot,项目名称:iotkit-lib-c,代码行数:42,代码来源:iotkit.c

示例11: system_init

/*********************************************************************
* @brief        Function used to initialize various system components
*               Each component is initialized using a proper API
*
* @param[in]    NA
*
* @retval       NA
*
* @note         NA
*
* @end
*********************************************************************/
void system_init()
{
 
  /* Initialize platform */
  VENDOR_PLATFORM_INIT(); 

  /*Initialize logging, Not handling error as openlog() does not return anything*/ 
  logging_init();

  /*Initialize Module manager*/ 
  if (modulemgr_init() != BVIEW_STATUS_SUCCESS)
  {
    LOG_POST (BVIEW_LOG_CRITICAL, "Failed to initialize Module Manager\r\n");
  }  
  /*Initialize south-bound plugin*/ 
  if (sb_redirector_init() != BVIEW_STATUS_SUCCESS)
  {
    LOG_POST (BVIEW_LOG_CRITICAL, "Failed to initialize south-bound plugin\r\n");
  }  
  /*Initialize south-bound BST plugin*/ 
  if (sbplugin_common_init() != BVIEW_STATUS_SUCCESS)
  {
    LOG_POST (BVIEW_LOG_CRITICAL, "Failed to initialize south-bound BST plugin r\n");
  }  
  /*Initialize BST application*/ 
  if (bst_main() != BVIEW_STATUS_SUCCESS)
  {
    LOG_POST (BVIEW_LOG_CRITICAL, "Failed to initialize BST application\r\n");
  }  
  /*Initialize REST*/ 
  if (rest_init() != BVIEW_STATUS_SUCCESS)
  {
    LOG_POST (BVIEW_LOG_CRITICAL, "Failed to initialize REST \n All components must be De-initialized\r\n");
    system_deinit();
  }  
} 
开发者ID:ajindal-juniper,项目名称:BroadView-Instrumentation,代码行数:48,代码来源:system.c

示例12: start_kernel

asmlinkage void __init start_kernel(void)
{
	char * command_line;
	extern char saved_command_line[];

/*
 * Interrupts are still disabled. Do necessary setups, then
 * enable them
 */
	lock_kernel();
	printk(linux_banner);
	setup_arch(&command_line);
	printk("Kernel command line: %s\n", saved_command_line);
	parse_options(command_line);
	trap_init();
	init_IRQ();
	sched_init();
	softirq_init();
	time_init();

	/*
	 * HACK ALERT! This is early. We're enabling the console before
	 * we've done PCI setups etc, and console_init() must be aware of
	 * this. But we do want output early, in case something goes wrong.
	 */
	console_init();
#ifdef CONFIG_MODULES
	init_modules();
#endif
	if (prof_shift) {
		unsigned int size;
		/* only text is profiled */
		prof_len = (unsigned long) &_etext - (unsigned long) &_stext;
		prof_len >>= prof_shift;
		
		size = prof_len * sizeof(unsigned int) + PAGE_SIZE-1;
		prof_buffer = (unsigned int *) alloc_bootmem(size);
	}

	kmem_cache_init();
	sti();
	calibrate_delay();
#ifdef CONFIG_BLK_DEV_INITRD
	if (initrd_start && !initrd_below_start_ok &&
			initrd_start < min_low_pfn << PAGE_SHIFT) {
		printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - "
		    "disabling it.\n",initrd_start,min_low_pfn << PAGE_SHIFT);
		initrd_start = 0;
	}
#endif
	mem_init();
	kmem_cache_sizes_init();
	pgtable_cache_init();

	/*
	 * For architectures that have highmem, num_mappedpages represents
	 * the amount of memory the kernel can use.  For other architectures
	 * it's the same as the total pages.  We need both numbers because
	 * some subsystems need to initialize based on how much memory the
	 * kernel can use.
	 */
	if (num_mappedpages == 0)
		num_mappedpages = num_physpages;
  
	fork_init(num_mappedpages);
	proc_caches_init();
	vfs_caches_init(num_physpages);
	buffer_init(num_physpages);
	page_cache_init(num_physpages);
#if defined(CONFIG_ARCH_S390)
	ccwcache_init();
#endif
	signals_init();
#ifdef CONFIG_PROC_FS
	proc_root_init();
#endif
	check_bugs();
	printk("POSIX conformance testing by UNIFIX\n");

	/* 
	 *	We count on the initial thread going ok 
	 *	Like idlers init is an unlocked kernel thread, which will
	 *	make syscalls (and thus be locked).
	 */
	smp_init();
#if defined(CONFIG_SYSVIPC)
	ipc_init();
#endif
	rest_init();
}
开发者ID:iPodLinux,项目名称:linux-2.4.24-ipod,代码行数:90,代码来源:main.c

示例13: start_kernel


//.........这里部分代码省略.........
	trap_init();
	rcu_init();
	init_IRQ();
	pidhash_init();
	init_timers();
	softirq_init();
	time_init();

	/*
	 * HACK ALERT! This is early. We're enabling the console before
	 * we've done PCI setups etc, and console_init() must be aware of
	 * this. But we do want output early, in case something goes wrong.
	 */
	console_init();
	if (panic_later)
		panic(panic_later, panic_param);

#ifdef CONFIG_RTAI_RTSPMM
        /* Allocate a big and continuous memory block for the module SPMM
           included in the RTAI functionalities */
        printk("--- Memory Allocation for the module rt_spmm ---\n");
        /* WARNING
           We need to add some space for the structures vrtxptext and vrtxpt and the partitions bitmap
           that the module rt_spmm uses to handle the blocks in each partition */
        /* for each defined partitions */
        for(indice_part = 0; indice_part <  RT_MAX_PART_NUM; indice_part ++)
          {
            if ((rt_partitions_table[indice_part].block_size != 0) &&
                (rt_partitions_table[indice_part].num_of_blocks != 0))
              {
                rt_partitions_table[indice_part].part_size =
                  (rt_partitions_table[indice_part].block_size + XN_NBBY)
                  *rt_partitions_table[indice_part].num_of_blocks +
                  + sizeof(vrtxptext_t)+sizeof(vrtxpt_t);
                rt_mem_block_size += rt_partitions_table[indice_part].part_size;
              }
          }
#ifdef CONFIG_RTAI_PART_DMA
        printk("Allocate memory in the low part of memory\n");
        rt_mem_block_ptr=(void*)alloc_bootmem_low(rt_mem_block_size + PAGE_SIZE-1);
#else
        printk("Allocate memory in the standard part of memory\n");
        rt_mem_block_ptr=(void*)alloc_bootmem(rt_mem_block_size + PAGE_SIZE-1);
#endif /* CONFIG_PART_DMA */
        printk("Needed Memory Size : %lu\n", rt_mem_block_size);
        printk("Allocated Memory Size : %lu\n", rt_mem_block_size + PAGE_SIZE-1);
        printk("Memory block address : 0x%x\n", (unsigned int)rt_mem_block_ptr);
        printk("-----------------------------------------------\n");
#endif /* CONFIG_RTAI_RTSPMM */

	profile_init();
	local_irq_enable();
#ifdef CONFIG_BLK_DEV_INITRD
	if (initrd_start && !initrd_below_start_ok &&
			initrd_start < min_low_pfn << PAGE_SHIFT) {
		printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - "
		    "disabling it.\n",initrd_start,min_low_pfn << PAGE_SHIFT);
		initrd_start = 0;
	}
#endif
	vfs_caches_init_early();
	mem_init();
	kmem_cache_init();
	numa_policy_init();
	if (late_time_init)
		late_time_init();
	calibrate_delay();
	pidmap_init();
	pgtable_cache_init();
	prio_tree_init();
	anon_vma_init();
#ifdef CONFIG_X86
	if (efi_enabled)
		efi_enter_virtual_mode();
#endif
	fork_init(num_physpages);
	proc_caches_init();
	buffer_init();
	unnamed_dev_init();
	security_init();
	vfs_caches_init(num_physpages);

#ifdef CONFIG_MOT_FEAT_DEVICE_TREE
	mothwcfg_init();
#endif /* CONFIG_MOT_FEAT_DEVICE_TREE */

	radix_tree_init();
	signals_init();
	/* rootfs populating might need page-writeback */
	page_writeback_init();
#ifdef CONFIG_PROC_FS
	proc_root_init();
#endif
	check_bugs();

	acpi_early_init(); /* before LAPIC and SMP init */

	/* Do the rest non-__init'ed, we're now alive */
	rest_init();
}
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:101,代码来源:main.c

示例14: start_kernel

asmlinkage void __init start_kernel(void)
{
   char * command_line;
   extern char saved_command_line[];
   extern struct kernel_param __start___param[], __stop___param[];

#ifdef TARGET_OS2
   LX_set_sysstate(LXSYSSTATE_KERNEL_BOOT_STARTED,0);
#endif
/*
 * Interrupts are still disabled. Do necessary setups, then
 * enable them
 */
   lock_kernel();
   page_address_init();
   printk(linux_banner);
   setup_arch(&command_line);
   setup_per_cpu_areas();

   /*
    * Mark the boot cpu "online" so that it can call console drivers in
    * printk() and can access its per-cpu storage.
    */
   smp_prepare_boot_cpu();

   build_all_zonelists();
   page_alloc_init();
   printk("Kernel command line: %s\n", saved_command_line);
   #ifdef TARGET_OS2
   parse_args("Booting kernel", command_line, __start___param,
         0,
         &unknown_bootoption);
   #else
   parse_args("Booting kernel", command_line, __start___param,
         __stop___param - __start___param,
         &unknown_bootoption);
   #endif
   sort_main_extable();
   trap_init();
   rcu_init();
   init_IRQ();
   pidhash_init();
   sched_init();
   softirq_init();
   time_init();

   /*
    * HACK ALERT! This is early. We're enabling the console before
    * we've done PCI setups etc, and console_init() must be aware of
    * this. But we do want output early, in case something goes wrong.
    */
   console_init();
   if (panic_later)
      panic(panic_later, panic_param);
   profile_init();
   local_irq_enable();
#ifdef CONFIG_BLK_DEV_INITRD
   if (initrd_start && !initrd_below_start_ok &&
         initrd_start < min_low_pfn << PAGE_SHIFT) {
      printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - "
          "disabling it.\n",initrd_start,min_low_pfn << PAGE_SHIFT);
      initrd_start = 0;
   }
#endif
   mem_init();
   kmem_cache_init();
   if (late_time_init)
      late_time_init();
   calibrate_delay();
   pidmap_init();
   pgtable_cache_init();
   pte_chain_init();
#ifdef CONFIG_X86
   if (efi_enabled)
      efi_enter_virtual_mode();
#endif
   fork_init(num_physpages);
   proc_caches_init();
   buffer_init();
   unnamed_dev_init();
   security_scaffolding_startup();
   vfs_caches_init(num_physpages);
   radix_tree_init();
   signals_init();
   /* rootfs populating might need page-writeback */
   page_writeback_init();
#ifdef CONFIG_PROC_FS
   proc_root_init();
#endif
   check_bugs();
   printk("POSIX conformance testing by UNIFIX\n");
   /*
    * We count on the initial thread going ok
    * Like idlers init is an unlocked kernel thread, which will
    * make syscalls (and thus be locked).
    */
   init_idle(current, smp_processor_id());
   /* Do the rest non-__init'ed, we're now alive */
   rest_init();
}
开发者ID:OS2World,项目名称:DRV-LXAPI32,代码行数:100,代码来源:oi_main.c

示例15: start_kernel


//.........这里部分代码省略.........
	}
	rcu_init();
	radix_tree_init();
	/* init some links before init_ISA_irqs() */
	early_irq_init();
	init_IRQ();
	prio_tree_init();
	init_timers();
	hrtimers_init();
	softirq_init();
	timekeeping_init();
	time_init();
	profile_init();
	if (!irqs_disabled())
		printk(KERN_CRIT "start_kernel(): bug: interrupts were "
				 "enabled early\n");
	early_boot_irqs_on();
	local_irq_enable();

	/* Interrupts are enabled now so all GFP allocations are safe. */
	gfp_allowed_mask = __GFP_BITS_MASK;

	kmem_cache_init_late();

	/*
	 * HACK ALERT! This is early. We're enabling the console before
	 * we've done PCI setups etc, and console_init() must be aware of
	 * this. But we do want output early, in case something goes wrong.
	 */
	console_init();
	if (panic_later)
		panic(panic_later, panic_param);

	lockdep_info();

	/*
	 * Need to run this when irqs are enabled, because it wants
	 * to self-test [hard/soft]-irqs on/off lock inversion bugs
	 * too:
	 */
	locking_selftest();

#ifdef CONFIG_BLK_DEV_INITRD
	if (initrd_start && !initrd_below_start_ok &&
	    page_to_pfn(virt_to_page((void *)initrd_start)) < min_low_pfn) {
		printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - "
		    "disabling it.\n",
		    page_to_pfn(virt_to_page((void *)initrd_start)),
		    min_low_pfn);
		initrd_start = 0;
	}
#endif
	page_cgroup_init();
	enable_debug_pagealloc();
	kmemtrace_init();
	kmemleak_init();
	debug_objects_mem_init();
	idr_init_cache();
	setup_per_cpu_pageset();
	numa_policy_init();
	if (late_time_init)
		late_time_init();
	sched_clock_init();
	calibrate_delay();
	pidmap_init();
	anon_vma_init();
#ifdef CONFIG_X86
	if (efi_enabled)
		efi_enter_virtual_mode();
#endif
	thread_info_cache_init();
	cred_init();
	fork_init(totalram_pages);
	proc_caches_init();
	buffer_init();
	key_init();
	security_init();
	dbg_late_init();
	vfs_caches_init(totalram_pages);
	signals_init();
	/* rootfs populating might need page-writeback */
	page_writeback_init();
#ifdef CONFIG_PROC_FS
	proc_root_init();
#endif
	cgroup_init();
	cpuset_init();
	taskstats_init_early();
	delayacct_init();

	check_bugs();

	acpi_early_init(); /* before LAPIC and SMP init */
	sfi_init_late();

	ftrace_init();

	/* Do the rest non-__init'ed, we're now alive */
	rest_init();
}
开发者ID:badcompany1982,项目名称:android_kernel_zte_V768,代码行数:101,代码来源:main.c


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