⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ovfork.c

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 C
字号:
/* * @(#)vfork.s	4.1 (Berkeley) 12/21/80 * C library -- vfork *//* * pid = vfork(); * * r1 == 0 in parent process, r1 == 1 in child process. * r0 == pid of child in parent, r0 == pid of parent in child. * * trickery here, due to keith sklower, uses ret to clear the stack, * and then returns with a jump indirect, since only one person can return * with a ret off this stack... we do the ret before we vfork! */	.set	vfork,66.globl	_vfork_vfork:	.word	0x0000	movl	16(fp),r2	movab	here,16(fp)	rethere:	chmk	$vfork	bcc	vforkok	jmp	verrorvforkok:	tstl	r1		# child process ?	bneq	child	# yes	bcc 	parent		# if c-bit not set, fork ok.globl	_errnoverror:	movl	r0,_errno	mnegl	$1,r0	jmp	(r2)child:	clrl	r0parent:	jmp	(r2)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -