• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ proc_init函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: uptime_init

static int __init uptime_init(void)
{
	startjiffies = jiffies;
	proc_init();

	return 0;
}
开发者ID:Johnny-Ich,项目名称:uptime_hack,代码行数:7,代码来源:uptime_hack.c


示例2: init

static void init(void)
{
	/* Enable all the interrupts */
	IRQ_ENABLE;

	/* Initialize debugging module (allow kprintf(), etc.) */
	kdbg_init();
	/* Initialize system timer */
	timer_init();
	/* Initialize UART1 */
	ser_init(&out, SER_UART1);
	/* Configure UART1 to work at 115.200 bps */
	ser_setbaudrate(&out, 115200);
	/* Initialize LED driver */
	LED_INIT();
	/* Initialize the OLED display (RIT128x96) */
	rit128x96_init();
	/* Draw an empty Bitmap on the screen */
	gfx_bitmapInit(&lcd_bitmap, raster, LCD_WIDTH, LCD_HEIGHT);
	/* Refresh the display */
	rit128x96_blitBitmap(&lcd_bitmap);
	/* Initialize the keypad driver */
	kbd_init();
	/* Initialize the internal flash memory */
	flash_init(&flash, 0);

	/*
	 * Kernel initialization: processes (allow to create and dispatch
	 * processes using proc_new()).
	 */
	proc_init();
}
开发者ID:mtarek,项目名称:BeRTOS,代码行数:32,代码来源:main.c


示例3: kernel_c

void kernel_c(){
	//init basic data&struct
	heap_init();
	proc_init();
	init_fs();
	mem_entity[0]='G';
	mem_entity[1]='M';
	mem_entity[2]='K';
	mem_entity[3]='B';
	k_screen_reset();
	detect_cpu();
	oprintf("detecting cpu...cpu identify:%s\n",cpu_string);
//	oprintf("mm init..\nring0_pgdir:%x,ring0_pgtbl:%x,base_proc_pgdir:%x,addr_kernel_info:%x,pages:%x\n",RING0_PGDIR,RING0_PGTBL,BASE_PROC_PGDIR,ADDR_KERNEL_INFO,PAGES);
	global_equal_map();
	__asm__("mov $0x101000,%eax\t\n"
			"mov %eax,%cr3\t\n"
			"mov %cr0,%eax\t\n"
			"or $0x80000000,%eax\t\n"
			"mov %eax,%cr0\t\n"
			);
	oprintf("global page-mapping for kernel built..open MMU\n");
	create_kernel_process((int)&idle,9,0xffff,"idle",0);	//pid must =0
	create_kernel_process((int)hs,2,0xffff,"hs",1);//hs的时间片要非常多,保证在下一轮时间片重置之前不会被挂起 ERR:pid must =1
	create_kernel_process((int)fs_ext,4,10,"fs_ext",1);//pid must =2

	create_kernel_process((int)mm,3,10,"mm",1);//ERR mm has great prio,because it shall run and prepare condition for other process
	create_kernel_process((int)tty,5,10,"tty",1);
	create_kernel_process((int)&p1,8,10,"p1",1);
//	ofork(t1,9,15,"t1",1);
//	ofork(t2,9,5,"t2",1);
//	ofork((int)&p2,7,5,"p2",3);
	oprintf("basic process ofork done..now open IRQ,proc-dispatch begin\n");
	__asm__("sti");
	while(1);//内核陷入死循环,等待第一次时钟中断
}
开发者ID:CrazyTeaFs,项目名称:papaya,代码行数:35,代码来源:kernel.c


示例4: init

static void init(void)
{
    /* Enable all the interrupts */
    IRQ_ENABLE;

	/* Initialize debugging module (allow kprintf(), etc.) */
	kdbg_init();
	/* Initialize LED driver */
	LED_INIT();
	/* Initialize system timer */
	timer_init();

	/*
	 * Kernel initialization: processes (allow to create and dispatch
	 * processes using proc_new()).
	 */
	proc_init();

	/* Init spi on dma to drive lcd */
	spi_dma_init(&spi);
	spi_dma_setclock(LCD_SPICLOCK);
	/* Initialize the dispaly */
	lcd_ili9225_init(&spi.fd);
	/* Init the backligth display leds */
	LCD_BACKLIGHT_INIT();
	lcd_setBacklight(LCD_BACKLIGHT_MAX);
	/* Draw an empty Bitmap on the screen */
	gfx_bitmapInit(&lcd_bitmap, raster, LCD_WIDTH, LCD_HEIGHT);
	/* Refresh the display */
	lcd_ili9225_blitBitmap(&lcd_bitmap);
	/* Initialize the keypad driver */
	kbd_init();

}
开发者ID:imby,项目名称:STM32VLDiscovery_BeRTOS,代码行数:34,代码来源:main.c


示例5: kern_init

int __noreturn
kern_init(void) {
    extern char edata[], end[];
    memset(edata, 0, end - edata);

    cons_init();                // init the console

    const char *message = "(THU.CST) os is loading ...";
    cprintf("%s\n\n", message);

    print_kerninfo();

    pmm_init();                 // init physical memory management

    pic_init();                 // init interrupt controller
    idt_init();                 // init interrupt descriptor table

    vmm_init();                 // init virtual memory management
    sched_init();               // init scheduler
    proc_init();                // init process table
    sync_init();                // init sync struct

    ide_init();                 // init ide devices
    swap_init();                // init swap
    fs_init();                  // init fs

    clock_init();               // init clock interrupt
    intr_enable();              // enable irq interrupt

    cpu_idle();                 // run idle process
}
开发者ID:spinlock,项目名称:ucore,代码行数:31,代码来源:init.c


示例6: init

static void init(void)
{
	/* Enable all the interrupts */
	IRQ_ENABLE;

	/* Initialize debugging module (allow kprintf(), etc.) */
	kdbg_init();
	/* Initialize system timer */
	timer_init();
	/* Initialize UART0 */
	ser_init(&out, SER_UART0);
	/* Configure UART0 to work at 115.200 bps */
	ser_setbaudrate(&out, 115200);
	/* Initialize LED driver */
	LED_INIT();

	/*
	 * Kernel initialization: processes (allow to create and dispatch
	 * processes using proc_new()).
	 */
	proc_init();

	/* Initialize TCP/IP stack */
	tcpip_init(NULL, NULL);

	/* Bring up the network interface */
	netif_add(&netif, &ipaddr, &netmask, &gw, NULL, ethernetif_init, tcpip_input);
	netif_set_default(&netif);
	netif_set_up(&netif);
}
开发者ID:DINKIN,项目名称:bertos,代码行数:30,代码来源:main.c


示例7: kern_init

int
kern_init(void) {
    extern char edata[], end[];
    memset(edata, 0, end - edata);

    cons_init();                // init the console

    const char *message = "(THU.CST) os is loading ...";
    cprintf("%s\n\n", message);

    print_kerninfo();

    grade_backtrace();

    pic_init();                 // init interrupt controller
    idt_init();                 // init interrupt descriptor table

    pmm_init();                 // init physical memory management

    vmm_init();                 // init virtual memory management
    sched_init();               // init scheduler
    proc_init();                // init process table
    
    swap_init();                // init swap
    fs_init();                  // init fs
    
    clock_init();               // init clock interrupt
    intr_enable();              // enable irq interrupt

    //LAB1: CAHLLENGE 1 If you try to do it, uncomment lab1_switch_test()
    // user/kernel mode switch test
    //lab1_switch_test();
    
    cpu_idle();                 // run idle process
}
开发者ID:wwffcc,项目名称:ThuMips32,代码行数:35,代码来源:init.c


示例8: init

static void init(void)
{
	/* Enable all the interrupts */
	IRQ_ENABLE;

	/* Initialize debugging module (allow kprintf(), etc.) */
	kdbg_init();
	/* Initialize system timer */
	timer_init();
	/* Initialize LED driver */
	LED_INIT();
	LED_OFF();

	/* Kernel initialization */
	proc_init();

	/* Initialize the serial driver */
	ser_init(&ser_port, SER_UART2);
	/*
	 * Hard-code the baud rate to 115.200 bps.
	 *
	 * TODO: implement the baud rate settings as well as other UART
	 * settings over the USB connection.
	 */
	ser_setbaudrate(&ser_port, 115200);

	/* Initialize usb-serial driver */
	usbser_init(&usb_port, 0);
}
开发者ID:DINKIN,项目名称:bertos,代码行数:29,代码来源:main.c


示例9: main

int main(void)
{
	IRQ_ENABLE;
	kdbg_init();

	#if CONFIG_KERN
	proc_init();
    #endif

	if (!dataflash_testSetup())
	{
			LOG_INFO("DATAFLASH setup..ok\n");
	}
	else
	{
			LOG_ERR("DATAFLASH setup..fail!\n");
			return EOF;
	}

	dataflash_testRun();

	for(;;)
	{
	}
}
开发者ID:amdoolittle,项目名称:APRS_Projects,代码行数:25,代码来源:dataflash_hwtest.c


示例10: snd_akm4xxx_build_controls

int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak)
{
	int err, num_emphs;

	err = build_dac_controls(ak);
	if (err < 0)
		return err;

	err = build_adc_controls(ak);
	if (err < 0)
		return err;
	if (ak->type == SND_AK4355 || ak->type == SND_AK4358)
		num_emphs = 1;
	else if (ak->type == SND_AK4620)
		num_emphs = 0;
	else
		num_emphs = ak->num_dacs / 2;
	err = build_deemphasis(ak, num_emphs);
	if (err < 0)
		return err;
	err = proc_init(ak);
	if (err < 0)
		return err;

	return 0;
}
开发者ID:1yankeedt,项目名称:D710BST_FL24_Kernel,代码行数:26,代码来源:ak4xxx-adda.c


示例11: main

/**
 * The entry.
 */
int main(int argc, char *argv[], char *envp[])
{
    if (ginfo->status == STATUS_DEBUG)
        raise(SIGTRAP);

    cons_init();

    const char *message = "(THU.CST) os is loading ...";
    kprintf("%s\n\n", message);

    intr_init();
    ide_init();

    host_signal_init();

    /* Only to initialize lcpu_count. */
    mp_init();

    pmm_init();
    pmm_init_ap();
    vmm_init();
    sched_init();
    proc_init();

    swap_init();
    fs_init();
    sync_init();

    umclock_init();
    cpu_idle();

    host_exit(SIGINT);

    return 0;
}
开发者ID:argsno,项目名称:ucore_os_plus,代码行数:38,代码来源:main.c


示例12: kern_init

int
kern_init(void) {
    extern char edata[], end[];
    memset(edata, 0, end - edata);
	
    cons_init();                // init the console

    const char *message = "(THU.CST) os is loading ...";
    kprintf ("%s\n\n", message);

	/* Only to initialize lcpu_count. */
	mp_init ();

	pmm_init();                 // init physical memory management
	pmm_init_ap ();

    pic_init();                 // init interrupt controller

	vmm_init();                 // init virtual memory management
    sched_init();               // init scheduler
	proc_init();                // init process table
    sync_init();                // init sync struct
	
	ide_init();                 // init ide devices
    swap_init();                // init swap
    fs_init();                  // init fs

    clock_init();               // init clock interrupt
    intr_enable();              // enable irq interrupt    

    cpu_idle();                 // run idle process
}
开发者ID:PungiZhang,项目名称:ucore_plus-next,代码行数:32,代码来源:init.c


示例13: k_main

void k_main(multiboot_info_t * multiboot_info)
{
	system_info.total_memory = multiboot_info->mem_upper;

	clrscr();

	printf("%s\n", &uname);
	printf("  Copyright 2005-2006 Draco Project\n");
	printf("%dM of extended memory.\n", multiboot_info->mem_upper >> 10);

	cons_attribute = 7;

	init_gdt();
	init_idt();
	init_irq(0x20, 0x28);
	paging_kernel_env(system_info.total_memory / 4);
	paging_init();
	proc_init();
	modules_init(multiboot_info);

	printf("Kernel is initialized.\n");

	sti();

	while(1);
}
开发者ID:podusowski,项目名称:draco,代码行数:26,代码来源:kernel.c


示例14: rasmem_init

static int rasmem_init(void)
{
	ras_debugset(1);
	ras_retn_iferr(ras_check());
	ras_retn_iferr(rasmem_ctor(&gRasMem));
	ras_retn_iferr(proc_init(MODULE_NAME,  &proc_ops_name(rmem), &gRasMem));
	return 0;
}
开发者ID:XePeleato,项目名称:android_kernel_huawei_venus,代码行数:8,代码来源:rasmemory.c


示例15: kern_init

void
kern_init(void)
{
    /* create the init proc */
    proc_init(&init_proc, ".init", SCHED_CLASS_RR, (void(*)(void *))kernel_start, NULL,
              init_proc_stack, INIT_PROC_STACK_SIZE);
    proc_notify(&init_proc);
}
开发者ID:xinhaoyuan,项目名称:cox,代码行数:8,代码来源:init.c


示例16: init_dev_modules

inline void init_dev_modules() {
	proc_init();
	con_init("/disk/bin/screen_saver.pso");
	serial_init();
	hdd_init();
	fs_init();
	pipe_init();
}
开发者ID:munshkr,项目名称:spuriOS,代码行数:8,代码来源:device.c


示例17: test_init

static __init int test_init(void)
{
	printk(KERN_DEBUG "Hello,test!\n");

	proc_init();
	thread_init();

	return 0;
}
开发者ID:ljli1990,项目名称:github,代码行数:9,代码来源:test.c


示例18: arch_init

void arch_init()
{
	pci_init();
#ifdef __CONFIG_ENABLE_MPTABLES__
	mptables_parse();
	ioapic_init(); // MUST BE AFTER PCI/ISA INIT!
	// TODO: move these back to regular init.  requires fixing the 
	// __CONFIG_NETWORKING__ inits to not need multiple cores running.
#endif
	// this returns when all other cores are done and ready to receive IPIs
	#ifdef __CONFIG_SINGLE_CORE__
		smp_percpu_init();
	#else
		smp_boot();
	#endif
	proc_init();

	/* EXPERIMENTAL NETWORK FUNCTIONALITY
	 * To enable, define __CONFIG_NETWORKING__ in your Makelocal
	 * If enabled, will load the rl8168 driver (if device exists)
	 * and will a boot into userland matrix, so remote syscalls can be performed.
 	 * If in simulation, will do some debugging information with the ne2k device
	 *
	 * Note: If you use this, you should also define the mac address of the 
	 * teathered machine via USER_MAC_ADDRESS in Makelocal.
	 *
	 * Additionally, you should have a look at the syscall server in the tools directory
	 */
	#ifdef __CONFIG_NETWORKING__
	#ifdef __CONFIG_SINGLE_CORE__
		warn("You currently can't have networking if you boot into single core mode!!\n");
	#else
		rl8168_init();		
		ne2k_init();
		e1000_init();
	#endif // __CONFIG_SINGLE_CORE__
	#endif // __CONFIG_NETWORKING__

	perfmon_init();
		
#ifdef __CONFIG_MONITOR_ON_INT__
	/* Handler to read a char from the interrupt source and call the monitor.
	 * Need to read the character so the device will send another interrupt.
	 * Note this will read from both the serial and the keyboard, and throw away
	 * the result.  We condition, since we don't want to trigger on a keyboard
	 * up interrupt */
	void mon_int(struct trapframe *tf, void *data)
	{
		// Enable interrupts here so that we can receive 
		// other interrupts (e.g. from the NIC)
		enable_irq();
		if (cons_getc())
			monitor(0);
	}
开发者ID:kstraube,项目名称:hysim,代码行数:54,代码来源:init.c


示例19: dc_motor_testSetUp

int dc_motor_testSetUp(void)
{
	IRQ_ENABLE;
	kdbg_init();
	timer_init();
	proc_init();
	pwm_init();
	adc_init();

	return 0;
}
开发者ID:mtarek,项目名称:BeRTOS,代码行数:11,代码来源:dc_motor_hwtest.c


示例20: init

static void init(void)
{
	IRQ_ENABLE;
	kdbg_init();
	timer_init();
	kbd_init();
	proc_init();

	PIOA_CODR = LEDR | LEDG | BUZZER_BIT | CUTOFF_PIN | LAND_PIN;
	PIOA_OER = LEDR | LEDG | BUZZER_BIT | CUTOFF_PIN | LAND_PIN;
}
开发者ID:batt,项目名称:StratoSpera,代码行数:11,代码来源:main_test.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ proc_mkdir函数代码示例发布时间:2022-05-30
下一篇:
C++ proc_fork_connector函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap