about summary refs log tree commit diff
path: root/src/network/accept.c
blob: 837040962c07da3416e2acc84c2ec2909ef5d4fe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <sys/socket.h>
#include "syscall.h"
#include "socketcall.h"
#include "libc.h"

int accept(int fd, struct sockaddr *addr, socklen_t *len)
{
	unsigned long args[] = { fd, (unsigned long)addr, (unsigned long)len };
	int ret;
	CANCELPT_BEGIN;
	ret = syscall2(__NR_socketcall, SYS_ACCEPT, (long)args);
	CANCELPT_END;
	return ret;
}