/*
 * getpid.S
 */


#define ASM_FILE


#include<share/segment.h>
#include<sys/syscall.h>


.text


.globl getpid
getpid:
    movl	$SYS_GETPID,%eax
	lcall	$SYSCALL0_SEG,$0
	subl	$4*(0+1),%esp
	cmpl	$0,%eax
	js		sys_error
	ret
