summaryrefslogtreecommitdiffstats
path: root/usr/klibc/arch/m68k/vfork.S
blob: 98170a6c957c5c16f39f2e0f56b1f549d5c2ce54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#
# usr/klibc/arch/m68k/vfork.S
#
# vfork is nasty - there must be nothing at all on the stack above
# the stack frame of the enclosing function.
#

#include <asm/unistd.h>

	.text
	.align	2
	.globl	vfork
	.type	vfork, @function
vfork:
	move.l	(%sp)+, %d1		/* Return address */
	move.l	# __NR_vfork, %d0
	trap	#0
	move.l	%d1, -(%sp)		/* restore stack */

	/* fallthrough into common code from syscall.S */
	bra	__syscall_checkandout

	.size	vfork, .-vfork