Changed parameters of "socketpair" function in libck (ktcc)

git-svn-id: svn://kolibrios.org@8344 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
superturbocat2001 2020-12-08 18:36:23 +00:00
parent 72b4b057f0
commit bed1d7841c
3 changed files with 6 additions and 4 deletions

View File

@ -102,6 +102,6 @@ int send(int socket, const void *message, size_t msg_len, int flag);
int recv(int socket, void *buffer, size_t buff_len, int flag);
int setsockopt(int socket,const optstruct* opt);
int getsockopt(int socket, optstruct* opt);
int socketpair();
int socketpair(int *sock1, int *sock2);
#endif

View File

@ -91,11 +91,13 @@ int getsockopt(int socket, optstruct* opt)
);
}
int socketpair()
int socketpair(int *sock1, int *sock2)
{
asm volatile(
"int $0x40"
:"=b"(err_code)
:"=b"(*sock2), "=a"(*sock1)
:"a"(75), "b"(10)
);
err_code = *sock2;
return *sock1;
}