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

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

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

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

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

示例1: boot

/* * Initial boot sequence. */staticvoidboot(void){	/*	 * The order of these is important!	 * Don't go changing it without thinking about the consequences.	 *	 * Among other things, be aware that console output gets	 * buffered up at first and does not actually appear until	 * mainbus_bootstrap() attaches the console device. This can	 * be remarkably confusing if a bug occurs at this point. So	 * don't put new code before mainbus_bootstrap if you don't	 * absolutely have to.	 *	 * Also note that the buffer for this is only 1k. If you	 * overflow it, the system will crash without printing	 * anything at all. You can make it larger though (it's in	 * dev/generic/console.c).	 */	kprintf("/n");	kprintf("OS/161 base system version %s/n", BASE_VERSION);	kprintf("%s", harvard_copyright);	kprintf("/n");	kprintf("Galactocalypse's system version %s (%s #%d)/n", 		GROUP_VERSION, buildconfig, buildversion);	kprintf("/n");	/* Early initialization. */	ram_bootstrap();	thread_bootstrap();	hardclock_bootstrap();	vfs_bootstrap();	/* Probe and initialize devices. Interrupts should come on. */	kprintf("Device probe.../n");	KASSERT(curthread->t_curspl > 0);	mainbus_bootstrap();	KASSERT(curthread->t_curspl == 0);	/* Now do pseudo-devices. */	pseudoconfig();	kprintf("/n");	/* Late phase of initialization. */	vm_bootstrap();	kprintf_bootstrap();	thread_start_cpus();	/* Default bootfs - but ignore failure, in case emu0 doesn't exist */	vfs_setbootfs("emu0");	/*	 * Make sure various things aren't screwed up.	 */	COMPILE_ASSERT(sizeof(userptr_t) == sizeof(char *));	COMPILE_ASSERT(sizeof(*(userptr_t)0) == sizeof(char));}
开发者ID:galactocalypse,项目名称:os161,代码行数:63,


示例2: boot

/* * Initial boot sequence. */staticvoidboot(void){	/*	 * The order of these is important!	 * Don't go changing it without thinking about the consequences.	 *	 * Among other things, be aware that console output gets	 * buffered up at first and does not actually appear until	 * dev_bootstrap() attaches the console device. This can be	 * remarkably confusing if a bug occurs at this point. So	 * don't put new code before dev_bootstrap if you don't	 * absolutely have to.	 *	 * Also note that the buffer for this is only 1k. If you	 * overflow it, the system will crash without printing	 * anything at all. You can make it larger though (it's in	 * dev/generic/console.c).	 */	kprintf("/n");	kprintf("OS/161 base system version %s/n", BASE_VERSION);	kprintf("%s", harvard_copyright);	kprintf("/n");	kprintf("CS350-036's system version %s (%s #%d)/n", 		GROUP_VERSION, buildconfig, buildversion);	kprintf("/n");	#if OPT_A0   	hello();	#endif /* OPT_A0 */	ram_bootstrap();	scheduler_bootstrap();	thread_bootstrap();	vfs_bootstrap();	dev_bootstrap();#if OPT_A3           vmstats_init();#endif	vm_bootstrap();	kprintf_bootstrap();	/* Default bootfs - but ignore failure, in case emu0 doesn't exist */	vfs_setbootfs("emu0");#if OPT_A3           initSwapOps();#endif	/*	 * Make sure various things aren't screwed up.	 */	assert(sizeof(userptr_t)==sizeof(char *));	assert(sizeof(*(userptr_t)0)==sizeof(char));}
开发者ID:franklixuefei,项目名称:cs350-os161,代码行数:61,


示例3: cmd_bootfs

/* * Command to set the "boot fs".  * * The boot filesystem is the one that pathnames like /bin/sh with * leading slashes refer to. * * The default bootfs is "emu0". */staticint cmd_bootfs(int nargs, char **args) {	char *device;	if (nargs != 2) {		kprintf("Usage: bootfs device/n");		return EINVAL;	}	device = args[1];	/* Allow (but do not require) colon after device name */	if (device[strlen(device) - 1] == ':') {		device[strlen(device) - 1] = 0;	}	return vfs_setbootfs(device);}
开发者ID:krnprdp,项目名称:os161-src,代码行数:26,


示例4: boot

/* * Initial boot sequence. */staticvoidboot(void){	/*	 * The order of these is important!	 * Don't go changing it without thinking about the consequences.	 *	 * Among other things, be aware that console output gets	 * buffered up at first and does not actually appear until	 * mainbus_bootstrap() attaches the console device. This can	 * be remarkably confusing if a bug occurs at this point. So	 * don't put new code before mainbus_bootstrap if you don't	 * absolutely have to.	 *	 * Also note that the buffer for this is only 1k. If you	 * overflow it, the system will crash without printing	 * anything at all. You can make it larger though (it's in	 * dev/generic/console.c).	 */#if OPT_A2  // Not sure if this is the best place to put this, but I'm not  // sure where else we can initialize our process array early enough  proc_array_init();  // Setting this to NULL to start so that boot threads don't increment  // the value  sem_runprogram = NULL;#endif	kprintf("/n");	kprintf("OS/161 base system version %s/n", BASE_VERSION);	kprintf("%s", harvard_copyright);	kprintf("/n");	kprintf("Put-your-group-name-here's system version %s (%s #%d)/n",		GROUP_VERSION, buildconfig, buildversion);	kprintf("/n");	/* Early initialization. */	ram_bootstrap();	proc_bootstrap();	thread_bootstrap();	hardclock_bootstrap();	vfs_bootstrap();	#if OPT_A3	// vm_bootstrap();// already called elsewhere below	#endif	/* Probe and initialize devices. Interrupts should come on. */	kprintf("Device probe.../n");	KASSERT(curthread->t_curspl > 0);	mainbus_bootstrap();	KASSERT(curthread->t_curspl == 0);	/* Now do pseudo-devices. */	pseudoconfig();	kprintf("/n");	/* Late phase of initialization. */	vm_bootstrap();	kprintf_bootstrap();	thread_start_cpus();	/* Default bootfs - but ignore failure, in case emu0 doesn't exist */	vfs_setbootfs("emu0");	/*	 * Make sure various things aren't screwed up.	 */	COMPILE_ASSERT(sizeof(userptr_t) == sizeof(char *));	COMPILE_ASSERT(sizeof(*(userptr_t)0) == sizeof(char));#if OPT_A2  // Now it is safe to let this be accessed  sem_runprogram = sem_create("sem_runprogram", 0);#endif}
开发者ID:HeliWang,项目名称:cs350OS,代码行数:82,


示例5: boot

/* * Initial boot sequence. */staticvoidboot(void){	/*	 * The order of these is important!	 * Don't go changing it without thinking about the consequences.	 *	 * Among other things, be aware that console output gets	 * buffered up at first and does not actually appear until	 * dev_bootstrap() attaches the console device. This can be	 * remarkably confusing if a bug occurs at this point. So	 * don't put new code before dev_bootstrap if you don't	 * absolutely have to.	 *	 * Also note that the buffer for this is only 1k. If you	 * overflow it, the system will crash without printing	 * anything at all. You can make it larger though (it's in	 * dev/generic/console.c).	 */  /* remove compiler warning */        //size_t memsize; /* ASST2: get memsize from new vm_bootstrap */	kprintf("/n");	kprintf("OS/161 base system version %s/n", BASE_VERSION);	kprintf("%s", harvard_copyright);	kprintf("/n");	kprintf("Group 36 system version %s (%s #%d)/n", 		GROUP_VERSION, buildconfig, buildversion);	kprintf("/n");	ram_bootstrap();#if OPT_DUMBVM	vm_bootstrap();#else	memsize = vm_bootstrap(); /* ASST2: get memsize from new vm_bootstrap */#endif	scheduler_bootstrap();	pid_bootstrap(); /* ASST1: initialize pid management before threads */	thread_bootstrap();	vfs_bootstrap();	dev_bootstrap();#if !OPT_DUMBVM /* only initialize swap if not using dumbvm */        swap_bootstrap(memsize); /* ASST2: initialize swap file after devices */#endif	kprintf_bootstrap();	// DEMKE: ASST1 - initialize user program console I/O	//dumb_consoleIO_bootstrap();	/* Default bootfs - but ignore failure, in case emu0 doesn't exist */	vfs_setbootfs("emu0");	/*	 * Make sure various things aren't screwed up.	 */	assert(sizeof(userptr_t)==sizeof(char *));	assert(sizeof(*(userptr_t)0)==sizeof(char));}
开发者ID:adi-mishra,项目名称:CSC369,代码行数:65,


示例6: boot

/* * Initial boot sequence. */staticvoidboot(void){	/*	 * The order of these is important!	 * Don't go changing it without thinking about the consequences.	 *	 * Among other things, be aware that console output gets	 * buffered up at first and does not actually appear until	 * mainbus_bootstrap() attaches the console device. This can	 * be remarkably confusing if a bug occurs at this point. So	 * don't put new code before mainbus_bootstrap if you don't	 * absolutely have to.	 *	 * Also note that the buffer for this is only 1k. If you	 * overflow it, the system will crash without printing	 * anything at all. You can make it larger though (it's in	 * dev/generic/console.c).	 */	kprintf("/n");	kprintf("OS/161 base system version %s/n", BASE_VERSION);	kprintf("%s", harvard_copyright);	kprintf("/n");    // Stupid escape characters/*    kprintf("                       ,8///n"/            "=DDI~                 ,88M/n"/            "`$D888$7~            ,D=8M/n"/            "  8N8...'8.          +...7/n"/            "   ~+D+...'8,       ,N...7/n"/            "     ~+N+...+----...7...8`/n"/            "        ~~O.............7/n"/            "         /.............7/n"/            "        8..88..........7/n"/            "       8##.........88..:/n"/            "      .8##...####$.....#  ~+',/n"/            "       //I...####$...###8...,+/n"/            "      .~~~~,.7##7....##.....7/n"/            "    /.......//-......7....I..+I8DI~../n"/            "   |8........7-.....//..+$...........O///n");*/    /*kprintf("    //~.___.~7-.......?IZ$??+..........>/n"/            "      //.............D  /=?????+....,8`/n"/            "      I.............+~IO=?8:+ZDI?=8`/n"/            "     /..............7$??+8     //8//n"/            "    I...............8DZO,/n"/            "    I................N8?/n"/            "   .D??.......+++....8/n"/            "    D?7???I$Z77??????./n"/            "  ,8$DDZ:    ``~?NIMMIZ=/n"/            "                   `~I8?/n");*/    kprintf("PikachuOS's system version %s (%s #%d)/n",		GROUP_VERSION, buildconfig, buildversion);	kprintf("/n");	/* Early initialization. */	ram_bootstrap();	vm_bootstrap();	proc_bootstrap();	thread_bootstrap();	hardclock_bootstrap();	vfs_bootstrap();	kheap_nextgeneration();	/* Probe and initialize devices. Interrupts should come on. */	kprintf("Device probe.../n");	KASSERT(curthread->t_curspl > 0);	mainbus_bootstrap();	KASSERT(curthread->t_curspl == 0);	/* Now do pseudo-devices. */	pseudoconfig();	kprintf("/n");	kheap_nextgeneration();	/* Late phase of initialization. */	kprintf_bootstrap();	thread_start_cpus();	/* Buffer cache */	buffer_bootstrap();	/* Default bootfs - but ignore failure, in case emu0 doesn't exist */	vfs_setbootfs("emu0");	kheap_nextgeneration();	bs_bootstrap();	/*	 * Make sure various things aren't screwed up.	 */	COMPILE_ASSERT(sizeof(userptr_t) == sizeof(char *));	COMPILE_ASSERT(sizeof(*(userptr_t)0) == sizeof(char));}
开发者ID:ChunHungLiu,项目名称:pikachuos,代码行数:99,



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


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