Sync CloudABI compatibility against the latest upstream version (v0.13).
With Flower (CloudABI's network connection daemon) becoming more complete, there is no longer any need for creating any unconnected sockets. Socket pairs in combination with file descriptor passing is all that is necessary, as that is what is used by Flower to pass network connections from the public internet to listening processes. Remove all of the kernel bits that were used to implement socket(), listen(), bindat() and connectat(). In principle, accept() and SO_ACCEPTCONN may also be removed, but there are still some consumers left. Obtained from: https://github.com/NuxiNL/cloudabi MFC after: 1 month
This commit is contained in:
parent
f7eb827c48
commit
8212ad9a99
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=322885
@ -79,11 +79,6 @@ __FBSDID("$FreeBSD$");
|
||||
MAPPING(CLOUDABI_RIGHT_POLL_WAIT, CAP_KQUEUE_EVENT) \
|
||||
MAPPING(CLOUDABI_RIGHT_PROC_EXEC, CAP_FEXECVE) \
|
||||
MAPPING(CLOUDABI_RIGHT_SOCK_ACCEPT, CAP_ACCEPT) \
|
||||
MAPPING(CLOUDABI_RIGHT_SOCK_BIND_DIRECTORY, CAP_BINDAT) \
|
||||
MAPPING(CLOUDABI_RIGHT_SOCK_BIND_SOCKET, CAP_BIND) \
|
||||
MAPPING(CLOUDABI_RIGHT_SOCK_CONNECT_DIRECTORY, CAP_CONNECTAT) \
|
||||
MAPPING(CLOUDABI_RIGHT_SOCK_CONNECT_SOCKET, CAP_CONNECT) \
|
||||
MAPPING(CLOUDABI_RIGHT_SOCK_LISTEN, CAP_LISTEN) \
|
||||
MAPPING(CLOUDABI_RIGHT_SOCK_SHUTDOWN, CAP_SHUTDOWN) \
|
||||
MAPPING(CLOUDABI_RIGHT_SOCK_STAT_GET, CAP_GETPEERNAME, \
|
||||
CAP_GETSOCKNAME, CAP_GETSOCKOPT)
|
||||
@ -109,10 +104,6 @@ cloudabi_sys_fd_create1(struct thread *td,
|
||||
cap_rights_init(&fcaps.fc_rights, CAP_FSTAT, CAP_FTRUNCATE,
|
||||
CAP_MMAP_RWX);
|
||||
return (kern_shm_open(td, SHM_ANON, O_RDWR, 0, &fcaps));
|
||||
case CLOUDABI_FILETYPE_SOCKET_DGRAM:
|
||||
return (kern_socket(td, AF_UNIX, SOCK_DGRAM, 0));
|
||||
case CLOUDABI_FILETYPE_SOCKET_STREAM:
|
||||
return (kern_socket(td, AF_UNIX, SOCK_STREAM, 0));
|
||||
default:
|
||||
return (EINVAL);
|
||||
}
|
||||
@ -312,9 +303,7 @@ cloudabi_remove_conflicting_rights(cloudabi_filetype_t filetype,
|
||||
CLOUDABI_RIGHT_FILE_STAT_PUT_TIMES |
|
||||
CLOUDABI_RIGHT_FILE_SYMLINK |
|
||||
CLOUDABI_RIGHT_FILE_UNLINK |
|
||||
CLOUDABI_RIGHT_POLL_FD_READWRITE |
|
||||
CLOUDABI_RIGHT_SOCK_BIND_DIRECTORY |
|
||||
CLOUDABI_RIGHT_SOCK_CONNECT_DIRECTORY;
|
||||
CLOUDABI_RIGHT_POLL_FD_READWRITE;
|
||||
*inheriting &= CLOUDABI_RIGHT_FD_DATASYNC |
|
||||
CLOUDABI_RIGHT_FD_READ |
|
||||
CLOUDABI_RIGHT_FD_SEEK |
|
||||
@ -344,9 +333,7 @@ cloudabi_remove_conflicting_rights(cloudabi_filetype_t filetype,
|
||||
CLOUDABI_RIGHT_MEM_MAP |
|
||||
CLOUDABI_RIGHT_MEM_MAP_EXEC |
|
||||
CLOUDABI_RIGHT_POLL_FD_READWRITE |
|
||||
CLOUDABI_RIGHT_PROC_EXEC |
|
||||
CLOUDABI_RIGHT_SOCK_BIND_DIRECTORY |
|
||||
CLOUDABI_RIGHT_SOCK_CONNECT_DIRECTORY;
|
||||
CLOUDABI_RIGHT_PROC_EXEC;
|
||||
break;
|
||||
case CLOUDABI_FILETYPE_FIFO:
|
||||
*base &= CLOUDABI_RIGHT_FD_READ |
|
||||
@ -400,9 +387,6 @@ cloudabi_remove_conflicting_rights(cloudabi_filetype_t filetype,
|
||||
CLOUDABI_RIGHT_FILE_STAT_FGET |
|
||||
CLOUDABI_RIGHT_POLL_FD_READWRITE |
|
||||
CLOUDABI_RIGHT_SOCK_ACCEPT |
|
||||
CLOUDABI_RIGHT_SOCK_BIND_SOCKET |
|
||||
CLOUDABI_RIGHT_SOCK_CONNECT_SOCKET |
|
||||
CLOUDABI_RIGHT_SOCK_LISTEN |
|
||||
CLOUDABI_RIGHT_SOCK_SHUTDOWN |
|
||||
CLOUDABI_RIGHT_SOCK_STAT_GET;
|
||||
break;
|
||||
|
@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/socketvar.h>
|
||||
#include <sys/syscallsubr.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/un.h>
|
||||
|
||||
#include <net/vnet.h>
|
||||
|
||||
@ -49,28 +48,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <compat/cloudabi/cloudabi_proto.h>
|
||||
#include <compat/cloudabi/cloudabi_util.h>
|
||||
|
||||
/* Copies a pathname into a UNIX socket address structure. */
|
||||
static int
|
||||
copyin_sockaddr_un(const char *path, size_t pathlen, struct sockaddr_un *sun)
|
||||
{
|
||||
int error;
|
||||
|
||||
/* Copy in pathname string if there's enough space. */
|
||||
if (pathlen >= sizeof(sun->sun_path))
|
||||
return (ENAMETOOLONG);
|
||||
error = copyin(path, &sun->sun_path, pathlen);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
if (memchr(sun->sun_path, '\0', pathlen) != NULL)
|
||||
return (EINVAL);
|
||||
|
||||
/* Initialize the rest of the socket address. */
|
||||
sun->sun_path[pathlen] = '\0';
|
||||
sun->sun_family = AF_UNIX;
|
||||
sun->sun_len = sizeof(*sun);
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
cloudabi_sys_sock_accept(struct thread *td,
|
||||
struct cloudabi_sys_sock_accept_args *uap)
|
||||
@ -79,41 +56,6 @@ cloudabi_sys_sock_accept(struct thread *td,
|
||||
return (kern_accept(td, uap->sock, NULL, NULL, NULL));
|
||||
}
|
||||
|
||||
int
|
||||
cloudabi_sys_sock_bind(struct thread *td,
|
||||
struct cloudabi_sys_sock_bind_args *uap)
|
||||
{
|
||||
struct sockaddr_un sun;
|
||||
int error;
|
||||
|
||||
error = copyin_sockaddr_un(uap->path, uap->path_len, &sun);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
return (kern_bindat(td, uap->fd, uap->sock, (struct sockaddr *)&sun));
|
||||
}
|
||||
|
||||
int
|
||||
cloudabi_sys_sock_connect(struct thread *td,
|
||||
struct cloudabi_sys_sock_connect_args *uap)
|
||||
{
|
||||
struct sockaddr_un sun;
|
||||
int error;
|
||||
|
||||
error = copyin_sockaddr_un(uap->path, uap->path_len, &sun);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
return (kern_connectat(td, uap->fd, uap->sock,
|
||||
(struct sockaddr *)&sun));
|
||||
}
|
||||
|
||||
int
|
||||
cloudabi_sys_sock_listen(struct thread *td,
|
||||
struct cloudabi_sys_sock_listen_args *uap)
|
||||
{
|
||||
|
||||
return (kern_listen(td, uap->sock, uap->backlog));
|
||||
}
|
||||
|
||||
int
|
||||
cloudabi_sys_sock_shutdown(struct thread *td,
|
||||
struct cloudabi_sys_sock_shutdown_args *uap)
|
||||
@ -174,10 +116,7 @@ cloudabi_sock_recv(struct thread *td, cloudabi_fd_t fd, struct iovec *data,
|
||||
cloudabi_riflags_t flags, size_t *rdatalen, size_t *rfdslen,
|
||||
cloudabi_roflags_t *rflags)
|
||||
{
|
||||
struct sockaddr_storage ss;
|
||||
struct msghdr hdr = {
|
||||
.msg_name = &ss,
|
||||
.msg_namelen = sizeof(ss),
|
||||
.msg_iov = data,
|
||||
.msg_iovlen = datalen,
|
||||
};
|
||||
|
@ -259,22 +259,6 @@ struct cloudabi_sys_sock_accept_args {
|
||||
char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
|
||||
char unused_l_[PADL_(void *)]; void * unused; char unused_r_[PADR_(void *)];
|
||||
};
|
||||
struct cloudabi_sys_sock_bind_args {
|
||||
char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
|
||||
char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
|
||||
char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
|
||||
char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)];
|
||||
};
|
||||
struct cloudabi_sys_sock_connect_args {
|
||||
char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
|
||||
char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
|
||||
char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
|
||||
char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)];
|
||||
};
|
||||
struct cloudabi_sys_sock_listen_args {
|
||||
char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
|
||||
char backlog_l_[PADL_(cloudabi_backlog_t)]; cloudabi_backlog_t backlog; char backlog_r_[PADR_(cloudabi_backlog_t)];
|
||||
};
|
||||
struct cloudabi32_sys_sock_recv_args {
|
||||
char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
|
||||
char in_l_[PADL_(const cloudabi32_recv_in_t *)]; const cloudabi32_recv_in_t * in; char in_r_[PADR_(const cloudabi32_recv_in_t *)];
|
||||
@ -349,9 +333,6 @@ int cloudabi_sys_proc_fork(struct thread *, struct cloudabi_sys_proc_fork_args *
|
||||
int cloudabi_sys_proc_raise(struct thread *, struct cloudabi_sys_proc_raise_args *);
|
||||
int cloudabi_sys_random_get(struct thread *, struct cloudabi_sys_random_get_args *);
|
||||
int cloudabi_sys_sock_accept(struct thread *, struct cloudabi_sys_sock_accept_args *);
|
||||
int cloudabi_sys_sock_bind(struct thread *, struct cloudabi_sys_sock_bind_args *);
|
||||
int cloudabi_sys_sock_connect(struct thread *, struct cloudabi_sys_sock_connect_args *);
|
||||
int cloudabi_sys_sock_listen(struct thread *, struct cloudabi_sys_sock_listen_args *);
|
||||
int cloudabi32_sys_sock_recv(struct thread *, struct cloudabi32_sys_sock_recv_args *);
|
||||
int cloudabi32_sys_sock_send(struct thread *, struct cloudabi32_sys_sock_send_args *);
|
||||
int cloudabi_sys_sock_shutdown(struct thread *, struct cloudabi_sys_sock_shutdown_args *);
|
||||
@ -440,9 +421,6 @@ int cloudabi_sys_thread_yield(struct thread *, struct cloudabi_sys_thread_yield_
|
||||
#define CLOUDABI32_SYS_AUE_cloudabi_sys_proc_raise AUE_NULL
|
||||
#define CLOUDABI32_SYS_AUE_cloudabi_sys_random_get AUE_NULL
|
||||
#define CLOUDABI32_SYS_AUE_cloudabi_sys_sock_accept AUE_NULL
|
||||
#define CLOUDABI32_SYS_AUE_cloudabi_sys_sock_bind AUE_NULL
|
||||
#define CLOUDABI32_SYS_AUE_cloudabi_sys_sock_connect AUE_NULL
|
||||
#define CLOUDABI32_SYS_AUE_cloudabi_sys_sock_listen AUE_NULL
|
||||
#define CLOUDABI32_SYS_AUE_cloudabi32_sys_sock_recv AUE_NULL
|
||||
#define CLOUDABI32_SYS_AUE_cloudabi32_sys_sock_send AUE_NULL
|
||||
#define CLOUDABI32_SYS_AUE_cloudabi_sys_sock_shutdown AUE_NULL
|
||||
|
@ -50,14 +50,11 @@
|
||||
#define CLOUDABI32_SYS_cloudabi_sys_proc_raise 42
|
||||
#define CLOUDABI32_SYS_cloudabi_sys_random_get 43
|
||||
#define CLOUDABI32_SYS_cloudabi_sys_sock_accept 44
|
||||
#define CLOUDABI32_SYS_cloudabi_sys_sock_bind 45
|
||||
#define CLOUDABI32_SYS_cloudabi_sys_sock_connect 46
|
||||
#define CLOUDABI32_SYS_cloudabi_sys_sock_listen 47
|
||||
#define CLOUDABI32_SYS_cloudabi32_sys_sock_recv 48
|
||||
#define CLOUDABI32_SYS_cloudabi32_sys_sock_send 49
|
||||
#define CLOUDABI32_SYS_cloudabi_sys_sock_shutdown 50
|
||||
#define CLOUDABI32_SYS_cloudabi_sys_sock_stat_get 51
|
||||
#define CLOUDABI32_SYS_cloudabi32_sys_thread_create 52
|
||||
#define CLOUDABI32_SYS_cloudabi_sys_thread_exit 53
|
||||
#define CLOUDABI32_SYS_cloudabi_sys_thread_yield 54
|
||||
#define CLOUDABI32_SYS_MAXSYSCALL 55
|
||||
#define CLOUDABI32_SYS_cloudabi32_sys_sock_recv 45
|
||||
#define CLOUDABI32_SYS_cloudabi32_sys_sock_send 46
|
||||
#define CLOUDABI32_SYS_cloudabi_sys_sock_shutdown 47
|
||||
#define CLOUDABI32_SYS_cloudabi_sys_sock_stat_get 48
|
||||
#define CLOUDABI32_SYS_cloudabi32_sys_thread_create 49
|
||||
#define CLOUDABI32_SYS_cloudabi_sys_thread_exit 50
|
||||
#define CLOUDABI32_SYS_cloudabi_sys_thread_yield 51
|
||||
#define CLOUDABI32_SYS_MAXSYSCALL 52
|
||||
|
@ -51,14 +51,11 @@ const char *cloudabi32_syscallnames[] = {
|
||||
"cloudabi_sys_proc_raise", /* 42 = cloudabi_sys_proc_raise */
|
||||
"cloudabi_sys_random_get", /* 43 = cloudabi_sys_random_get */
|
||||
"cloudabi_sys_sock_accept", /* 44 = cloudabi_sys_sock_accept */
|
||||
"cloudabi_sys_sock_bind", /* 45 = cloudabi_sys_sock_bind */
|
||||
"cloudabi_sys_sock_connect", /* 46 = cloudabi_sys_sock_connect */
|
||||
"cloudabi_sys_sock_listen", /* 47 = cloudabi_sys_sock_listen */
|
||||
"cloudabi32_sys_sock_recv", /* 48 = cloudabi32_sys_sock_recv */
|
||||
"cloudabi32_sys_sock_send", /* 49 = cloudabi32_sys_sock_send */
|
||||
"cloudabi_sys_sock_shutdown", /* 50 = cloudabi_sys_sock_shutdown */
|
||||
"cloudabi_sys_sock_stat_get", /* 51 = cloudabi_sys_sock_stat_get */
|
||||
"cloudabi32_sys_thread_create", /* 52 = cloudabi32_sys_thread_create */
|
||||
"cloudabi_sys_thread_exit", /* 53 = cloudabi_sys_thread_exit */
|
||||
"cloudabi_sys_thread_yield", /* 54 = cloudabi_sys_thread_yield */
|
||||
"cloudabi32_sys_sock_recv", /* 45 = cloudabi32_sys_sock_recv */
|
||||
"cloudabi32_sys_sock_send", /* 46 = cloudabi32_sys_sock_send */
|
||||
"cloudabi_sys_sock_shutdown", /* 47 = cloudabi_sys_sock_shutdown */
|
||||
"cloudabi_sys_sock_stat_get", /* 48 = cloudabi_sys_sock_stat_get */
|
||||
"cloudabi32_sys_thread_create", /* 49 = cloudabi32_sys_thread_create */
|
||||
"cloudabi_sys_thread_exit", /* 50 = cloudabi_sys_thread_exit */
|
||||
"cloudabi_sys_thread_yield", /* 51 = cloudabi_sys_thread_yield */
|
||||
};
|
||||
|
@ -59,14 +59,11 @@ struct sysent cloudabi32_sysent[] = {
|
||||
{ AS(cloudabi_sys_proc_raise_args), (sy_call_t *)cloudabi_sys_proc_raise, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 42 = cloudabi_sys_proc_raise */
|
||||
{ AS(cloudabi_sys_random_get_args), (sy_call_t *)cloudabi_sys_random_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 43 = cloudabi_sys_random_get */
|
||||
{ AS(cloudabi_sys_sock_accept_args), (sy_call_t *)cloudabi_sys_sock_accept, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 44 = cloudabi_sys_sock_accept */
|
||||
{ AS(cloudabi_sys_sock_bind_args), (sy_call_t *)cloudabi_sys_sock_bind, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 45 = cloudabi_sys_sock_bind */
|
||||
{ AS(cloudabi_sys_sock_connect_args), (sy_call_t *)cloudabi_sys_sock_connect, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 46 = cloudabi_sys_sock_connect */
|
||||
{ AS(cloudabi_sys_sock_listen_args), (sy_call_t *)cloudabi_sys_sock_listen, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 47 = cloudabi_sys_sock_listen */
|
||||
{ AS(cloudabi32_sys_sock_recv_args), (sy_call_t *)cloudabi32_sys_sock_recv, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 48 = cloudabi32_sys_sock_recv */
|
||||
{ AS(cloudabi32_sys_sock_send_args), (sy_call_t *)cloudabi32_sys_sock_send, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 49 = cloudabi32_sys_sock_send */
|
||||
{ AS(cloudabi_sys_sock_shutdown_args), (sy_call_t *)cloudabi_sys_sock_shutdown, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 50 = cloudabi_sys_sock_shutdown */
|
||||
{ AS(cloudabi_sys_sock_stat_get_args), (sy_call_t *)cloudabi_sys_sock_stat_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 51 = cloudabi_sys_sock_stat_get */
|
||||
{ AS(cloudabi32_sys_thread_create_args), (sy_call_t *)cloudabi32_sys_thread_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 52 = cloudabi32_sys_thread_create */
|
||||
{ AS(cloudabi_sys_thread_exit_args), (sy_call_t *)cloudabi_sys_thread_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 53 = cloudabi_sys_thread_exit */
|
||||
{ 0, (sy_call_t *)cloudabi_sys_thread_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 54 = cloudabi_sys_thread_yield */
|
||||
{ AS(cloudabi32_sys_sock_recv_args), (sy_call_t *)cloudabi32_sys_sock_recv, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 45 = cloudabi32_sys_sock_recv */
|
||||
{ AS(cloudabi32_sys_sock_send_args), (sy_call_t *)cloudabi32_sys_sock_send, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 46 = cloudabi32_sys_sock_send */
|
||||
{ AS(cloudabi_sys_sock_shutdown_args), (sy_call_t *)cloudabi_sys_sock_shutdown, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 47 = cloudabi_sys_sock_shutdown */
|
||||
{ AS(cloudabi_sys_sock_stat_get_args), (sy_call_t *)cloudabi_sys_sock_stat_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 48 = cloudabi_sys_sock_stat_get */
|
||||
{ AS(cloudabi32_sys_thread_create_args), (sy_call_t *)cloudabi32_sys_thread_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 49 = cloudabi32_sys_thread_create */
|
||||
{ AS(cloudabi_sys_thread_exit_args), (sy_call_t *)cloudabi_sys_thread_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 50 = cloudabi_sys_thread_exit */
|
||||
{ 0, (sy_call_t *)cloudabi_sys_thread_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 51 = cloudabi_sys_thread_yield */
|
||||
};
|
||||
|
@ -415,36 +415,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
|
||||
*n_args = 2;
|
||||
break;
|
||||
}
|
||||
/* cloudabi_sys_sock_bind */
|
||||
case 45: {
|
||||
struct cloudabi_sys_sock_bind_args *p = params;
|
||||
iarg[0] = p->sock; /* cloudabi_fd_t */
|
||||
iarg[1] = p->fd; /* cloudabi_fd_t */
|
||||
uarg[2] = (intptr_t) p->path; /* const char * */
|
||||
uarg[3] = p->path_len; /* size_t */
|
||||
*n_args = 4;
|
||||
break;
|
||||
}
|
||||
/* cloudabi_sys_sock_connect */
|
||||
case 46: {
|
||||
struct cloudabi_sys_sock_connect_args *p = params;
|
||||
iarg[0] = p->sock; /* cloudabi_fd_t */
|
||||
iarg[1] = p->fd; /* cloudabi_fd_t */
|
||||
uarg[2] = (intptr_t) p->path; /* const char * */
|
||||
uarg[3] = p->path_len; /* size_t */
|
||||
*n_args = 4;
|
||||
break;
|
||||
}
|
||||
/* cloudabi_sys_sock_listen */
|
||||
case 47: {
|
||||
struct cloudabi_sys_sock_listen_args *p = params;
|
||||
iarg[0] = p->sock; /* cloudabi_fd_t */
|
||||
iarg[1] = p->backlog; /* cloudabi_backlog_t */
|
||||
*n_args = 2;
|
||||
break;
|
||||
}
|
||||
/* cloudabi32_sys_sock_recv */
|
||||
case 48: {
|
||||
case 45: {
|
||||
struct cloudabi32_sys_sock_recv_args *p = params;
|
||||
iarg[0] = p->sock; /* cloudabi_fd_t */
|
||||
uarg[1] = (intptr_t) p->in; /* const cloudabi32_recv_in_t * */
|
||||
@ -453,7 +425,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
|
||||
break;
|
||||
}
|
||||
/* cloudabi32_sys_sock_send */
|
||||
case 49: {
|
||||
case 46: {
|
||||
struct cloudabi32_sys_sock_send_args *p = params;
|
||||
iarg[0] = p->sock; /* cloudabi_fd_t */
|
||||
uarg[1] = (intptr_t) p->in; /* const cloudabi32_send_in_t * */
|
||||
@ -462,7 +434,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
|
||||
break;
|
||||
}
|
||||
/* cloudabi_sys_sock_shutdown */
|
||||
case 50: {
|
||||
case 47: {
|
||||
struct cloudabi_sys_sock_shutdown_args *p = params;
|
||||
iarg[0] = p->sock; /* cloudabi_fd_t */
|
||||
iarg[1] = p->how; /* cloudabi_sdflags_t */
|
||||
@ -470,7 +442,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
|
||||
break;
|
||||
}
|
||||
/* cloudabi_sys_sock_stat_get */
|
||||
case 51: {
|
||||
case 48: {
|
||||
struct cloudabi_sys_sock_stat_get_args *p = params;
|
||||
iarg[0] = p->sock; /* cloudabi_fd_t */
|
||||
uarg[1] = (intptr_t) p->buf; /* cloudabi_sockstat_t * */
|
||||
@ -479,14 +451,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
|
||||
break;
|
||||
}
|
||||
/* cloudabi32_sys_thread_create */
|
||||
case 52: {
|
||||
case 49: {
|
||||
struct cloudabi32_sys_thread_create_args *p = params;
|
||||
uarg[0] = (intptr_t) p->attr; /* cloudabi32_threadattr_t * */
|
||||
*n_args = 1;
|
||||
break;
|
||||
}
|
||||
/* cloudabi_sys_thread_exit */
|
||||
case 53: {
|
||||
case 50: {
|
||||
struct cloudabi_sys_thread_exit_args *p = params;
|
||||
uarg[0] = (intptr_t) p->lock; /* cloudabi_lock_t * */
|
||||
iarg[1] = p->scope; /* cloudabi_scope_t */
|
||||
@ -494,7 +466,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
|
||||
break;
|
||||
}
|
||||
/* cloudabi_sys_thread_yield */
|
||||
case 54: {
|
||||
case 51: {
|
||||
*n_args = 0;
|
||||
break;
|
||||
}
|
||||
@ -1224,59 +1196,8 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
|
||||
break;
|
||||
};
|
||||
break;
|
||||
/* cloudabi_sys_sock_bind */
|
||||
case 45:
|
||||
switch(ndx) {
|
||||
case 0:
|
||||
p = "cloudabi_fd_t";
|
||||
break;
|
||||
case 1:
|
||||
p = "cloudabi_fd_t";
|
||||
break;
|
||||
case 2:
|
||||
p = "userland const char *";
|
||||
break;
|
||||
case 3:
|
||||
p = "size_t";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
break;
|
||||
/* cloudabi_sys_sock_connect */
|
||||
case 46:
|
||||
switch(ndx) {
|
||||
case 0:
|
||||
p = "cloudabi_fd_t";
|
||||
break;
|
||||
case 1:
|
||||
p = "cloudabi_fd_t";
|
||||
break;
|
||||
case 2:
|
||||
p = "userland const char *";
|
||||
break;
|
||||
case 3:
|
||||
p = "size_t";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
break;
|
||||
/* cloudabi_sys_sock_listen */
|
||||
case 47:
|
||||
switch(ndx) {
|
||||
case 0:
|
||||
p = "cloudabi_fd_t";
|
||||
break;
|
||||
case 1:
|
||||
p = "cloudabi_backlog_t";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
break;
|
||||
/* cloudabi32_sys_sock_recv */
|
||||
case 48:
|
||||
case 45:
|
||||
switch(ndx) {
|
||||
case 0:
|
||||
p = "cloudabi_fd_t";
|
||||
@ -1292,7 +1213,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
|
||||
};
|
||||
break;
|
||||
/* cloudabi32_sys_sock_send */
|
||||
case 49:
|
||||
case 46:
|
||||
switch(ndx) {
|
||||
case 0:
|
||||
p = "cloudabi_fd_t";
|
||||
@ -1308,7 +1229,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
|
||||
};
|
||||
break;
|
||||
/* cloudabi_sys_sock_shutdown */
|
||||
case 50:
|
||||
case 47:
|
||||
switch(ndx) {
|
||||
case 0:
|
||||
p = "cloudabi_fd_t";
|
||||
@ -1321,7 +1242,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
|
||||
};
|
||||
break;
|
||||
/* cloudabi_sys_sock_stat_get */
|
||||
case 51:
|
||||
case 48:
|
||||
switch(ndx) {
|
||||
case 0:
|
||||
p = "cloudabi_fd_t";
|
||||
@ -1337,7 +1258,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
|
||||
};
|
||||
break;
|
||||
/* cloudabi32_sys_thread_create */
|
||||
case 52:
|
||||
case 49:
|
||||
switch(ndx) {
|
||||
case 0:
|
||||
p = "userland cloudabi32_threadattr_t *";
|
||||
@ -1347,7 +1268,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
|
||||
};
|
||||
break;
|
||||
/* cloudabi_sys_thread_exit */
|
||||
case 53:
|
||||
case 50:
|
||||
switch(ndx) {
|
||||
case 0:
|
||||
p = "userland cloudabi_lock_t *";
|
||||
@ -1360,7 +1281,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
|
||||
};
|
||||
break;
|
||||
/* cloudabi_sys_thread_yield */
|
||||
case 54:
|
||||
case 51:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -1595,53 +1516,38 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "cloudabi_fd_t";
|
||||
break;
|
||||
/* cloudabi_sys_sock_bind */
|
||||
/* cloudabi32_sys_sock_recv */
|
||||
case 45:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "void";
|
||||
break;
|
||||
/* cloudabi_sys_sock_connect */
|
||||
/* cloudabi32_sys_sock_send */
|
||||
case 46:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "void";
|
||||
break;
|
||||
/* cloudabi_sys_sock_listen */
|
||||
/* cloudabi_sys_sock_shutdown */
|
||||
case 47:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "void";
|
||||
break;
|
||||
/* cloudabi32_sys_sock_recv */
|
||||
/* cloudabi_sys_sock_stat_get */
|
||||
case 48:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "void";
|
||||
break;
|
||||
/* cloudabi32_sys_sock_send */
|
||||
case 49:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "void";
|
||||
break;
|
||||
/* cloudabi_sys_sock_shutdown */
|
||||
case 50:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "void";
|
||||
break;
|
||||
/* cloudabi_sys_sock_stat_get */
|
||||
case 51:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "void";
|
||||
break;
|
||||
/* cloudabi32_sys_thread_create */
|
||||
case 52:
|
||||
case 49:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "cloudabi_tid_t";
|
||||
break;
|
||||
/* cloudabi_sys_thread_exit */
|
||||
case 53:
|
||||
case 50:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "void";
|
||||
break;
|
||||
/* cloudabi_sys_thread_yield */
|
||||
case 54:
|
||||
case 51:
|
||||
default:
|
||||
break;
|
||||
};
|
||||
|
@ -259,22 +259,6 @@ struct cloudabi_sys_sock_accept_args {
|
||||
char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
|
||||
char unused_l_[PADL_(void *)]; void * unused; char unused_r_[PADR_(void *)];
|
||||
};
|
||||
struct cloudabi_sys_sock_bind_args {
|
||||
char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
|
||||
char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
|
||||
char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
|
||||
char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)];
|
||||
};
|
||||
struct cloudabi_sys_sock_connect_args {
|
||||
char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
|
||||
char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
|
||||
char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
|
||||
char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)];
|
||||
};
|
||||
struct cloudabi_sys_sock_listen_args {
|
||||
char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
|
||||
char backlog_l_[PADL_(cloudabi_backlog_t)]; cloudabi_backlog_t backlog; char backlog_r_[PADR_(cloudabi_backlog_t)];
|
||||
};
|
||||
struct cloudabi64_sys_sock_recv_args {
|
||||
char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
|
||||
char in_l_[PADL_(const cloudabi64_recv_in_t *)]; const cloudabi64_recv_in_t * in; char in_r_[PADR_(const cloudabi64_recv_in_t *)];
|
||||
@ -349,9 +333,6 @@ int cloudabi_sys_proc_fork(struct thread *, struct cloudabi_sys_proc_fork_args *
|
||||
int cloudabi_sys_proc_raise(struct thread *, struct cloudabi_sys_proc_raise_args *);
|
||||
int cloudabi_sys_random_get(struct thread *, struct cloudabi_sys_random_get_args *);
|
||||
int cloudabi_sys_sock_accept(struct thread *, struct cloudabi_sys_sock_accept_args *);
|
||||
int cloudabi_sys_sock_bind(struct thread *, struct cloudabi_sys_sock_bind_args *);
|
||||
int cloudabi_sys_sock_connect(struct thread *, struct cloudabi_sys_sock_connect_args *);
|
||||
int cloudabi_sys_sock_listen(struct thread *, struct cloudabi_sys_sock_listen_args *);
|
||||
int cloudabi64_sys_sock_recv(struct thread *, struct cloudabi64_sys_sock_recv_args *);
|
||||
int cloudabi64_sys_sock_send(struct thread *, struct cloudabi64_sys_sock_send_args *);
|
||||
int cloudabi_sys_sock_shutdown(struct thread *, struct cloudabi_sys_sock_shutdown_args *);
|
||||
@ -440,9 +421,6 @@ int cloudabi_sys_thread_yield(struct thread *, struct cloudabi_sys_thread_yield_
|
||||
#define CLOUDABI64_SYS_AUE_cloudabi_sys_proc_raise AUE_NULL
|
||||
#define CLOUDABI64_SYS_AUE_cloudabi_sys_random_get AUE_NULL
|
||||
#define CLOUDABI64_SYS_AUE_cloudabi_sys_sock_accept AUE_NULL
|
||||
#define CLOUDABI64_SYS_AUE_cloudabi_sys_sock_bind AUE_NULL
|
||||
#define CLOUDABI64_SYS_AUE_cloudabi_sys_sock_connect AUE_NULL
|
||||
#define CLOUDABI64_SYS_AUE_cloudabi_sys_sock_listen AUE_NULL
|
||||
#define CLOUDABI64_SYS_AUE_cloudabi64_sys_sock_recv AUE_NULL
|
||||
#define CLOUDABI64_SYS_AUE_cloudabi64_sys_sock_send AUE_NULL
|
||||
#define CLOUDABI64_SYS_AUE_cloudabi_sys_sock_shutdown AUE_NULL
|
||||
|
@ -50,14 +50,11 @@
|
||||
#define CLOUDABI64_SYS_cloudabi_sys_proc_raise 42
|
||||
#define CLOUDABI64_SYS_cloudabi_sys_random_get 43
|
||||
#define CLOUDABI64_SYS_cloudabi_sys_sock_accept 44
|
||||
#define CLOUDABI64_SYS_cloudabi_sys_sock_bind 45
|
||||
#define CLOUDABI64_SYS_cloudabi_sys_sock_connect 46
|
||||
#define CLOUDABI64_SYS_cloudabi_sys_sock_listen 47
|
||||
#define CLOUDABI64_SYS_cloudabi64_sys_sock_recv 48
|
||||
#define CLOUDABI64_SYS_cloudabi64_sys_sock_send 49
|
||||
#define CLOUDABI64_SYS_cloudabi_sys_sock_shutdown 50
|
||||
#define CLOUDABI64_SYS_cloudabi_sys_sock_stat_get 51
|
||||
#define CLOUDABI64_SYS_cloudabi64_sys_thread_create 52
|
||||
#define CLOUDABI64_SYS_cloudabi_sys_thread_exit 53
|
||||
#define CLOUDABI64_SYS_cloudabi_sys_thread_yield 54
|
||||
#define CLOUDABI64_SYS_MAXSYSCALL 55
|
||||
#define CLOUDABI64_SYS_cloudabi64_sys_sock_recv 45
|
||||
#define CLOUDABI64_SYS_cloudabi64_sys_sock_send 46
|
||||
#define CLOUDABI64_SYS_cloudabi_sys_sock_shutdown 47
|
||||
#define CLOUDABI64_SYS_cloudabi_sys_sock_stat_get 48
|
||||
#define CLOUDABI64_SYS_cloudabi64_sys_thread_create 49
|
||||
#define CLOUDABI64_SYS_cloudabi_sys_thread_exit 50
|
||||
#define CLOUDABI64_SYS_cloudabi_sys_thread_yield 51
|
||||
#define CLOUDABI64_SYS_MAXSYSCALL 52
|
||||
|
@ -51,14 +51,11 @@ const char *cloudabi64_syscallnames[] = {
|
||||
"cloudabi_sys_proc_raise", /* 42 = cloudabi_sys_proc_raise */
|
||||
"cloudabi_sys_random_get", /* 43 = cloudabi_sys_random_get */
|
||||
"cloudabi_sys_sock_accept", /* 44 = cloudabi_sys_sock_accept */
|
||||
"cloudabi_sys_sock_bind", /* 45 = cloudabi_sys_sock_bind */
|
||||
"cloudabi_sys_sock_connect", /* 46 = cloudabi_sys_sock_connect */
|
||||
"cloudabi_sys_sock_listen", /* 47 = cloudabi_sys_sock_listen */
|
||||
"cloudabi64_sys_sock_recv", /* 48 = cloudabi64_sys_sock_recv */
|
||||
"cloudabi64_sys_sock_send", /* 49 = cloudabi64_sys_sock_send */
|
||||
"cloudabi_sys_sock_shutdown", /* 50 = cloudabi_sys_sock_shutdown */
|
||||
"cloudabi_sys_sock_stat_get", /* 51 = cloudabi_sys_sock_stat_get */
|
||||
"cloudabi64_sys_thread_create", /* 52 = cloudabi64_sys_thread_create */
|
||||
"cloudabi_sys_thread_exit", /* 53 = cloudabi_sys_thread_exit */
|
||||
"cloudabi_sys_thread_yield", /* 54 = cloudabi_sys_thread_yield */
|
||||
"cloudabi64_sys_sock_recv", /* 45 = cloudabi64_sys_sock_recv */
|
||||
"cloudabi64_sys_sock_send", /* 46 = cloudabi64_sys_sock_send */
|
||||
"cloudabi_sys_sock_shutdown", /* 47 = cloudabi_sys_sock_shutdown */
|
||||
"cloudabi_sys_sock_stat_get", /* 48 = cloudabi_sys_sock_stat_get */
|
||||
"cloudabi64_sys_thread_create", /* 49 = cloudabi64_sys_thread_create */
|
||||
"cloudabi_sys_thread_exit", /* 50 = cloudabi_sys_thread_exit */
|
||||
"cloudabi_sys_thread_yield", /* 51 = cloudabi_sys_thread_yield */
|
||||
};
|
||||
|
@ -59,14 +59,11 @@ struct sysent cloudabi64_sysent[] = {
|
||||
{ AS(cloudabi_sys_proc_raise_args), (sy_call_t *)cloudabi_sys_proc_raise, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 42 = cloudabi_sys_proc_raise */
|
||||
{ AS(cloudabi_sys_random_get_args), (sy_call_t *)cloudabi_sys_random_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 43 = cloudabi_sys_random_get */
|
||||
{ AS(cloudabi_sys_sock_accept_args), (sy_call_t *)cloudabi_sys_sock_accept, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 44 = cloudabi_sys_sock_accept */
|
||||
{ AS(cloudabi_sys_sock_bind_args), (sy_call_t *)cloudabi_sys_sock_bind, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 45 = cloudabi_sys_sock_bind */
|
||||
{ AS(cloudabi_sys_sock_connect_args), (sy_call_t *)cloudabi_sys_sock_connect, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 46 = cloudabi_sys_sock_connect */
|
||||
{ AS(cloudabi_sys_sock_listen_args), (sy_call_t *)cloudabi_sys_sock_listen, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 47 = cloudabi_sys_sock_listen */
|
||||
{ AS(cloudabi64_sys_sock_recv_args), (sy_call_t *)cloudabi64_sys_sock_recv, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 48 = cloudabi64_sys_sock_recv */
|
||||
{ AS(cloudabi64_sys_sock_send_args), (sy_call_t *)cloudabi64_sys_sock_send, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 49 = cloudabi64_sys_sock_send */
|
||||
{ AS(cloudabi_sys_sock_shutdown_args), (sy_call_t *)cloudabi_sys_sock_shutdown, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 50 = cloudabi_sys_sock_shutdown */
|
||||
{ AS(cloudabi_sys_sock_stat_get_args), (sy_call_t *)cloudabi_sys_sock_stat_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 51 = cloudabi_sys_sock_stat_get */
|
||||
{ AS(cloudabi64_sys_thread_create_args), (sy_call_t *)cloudabi64_sys_thread_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 52 = cloudabi64_sys_thread_create */
|
||||
{ AS(cloudabi_sys_thread_exit_args), (sy_call_t *)cloudabi_sys_thread_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 53 = cloudabi_sys_thread_exit */
|
||||
{ 0, (sy_call_t *)cloudabi_sys_thread_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 54 = cloudabi_sys_thread_yield */
|
||||
{ AS(cloudabi64_sys_sock_recv_args), (sy_call_t *)cloudabi64_sys_sock_recv, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 45 = cloudabi64_sys_sock_recv */
|
||||
{ AS(cloudabi64_sys_sock_send_args), (sy_call_t *)cloudabi64_sys_sock_send, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 46 = cloudabi64_sys_sock_send */
|
||||
{ AS(cloudabi_sys_sock_shutdown_args), (sy_call_t *)cloudabi_sys_sock_shutdown, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 47 = cloudabi_sys_sock_shutdown */
|
||||
{ AS(cloudabi_sys_sock_stat_get_args), (sy_call_t *)cloudabi_sys_sock_stat_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 48 = cloudabi_sys_sock_stat_get */
|
||||
{ AS(cloudabi64_sys_thread_create_args), (sy_call_t *)cloudabi64_sys_thread_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 49 = cloudabi64_sys_thread_create */
|
||||
{ AS(cloudabi_sys_thread_exit_args), (sy_call_t *)cloudabi_sys_thread_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 50 = cloudabi_sys_thread_exit */
|
||||
{ 0, (sy_call_t *)cloudabi_sys_thread_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 51 = cloudabi_sys_thread_yield */
|
||||
};
|
||||
|
@ -415,36 +415,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
|
||||
*n_args = 2;
|
||||
break;
|
||||
}
|
||||
/* cloudabi_sys_sock_bind */
|
||||
case 45: {
|
||||
struct cloudabi_sys_sock_bind_args *p = params;
|
||||
iarg[0] = p->sock; /* cloudabi_fd_t */
|
||||
iarg[1] = p->fd; /* cloudabi_fd_t */
|
||||
uarg[2] = (intptr_t) p->path; /* const char * */
|
||||
uarg[3] = p->path_len; /* size_t */
|
||||
*n_args = 4;
|
||||
break;
|
||||
}
|
||||
/* cloudabi_sys_sock_connect */
|
||||
case 46: {
|
||||
struct cloudabi_sys_sock_connect_args *p = params;
|
||||
iarg[0] = p->sock; /* cloudabi_fd_t */
|
||||
iarg[1] = p->fd; /* cloudabi_fd_t */
|
||||
uarg[2] = (intptr_t) p->path; /* const char * */
|
||||
uarg[3] = p->path_len; /* size_t */
|
||||
*n_args = 4;
|
||||
break;
|
||||
}
|
||||
/* cloudabi_sys_sock_listen */
|
||||
case 47: {
|
||||
struct cloudabi_sys_sock_listen_args *p = params;
|
||||
iarg[0] = p->sock; /* cloudabi_fd_t */
|
||||
iarg[1] = p->backlog; /* cloudabi_backlog_t */
|
||||
*n_args = 2;
|
||||
break;
|
||||
}
|
||||
/* cloudabi64_sys_sock_recv */
|
||||
case 48: {
|
||||
case 45: {
|
||||
struct cloudabi64_sys_sock_recv_args *p = params;
|
||||
iarg[0] = p->sock; /* cloudabi_fd_t */
|
||||
uarg[1] = (intptr_t) p->in; /* const cloudabi64_recv_in_t * */
|
||||
@ -453,7 +425,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
|
||||
break;
|
||||
}
|
||||
/* cloudabi64_sys_sock_send */
|
||||
case 49: {
|
||||
case 46: {
|
||||
struct cloudabi64_sys_sock_send_args *p = params;
|
||||
iarg[0] = p->sock; /* cloudabi_fd_t */
|
||||
uarg[1] = (intptr_t) p->in; /* const cloudabi64_send_in_t * */
|
||||
@ -462,7 +434,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
|
||||
break;
|
||||
}
|
||||
/* cloudabi_sys_sock_shutdown */
|
||||
case 50: {
|
||||
case 47: {
|
||||
struct cloudabi_sys_sock_shutdown_args *p = params;
|
||||
iarg[0] = p->sock; /* cloudabi_fd_t */
|
||||
iarg[1] = p->how; /* cloudabi_sdflags_t */
|
||||
@ -470,7 +442,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
|
||||
break;
|
||||
}
|
||||
/* cloudabi_sys_sock_stat_get */
|
||||
case 51: {
|
||||
case 48: {
|
||||
struct cloudabi_sys_sock_stat_get_args *p = params;
|
||||
iarg[0] = p->sock; /* cloudabi_fd_t */
|
||||
uarg[1] = (intptr_t) p->buf; /* cloudabi_sockstat_t * */
|
||||
@ -479,14 +451,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
|
||||
break;
|
||||
}
|
||||
/* cloudabi64_sys_thread_create */
|
||||
case 52: {
|
||||
case 49: {
|
||||
struct cloudabi64_sys_thread_create_args *p = params;
|
||||
uarg[0] = (intptr_t) p->attr; /* cloudabi64_threadattr_t * */
|
||||
*n_args = 1;
|
||||
break;
|
||||
}
|
||||
/* cloudabi_sys_thread_exit */
|
||||
case 53: {
|
||||
case 50: {
|
||||
struct cloudabi_sys_thread_exit_args *p = params;
|
||||
uarg[0] = (intptr_t) p->lock; /* cloudabi_lock_t * */
|
||||
iarg[1] = p->scope; /* cloudabi_scope_t */
|
||||
@ -494,7 +466,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
|
||||
break;
|
||||
}
|
||||
/* cloudabi_sys_thread_yield */
|
||||
case 54: {
|
||||
case 51: {
|
||||
*n_args = 0;
|
||||
break;
|
||||
}
|
||||
@ -1224,59 +1196,8 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
|
||||
break;
|
||||
};
|
||||
break;
|
||||
/* cloudabi_sys_sock_bind */
|
||||
case 45:
|
||||
switch(ndx) {
|
||||
case 0:
|
||||
p = "cloudabi_fd_t";
|
||||
break;
|
||||
case 1:
|
||||
p = "cloudabi_fd_t";
|
||||
break;
|
||||
case 2:
|
||||
p = "userland const char *";
|
||||
break;
|
||||
case 3:
|
||||
p = "size_t";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
break;
|
||||
/* cloudabi_sys_sock_connect */
|
||||
case 46:
|
||||
switch(ndx) {
|
||||
case 0:
|
||||
p = "cloudabi_fd_t";
|
||||
break;
|
||||
case 1:
|
||||
p = "cloudabi_fd_t";
|
||||
break;
|
||||
case 2:
|
||||
p = "userland const char *";
|
||||
break;
|
||||
case 3:
|
||||
p = "size_t";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
break;
|
||||
/* cloudabi_sys_sock_listen */
|
||||
case 47:
|
||||
switch(ndx) {
|
||||
case 0:
|
||||
p = "cloudabi_fd_t";
|
||||
break;
|
||||
case 1:
|
||||
p = "cloudabi_backlog_t";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
break;
|
||||
/* cloudabi64_sys_sock_recv */
|
||||
case 48:
|
||||
case 45:
|
||||
switch(ndx) {
|
||||
case 0:
|
||||
p = "cloudabi_fd_t";
|
||||
@ -1292,7 +1213,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
|
||||
};
|
||||
break;
|
||||
/* cloudabi64_sys_sock_send */
|
||||
case 49:
|
||||
case 46:
|
||||
switch(ndx) {
|
||||
case 0:
|
||||
p = "cloudabi_fd_t";
|
||||
@ -1308,7 +1229,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
|
||||
};
|
||||
break;
|
||||
/* cloudabi_sys_sock_shutdown */
|
||||
case 50:
|
||||
case 47:
|
||||
switch(ndx) {
|
||||
case 0:
|
||||
p = "cloudabi_fd_t";
|
||||
@ -1321,7 +1242,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
|
||||
};
|
||||
break;
|
||||
/* cloudabi_sys_sock_stat_get */
|
||||
case 51:
|
||||
case 48:
|
||||
switch(ndx) {
|
||||
case 0:
|
||||
p = "cloudabi_fd_t";
|
||||
@ -1337,7 +1258,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
|
||||
};
|
||||
break;
|
||||
/* cloudabi64_sys_thread_create */
|
||||
case 52:
|
||||
case 49:
|
||||
switch(ndx) {
|
||||
case 0:
|
||||
p = "userland cloudabi64_threadattr_t *";
|
||||
@ -1347,7 +1268,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
|
||||
};
|
||||
break;
|
||||
/* cloudabi_sys_thread_exit */
|
||||
case 53:
|
||||
case 50:
|
||||
switch(ndx) {
|
||||
case 0:
|
||||
p = "userland cloudabi_lock_t *";
|
||||
@ -1360,7 +1281,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
|
||||
};
|
||||
break;
|
||||
/* cloudabi_sys_thread_yield */
|
||||
case 54:
|
||||
case 51:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -1595,53 +1516,38 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "cloudabi_fd_t";
|
||||
break;
|
||||
/* cloudabi_sys_sock_bind */
|
||||
/* cloudabi64_sys_sock_recv */
|
||||
case 45:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "void";
|
||||
break;
|
||||
/* cloudabi_sys_sock_connect */
|
||||
/* cloudabi64_sys_sock_send */
|
||||
case 46:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "void";
|
||||
break;
|
||||
/* cloudabi_sys_sock_listen */
|
||||
/* cloudabi_sys_sock_shutdown */
|
||||
case 47:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "void";
|
||||
break;
|
||||
/* cloudabi64_sys_sock_recv */
|
||||
/* cloudabi_sys_sock_stat_get */
|
||||
case 48:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "void";
|
||||
break;
|
||||
/* cloudabi64_sys_sock_send */
|
||||
case 49:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "void";
|
||||
break;
|
||||
/* cloudabi_sys_sock_shutdown */
|
||||
case 50:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "void";
|
||||
break;
|
||||
/* cloudabi_sys_sock_stat_get */
|
||||
case 51:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "void";
|
||||
break;
|
||||
/* cloudabi64_sys_thread_create */
|
||||
case 52:
|
||||
case 49:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "cloudabi_tid_t";
|
||||
break;
|
||||
/* cloudabi_sys_thread_exit */
|
||||
case 53:
|
||||
case 50:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "void";
|
||||
break;
|
||||
/* cloudabi_sys_thread_yield */
|
||||
case 54:
|
||||
case 51:
|
||||
default:
|
||||
break;
|
||||
};
|
||||
|
@ -249,47 +249,42 @@ typedef uint16_t cloudabi_riflags_t;
|
||||
#define CLOUDABI_SOCK_RECV_WAITALL 0x0010
|
||||
|
||||
typedef uint64_t cloudabi_rights_t;
|
||||
#define CLOUDABI_RIGHT_FD_DATASYNC 0x0000000000000001
|
||||
#define CLOUDABI_RIGHT_FD_READ 0x0000000000000002
|
||||
#define CLOUDABI_RIGHT_FD_SEEK 0x0000000000000004
|
||||
#define CLOUDABI_RIGHT_FD_STAT_PUT_FLAGS 0x0000000000000008
|
||||
#define CLOUDABI_RIGHT_FD_SYNC 0x0000000000000010
|
||||
#define CLOUDABI_RIGHT_FD_TELL 0x0000000000000020
|
||||
#define CLOUDABI_RIGHT_FD_WRITE 0x0000000000000040
|
||||
#define CLOUDABI_RIGHT_FILE_ADVISE 0x0000000000000080
|
||||
#define CLOUDABI_RIGHT_FILE_ALLOCATE 0x0000000000000100
|
||||
#define CLOUDABI_RIGHT_FILE_CREATE_DIRECTORY 0x0000000000000200
|
||||
#define CLOUDABI_RIGHT_FILE_CREATE_FILE 0x0000000000000400
|
||||
#define CLOUDABI_RIGHT_FILE_CREATE_FIFO 0x0000000000000800
|
||||
#define CLOUDABI_RIGHT_FILE_LINK_SOURCE 0x0000000000001000
|
||||
#define CLOUDABI_RIGHT_FILE_LINK_TARGET 0x0000000000002000
|
||||
#define CLOUDABI_RIGHT_FILE_OPEN 0x0000000000004000
|
||||
#define CLOUDABI_RIGHT_FILE_READDIR 0x0000000000008000
|
||||
#define CLOUDABI_RIGHT_FILE_READLINK 0x0000000000010000
|
||||
#define CLOUDABI_RIGHT_FILE_RENAME_SOURCE 0x0000000000020000
|
||||
#define CLOUDABI_RIGHT_FILE_RENAME_TARGET 0x0000000000040000
|
||||
#define CLOUDABI_RIGHT_FILE_STAT_FGET 0x0000000000080000
|
||||
#define CLOUDABI_RIGHT_FILE_STAT_FPUT_SIZE 0x0000000000100000
|
||||
#define CLOUDABI_RIGHT_FILE_STAT_FPUT_TIMES 0x0000000000200000
|
||||
#define CLOUDABI_RIGHT_FILE_STAT_GET 0x0000000000400000
|
||||
#define CLOUDABI_RIGHT_FILE_STAT_PUT_TIMES 0x0000000000800000
|
||||
#define CLOUDABI_RIGHT_FILE_SYMLINK 0x0000000001000000
|
||||
#define CLOUDABI_RIGHT_FILE_UNLINK 0x0000000002000000
|
||||
#define CLOUDABI_RIGHT_MEM_MAP 0x0000000004000000
|
||||
#define CLOUDABI_RIGHT_MEM_MAP_EXEC 0x0000000008000000
|
||||
#define CLOUDABI_RIGHT_POLL_FD_READWRITE 0x0000000010000000
|
||||
#define CLOUDABI_RIGHT_POLL_MODIFY 0x0000000020000000
|
||||
#define CLOUDABI_RIGHT_POLL_PROC_TERMINATE 0x0000000040000000
|
||||
#define CLOUDABI_RIGHT_POLL_WAIT 0x0000000080000000
|
||||
#define CLOUDABI_RIGHT_PROC_EXEC 0x0000000100000000
|
||||
#define CLOUDABI_RIGHT_SOCK_ACCEPT 0x0000000200000000
|
||||
#define CLOUDABI_RIGHT_SOCK_BIND_DIRECTORY 0x0000000400000000
|
||||
#define CLOUDABI_RIGHT_SOCK_BIND_SOCKET 0x0000000800000000
|
||||
#define CLOUDABI_RIGHT_SOCK_CONNECT_DIRECTORY 0x0000001000000000
|
||||
#define CLOUDABI_RIGHT_SOCK_CONNECT_SOCKET 0x0000002000000000
|
||||
#define CLOUDABI_RIGHT_SOCK_LISTEN 0x0000004000000000
|
||||
#define CLOUDABI_RIGHT_SOCK_SHUTDOWN 0x0000008000000000
|
||||
#define CLOUDABI_RIGHT_SOCK_STAT_GET 0x0000010000000000
|
||||
#define CLOUDABI_RIGHT_FD_DATASYNC 0x0000000000000001
|
||||
#define CLOUDABI_RIGHT_FD_READ 0x0000000000000002
|
||||
#define CLOUDABI_RIGHT_FD_SEEK 0x0000000000000004
|
||||
#define CLOUDABI_RIGHT_FD_STAT_PUT_FLAGS 0x0000000000000008
|
||||
#define CLOUDABI_RIGHT_FD_SYNC 0x0000000000000010
|
||||
#define CLOUDABI_RIGHT_FD_TELL 0x0000000000000020
|
||||
#define CLOUDABI_RIGHT_FD_WRITE 0x0000000000000040
|
||||
#define CLOUDABI_RIGHT_FILE_ADVISE 0x0000000000000080
|
||||
#define CLOUDABI_RIGHT_FILE_ALLOCATE 0x0000000000000100
|
||||
#define CLOUDABI_RIGHT_FILE_CREATE_DIRECTORY 0x0000000000000200
|
||||
#define CLOUDABI_RIGHT_FILE_CREATE_FILE 0x0000000000000400
|
||||
#define CLOUDABI_RIGHT_FILE_CREATE_FIFO 0x0000000000000800
|
||||
#define CLOUDABI_RIGHT_FILE_LINK_SOURCE 0x0000000000001000
|
||||
#define CLOUDABI_RIGHT_FILE_LINK_TARGET 0x0000000000002000
|
||||
#define CLOUDABI_RIGHT_FILE_OPEN 0x0000000000004000
|
||||
#define CLOUDABI_RIGHT_FILE_READDIR 0x0000000000008000
|
||||
#define CLOUDABI_RIGHT_FILE_READLINK 0x0000000000010000
|
||||
#define CLOUDABI_RIGHT_FILE_RENAME_SOURCE 0x0000000000020000
|
||||
#define CLOUDABI_RIGHT_FILE_RENAME_TARGET 0x0000000000040000
|
||||
#define CLOUDABI_RIGHT_FILE_STAT_FGET 0x0000000000080000
|
||||
#define CLOUDABI_RIGHT_FILE_STAT_FPUT_SIZE 0x0000000000100000
|
||||
#define CLOUDABI_RIGHT_FILE_STAT_FPUT_TIMES 0x0000000000200000
|
||||
#define CLOUDABI_RIGHT_FILE_STAT_GET 0x0000000000400000
|
||||
#define CLOUDABI_RIGHT_FILE_STAT_PUT_TIMES 0x0000000000800000
|
||||
#define CLOUDABI_RIGHT_FILE_SYMLINK 0x0000000001000000
|
||||
#define CLOUDABI_RIGHT_FILE_UNLINK 0x0000000002000000
|
||||
#define CLOUDABI_RIGHT_MEM_MAP 0x0000000004000000
|
||||
#define CLOUDABI_RIGHT_MEM_MAP_EXEC 0x0000000008000000
|
||||
#define CLOUDABI_RIGHT_POLL_FD_READWRITE 0x0000000010000000
|
||||
#define CLOUDABI_RIGHT_POLL_MODIFY 0x0000000020000000
|
||||
#define CLOUDABI_RIGHT_POLL_PROC_TERMINATE 0x0000000040000000
|
||||
#define CLOUDABI_RIGHT_POLL_WAIT 0x0000000080000000
|
||||
#define CLOUDABI_RIGHT_PROC_EXEC 0x0000000100000000
|
||||
#define CLOUDABI_RIGHT_SOCK_ACCEPT 0x0000000200000000
|
||||
#define CLOUDABI_RIGHT_SOCK_SHUTDOWN 0x0000008000000000
|
||||
#define CLOUDABI_RIGHT_SOCK_STAT_GET 0x0000010000000000
|
||||
|
||||
typedef uint16_t cloudabi_roflags_t;
|
||||
#define CLOUDABI_SOCK_RECV_FDS_TRUNCATED 0x0001
|
||||
|
@ -413,51 +413,33 @@ ENTRY(cloudabi_sys_sock_accept)
|
||||
ret
|
||||
END(cloudabi_sys_sock_accept)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_bind)
|
||||
mov w8, #45
|
||||
svc #0
|
||||
ret
|
||||
END(cloudabi_sys_sock_bind)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_connect)
|
||||
mov w8, #46
|
||||
svc #0
|
||||
ret
|
||||
END(cloudabi_sys_sock_connect)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_listen)
|
||||
mov w8, #47
|
||||
svc #0
|
||||
ret
|
||||
END(cloudabi_sys_sock_listen)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_recv)
|
||||
mov w8, #48
|
||||
mov w8, #45
|
||||
svc #0
|
||||
ret
|
||||
END(cloudabi_sys_sock_recv)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_send)
|
||||
mov w8, #49
|
||||
mov w8, #46
|
||||
svc #0
|
||||
ret
|
||||
END(cloudabi_sys_sock_send)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_shutdown)
|
||||
mov w8, #50
|
||||
mov w8, #47
|
||||
svc #0
|
||||
ret
|
||||
END(cloudabi_sys_sock_shutdown)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_stat_get)
|
||||
mov w8, #51
|
||||
mov w8, #48
|
||||
svc #0
|
||||
ret
|
||||
END(cloudabi_sys_sock_stat_get)
|
||||
|
||||
ENTRY(cloudabi_sys_thread_create)
|
||||
str x1, [sp, #-8]
|
||||
mov w8, #52
|
||||
mov w8, #49
|
||||
svc #0
|
||||
ldr x2, [sp, #-8]
|
||||
b.cs 1f
|
||||
@ -468,12 +450,12 @@ ENTRY(cloudabi_sys_thread_create)
|
||||
END(cloudabi_sys_thread_create)
|
||||
|
||||
ENTRY(cloudabi_sys_thread_exit)
|
||||
mov w8, #53
|
||||
mov w8, #50
|
||||
svc #0
|
||||
END(cloudabi_sys_thread_exit)
|
||||
|
||||
ENTRY(cloudabi_sys_thread_yield)
|
||||
mov w8, #54
|
||||
mov w8, #51
|
||||
svc #0
|
||||
ret
|
||||
END(cloudabi_sys_thread_yield)
|
||||
|
@ -375,51 +375,33 @@ ENTRY(cloudabi_sys_sock_accept)
|
||||
bx lr
|
||||
END(cloudabi_sys_sock_accept)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_bind)
|
||||
mov ip, #45
|
||||
swi 0
|
||||
bx lr
|
||||
END(cloudabi_sys_sock_bind)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_connect)
|
||||
mov ip, #46
|
||||
swi 0
|
||||
bx lr
|
||||
END(cloudabi_sys_sock_connect)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_listen)
|
||||
mov ip, #47
|
||||
swi 0
|
||||
bx lr
|
||||
END(cloudabi_sys_sock_listen)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_recv)
|
||||
mov ip, #48
|
||||
mov ip, #45
|
||||
swi 0
|
||||
bx lr
|
||||
END(cloudabi_sys_sock_recv)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_send)
|
||||
mov ip, #49
|
||||
mov ip, #46
|
||||
swi 0
|
||||
bx lr
|
||||
END(cloudabi_sys_sock_send)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_shutdown)
|
||||
mov ip, #50
|
||||
mov ip, #47
|
||||
swi 0
|
||||
bx lr
|
||||
END(cloudabi_sys_sock_shutdown)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_stat_get)
|
||||
mov ip, #51
|
||||
mov ip, #48
|
||||
swi 0
|
||||
bx lr
|
||||
END(cloudabi_sys_sock_stat_get)
|
||||
|
||||
ENTRY(cloudabi_sys_thread_create)
|
||||
str r1, [sp, #-4]
|
||||
mov ip, #52
|
||||
mov ip, #49
|
||||
swi 0
|
||||
ldrcc r2, [sp, #-4]
|
||||
strcc r0, [r2]
|
||||
@ -428,12 +410,12 @@ ENTRY(cloudabi_sys_thread_create)
|
||||
END(cloudabi_sys_thread_create)
|
||||
|
||||
ENTRY(cloudabi_sys_thread_exit)
|
||||
mov ip, #53
|
||||
mov ip, #50
|
||||
swi 0
|
||||
END(cloudabi_sys_thread_exit)
|
||||
|
||||
ENTRY(cloudabi_sys_thread_yield)
|
||||
mov ip, #54
|
||||
mov ip, #51
|
||||
swi 0
|
||||
bx lr
|
||||
END(cloudabi_sys_thread_yield)
|
||||
|
@ -400,50 +400,32 @@ ENTRY(cloudabi_sys_sock_accept)
|
||||
ret
|
||||
END(cloudabi_sys_sock_accept)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_bind)
|
||||
mov $45, %eax
|
||||
int $0x80
|
||||
ret
|
||||
END(cloudabi_sys_sock_bind)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_connect)
|
||||
mov $46, %eax
|
||||
int $0x80
|
||||
ret
|
||||
END(cloudabi_sys_sock_connect)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_listen)
|
||||
mov $47, %eax
|
||||
int $0x80
|
||||
ret
|
||||
END(cloudabi_sys_sock_listen)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_recv)
|
||||
mov $48, %eax
|
||||
mov $45, %eax
|
||||
int $0x80
|
||||
ret
|
||||
END(cloudabi_sys_sock_recv)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_send)
|
||||
mov $49, %eax
|
||||
mov $46, %eax
|
||||
int $0x80
|
||||
ret
|
||||
END(cloudabi_sys_sock_send)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_shutdown)
|
||||
mov $50, %eax
|
||||
mov $47, %eax
|
||||
int $0x80
|
||||
ret
|
||||
END(cloudabi_sys_sock_shutdown)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_stat_get)
|
||||
mov $51, %eax
|
||||
mov $48, %eax
|
||||
int $0x80
|
||||
ret
|
||||
END(cloudabi_sys_sock_stat_get)
|
||||
|
||||
ENTRY(cloudabi_sys_thread_create)
|
||||
mov $52, %eax
|
||||
mov $49, %eax
|
||||
int $0x80
|
||||
jc 1f
|
||||
mov 8(%esp), %ecx
|
||||
@ -454,12 +436,12 @@ ENTRY(cloudabi_sys_thread_create)
|
||||
END(cloudabi_sys_thread_create)
|
||||
|
||||
ENTRY(cloudabi_sys_thread_exit)
|
||||
mov $53, %eax
|
||||
mov $50, %eax
|
||||
int $0x80
|
||||
END(cloudabi_sys_thread_exit)
|
||||
|
||||
ENTRY(cloudabi_sys_thread_yield)
|
||||
mov $54, %eax
|
||||
mov $51, %eax
|
||||
int $0x80
|
||||
ret
|
||||
END(cloudabi_sys_thread_yield)
|
||||
|
@ -1015,63 +1015,6 @@ ENTRY(cloudabi_sys_sock_accept)
|
||||
ret
|
||||
END(cloudabi_sys_sock_accept)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_bind)
|
||||
push %ebp
|
||||
mov %esp, %ebp
|
||||
mov 8(%ebp), %ecx
|
||||
mov %ecx, -32(%ebp)
|
||||
mov 12(%ebp), %ecx
|
||||
mov %ecx, -24(%ebp)
|
||||
mov 16(%ebp), %ecx
|
||||
mov %ecx, -16(%ebp)
|
||||
movl $0, -12(%ebp)
|
||||
mov 20(%ebp), %ecx
|
||||
mov %ecx, -8(%ebp)
|
||||
movl $0, -4(%ebp)
|
||||
mov $45, %eax
|
||||
mov %ebp, %ecx
|
||||
sub $32, %ecx
|
||||
int $0x80
|
||||
pop %ebp
|
||||
ret
|
||||
END(cloudabi_sys_sock_bind)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_connect)
|
||||
push %ebp
|
||||
mov %esp, %ebp
|
||||
mov 8(%ebp), %ecx
|
||||
mov %ecx, -32(%ebp)
|
||||
mov 12(%ebp), %ecx
|
||||
mov %ecx, -24(%ebp)
|
||||
mov 16(%ebp), %ecx
|
||||
mov %ecx, -16(%ebp)
|
||||
movl $0, -12(%ebp)
|
||||
mov 20(%ebp), %ecx
|
||||
mov %ecx, -8(%ebp)
|
||||
movl $0, -4(%ebp)
|
||||
mov $46, %eax
|
||||
mov %ebp, %ecx
|
||||
sub $32, %ecx
|
||||
int $0x80
|
||||
pop %ebp
|
||||
ret
|
||||
END(cloudabi_sys_sock_connect)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_listen)
|
||||
push %ebp
|
||||
mov %esp, %ebp
|
||||
mov 8(%ebp), %ecx
|
||||
mov %ecx, -16(%ebp)
|
||||
mov 12(%ebp), %ecx
|
||||
mov %ecx, -8(%ebp)
|
||||
mov $47, %eax
|
||||
mov %ebp, %ecx
|
||||
sub $16, %ecx
|
||||
int $0x80
|
||||
pop %ebp
|
||||
ret
|
||||
END(cloudabi_sys_sock_listen)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_recv)
|
||||
push %ebp
|
||||
mov %esp, %ebp
|
||||
@ -1083,7 +1026,7 @@ ENTRY(cloudabi_sys_sock_recv)
|
||||
mov 16(%ebp), %ecx
|
||||
mov %ecx, -8(%ebp)
|
||||
movl $0, -4(%ebp)
|
||||
mov $48, %eax
|
||||
mov $45, %eax
|
||||
mov %ebp, %ecx
|
||||
sub $24, %ecx
|
||||
int $0x80
|
||||
@ -1102,7 +1045,7 @@ ENTRY(cloudabi_sys_sock_send)
|
||||
mov 16(%ebp), %ecx
|
||||
mov %ecx, -8(%ebp)
|
||||
movl $0, -4(%ebp)
|
||||
mov $49, %eax
|
||||
mov $46, %eax
|
||||
mov %ebp, %ecx
|
||||
sub $24, %ecx
|
||||
int $0x80
|
||||
@ -1117,7 +1060,7 @@ ENTRY(cloudabi_sys_sock_shutdown)
|
||||
mov %ecx, -16(%ebp)
|
||||
mov 12(%ebp), %ecx
|
||||
mov %ecx, -8(%ebp)
|
||||
mov $50, %eax
|
||||
mov $47, %eax
|
||||
mov %ebp, %ecx
|
||||
sub $16, %ecx
|
||||
int $0x80
|
||||
@ -1135,7 +1078,7 @@ ENTRY(cloudabi_sys_sock_stat_get)
|
||||
movl $0, -12(%ebp)
|
||||
mov 16(%ebp), %ecx
|
||||
mov %ecx, -8(%ebp)
|
||||
mov $51, %eax
|
||||
mov $48, %eax
|
||||
mov %ebp, %ecx
|
||||
sub $24, %ecx
|
||||
int $0x80
|
||||
@ -1149,7 +1092,7 @@ ENTRY(cloudabi_sys_thread_create)
|
||||
mov 8(%ebp), %ecx
|
||||
mov %ecx, -16(%ebp)
|
||||
movl $0, -12(%ebp)
|
||||
mov $52, %eax
|
||||
mov $49, %eax
|
||||
mov %ebp, %ecx
|
||||
sub $16, %ecx
|
||||
int $0x80
|
||||
@ -1171,7 +1114,7 @@ ENTRY(cloudabi_sys_thread_exit)
|
||||
movl $0, -12(%ebp)
|
||||
mov 12(%ebp), %ecx
|
||||
mov %ecx, -8(%ebp)
|
||||
mov $53, %eax
|
||||
mov $50, %eax
|
||||
mov %ebp, %ecx
|
||||
sub $16, %ecx
|
||||
int $0x80
|
||||
@ -1180,7 +1123,7 @@ END(cloudabi_sys_thread_exit)
|
||||
ENTRY(cloudabi_sys_thread_yield)
|
||||
push %ebp
|
||||
mov %esp, %ebp
|
||||
mov $54, %eax
|
||||
mov $51, %eax
|
||||
mov %ebp, %ecx
|
||||
sub $16, %ecx
|
||||
int $0x80
|
||||
|
@ -431,53 +431,33 @@ ENTRY(cloudabi_sys_sock_accept)
|
||||
ret
|
||||
END(cloudabi_sys_sock_accept)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_bind)
|
||||
mov %rcx, %r10
|
||||
mov $45, %eax
|
||||
syscall
|
||||
ret
|
||||
END(cloudabi_sys_sock_bind)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_connect)
|
||||
mov %rcx, %r10
|
||||
mov $46, %eax
|
||||
syscall
|
||||
ret
|
||||
END(cloudabi_sys_sock_connect)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_listen)
|
||||
mov $47, %eax
|
||||
syscall
|
||||
ret
|
||||
END(cloudabi_sys_sock_listen)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_recv)
|
||||
mov $48, %eax
|
||||
mov $45, %eax
|
||||
syscall
|
||||
ret
|
||||
END(cloudabi_sys_sock_recv)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_send)
|
||||
mov $49, %eax
|
||||
mov $46, %eax
|
||||
syscall
|
||||
ret
|
||||
END(cloudabi_sys_sock_send)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_shutdown)
|
||||
mov $50, %eax
|
||||
mov $47, %eax
|
||||
syscall
|
||||
ret
|
||||
END(cloudabi_sys_sock_shutdown)
|
||||
|
||||
ENTRY(cloudabi_sys_sock_stat_get)
|
||||
mov $51, %eax
|
||||
mov $48, %eax
|
||||
syscall
|
||||
ret
|
||||
END(cloudabi_sys_sock_stat_get)
|
||||
|
||||
ENTRY(cloudabi_sys_thread_create)
|
||||
push %rsi
|
||||
mov $52, %eax
|
||||
mov $49, %eax
|
||||
syscall
|
||||
pop %rcx
|
||||
jc 1f
|
||||
@ -488,12 +468,12 @@ ENTRY(cloudabi_sys_thread_create)
|
||||
END(cloudabi_sys_thread_create)
|
||||
|
||||
ENTRY(cloudabi_sys_thread_exit)
|
||||
mov $53, %eax
|
||||
mov $50, %eax
|
||||
syscall
|
||||
END(cloudabi_sys_thread_exit)
|
||||
|
||||
ENTRY(cloudabi_sys_thread_yield)
|
||||
mov $54, %eax
|
||||
mov $51, %eax
|
||||
syscall
|
||||
ret
|
||||
END(cloudabi_sys_thread_yield)
|
||||
|
@ -262,46 +262,30 @@
|
||||
cloudabi_fd_t sock, \
|
||||
void *unused); }
|
||||
|
||||
45 AUE_NULL STD { void cloudabi_sys_sock_bind( \
|
||||
cloudabi_fd_t sock, \
|
||||
cloudabi_fd_t fd, \
|
||||
const char *path, \
|
||||
size_t path_len); }
|
||||
|
||||
46 AUE_NULL STD { void cloudabi_sys_sock_connect( \
|
||||
cloudabi_fd_t sock, \
|
||||
cloudabi_fd_t fd, \
|
||||
const char *path, \
|
||||
size_t path_len); }
|
||||
|
||||
47 AUE_NULL STD { void cloudabi_sys_sock_listen( \
|
||||
cloudabi_fd_t sock, \
|
||||
cloudabi_backlog_t backlog); }
|
||||
|
||||
48 AUE_NULL STD { void cloudabi32_sys_sock_recv( \
|
||||
45 AUE_NULL STD { void cloudabi32_sys_sock_recv( \
|
||||
cloudabi_fd_t sock, \
|
||||
const cloudabi32_recv_in_t *in, \
|
||||
cloudabi32_recv_out_t *out); }
|
||||
|
||||
49 AUE_NULL STD { void cloudabi32_sys_sock_send( \
|
||||
46 AUE_NULL STD { void cloudabi32_sys_sock_send( \
|
||||
cloudabi_fd_t sock, \
|
||||
const cloudabi32_send_in_t *in, \
|
||||
cloudabi32_send_out_t *out); }
|
||||
|
||||
50 AUE_NULL STD { void cloudabi_sys_sock_shutdown( \
|
||||
47 AUE_NULL STD { void cloudabi_sys_sock_shutdown( \
|
||||
cloudabi_fd_t sock, \
|
||||
cloudabi_sdflags_t how); }
|
||||
|
||||
51 AUE_NULL STD { void cloudabi_sys_sock_stat_get( \
|
||||
48 AUE_NULL STD { void cloudabi_sys_sock_stat_get( \
|
||||
cloudabi_fd_t sock, \
|
||||
cloudabi_sockstat_t *buf, \
|
||||
cloudabi_ssflags_t flags); }
|
||||
|
||||
52 AUE_NULL STD { cloudabi_tid_t cloudabi32_sys_thread_create( \
|
||||
49 AUE_NULL STD { cloudabi_tid_t cloudabi32_sys_thread_create( \
|
||||
cloudabi32_threadattr_t *attr); }
|
||||
|
||||
53 AUE_NULL STD { void cloudabi_sys_thread_exit( \
|
||||
50 AUE_NULL STD { void cloudabi_sys_thread_exit( \
|
||||
cloudabi_lock_t *lock, \
|
||||
cloudabi_scope_t scope); }
|
||||
|
||||
54 AUE_NULL STD { void cloudabi_sys_thread_yield(); }
|
||||
51 AUE_NULL STD { void cloudabi_sys_thread_yield(); }
|
||||
|
@ -262,46 +262,30 @@
|
||||
cloudabi_fd_t sock, \
|
||||
void *unused); }
|
||||
|
||||
45 AUE_NULL STD { void cloudabi_sys_sock_bind( \
|
||||
cloudabi_fd_t sock, \
|
||||
cloudabi_fd_t fd, \
|
||||
const char *path, \
|
||||
size_t path_len); }
|
||||
|
||||
46 AUE_NULL STD { void cloudabi_sys_sock_connect( \
|
||||
cloudabi_fd_t sock, \
|
||||
cloudabi_fd_t fd, \
|
||||
const char *path, \
|
||||
size_t path_len); }
|
||||
|
||||
47 AUE_NULL STD { void cloudabi_sys_sock_listen( \
|
||||
cloudabi_fd_t sock, \
|
||||
cloudabi_backlog_t backlog); }
|
||||
|
||||
48 AUE_NULL STD { void cloudabi64_sys_sock_recv( \
|
||||
45 AUE_NULL STD { void cloudabi64_sys_sock_recv( \
|
||||
cloudabi_fd_t sock, \
|
||||
const cloudabi64_recv_in_t *in, \
|
||||
cloudabi64_recv_out_t *out); }
|
||||
|
||||
49 AUE_NULL STD { void cloudabi64_sys_sock_send( \
|
||||
46 AUE_NULL STD { void cloudabi64_sys_sock_send( \
|
||||
cloudabi_fd_t sock, \
|
||||
const cloudabi64_send_in_t *in, \
|
||||
cloudabi64_send_out_t *out); }
|
||||
|
||||
50 AUE_NULL STD { void cloudabi_sys_sock_shutdown( \
|
||||
47 AUE_NULL STD { void cloudabi_sys_sock_shutdown( \
|
||||
cloudabi_fd_t sock, \
|
||||
cloudabi_sdflags_t how); }
|
||||
|
||||
51 AUE_NULL STD { void cloudabi_sys_sock_stat_get( \
|
||||
48 AUE_NULL STD { void cloudabi_sys_sock_stat_get( \
|
||||
cloudabi_fd_t sock, \
|
||||
cloudabi_sockstat_t *buf, \
|
||||
cloudabi_ssflags_t flags); }
|
||||
|
||||
52 AUE_NULL STD { cloudabi_tid_t cloudabi64_sys_thread_create( \
|
||||
49 AUE_NULL STD { cloudabi_tid_t cloudabi64_sys_thread_create( \
|
||||
cloudabi64_threadattr_t *attr); }
|
||||
|
||||
53 AUE_NULL STD { void cloudabi_sys_thread_exit( \
|
||||
50 AUE_NULL STD { void cloudabi_sys_thread_exit( \
|
||||
cloudabi_lock_t *lock, \
|
||||
cloudabi_scope_t scope); }
|
||||
|
||||
54 AUE_NULL STD { void cloudabi_sys_thread_yield(); }
|
||||
51 AUE_NULL STD { void cloudabi_sys_thread_yield(); }
|
||||
|
@ -628,12 +628,6 @@ static struct syscall decoded_syscalls[] = {
|
||||
.args = { { BinString | OUT, 0 }, { Int, 1 } } },
|
||||
{ .name = "cloudabi_sys_sock_accept", .ret_type = 1, .nargs = 2,
|
||||
.args = { { Int, 0 }, { CloudABISockStat | OUT, 1 } } },
|
||||
{ .name = "cloudabi_sys_sock_bind", .ret_type = 1, .nargs = 3,
|
||||
.args = { { Int, 0 }, { Int, 1 }, { BinString | IN, 2 } } },
|
||||
{ .name = "cloudabi_sys_sock_connect", .ret_type = 1, .nargs = 3,
|
||||
.args = { { Int, 0 }, { Int, 1 }, { BinString | IN, 2 } } },
|
||||
{ .name = "cloudabi_sys_sock_listen", .ret_type = 1, .nargs = 2,
|
||||
.args = { { Int, 0 }, { Int, 1 } } },
|
||||
{ .name = "cloudabi_sys_sock_shutdown", .ret_type = 1, .nargs = 2,
|
||||
.args = { { Int, 0 }, { CloudABISDFlags, 1 } } },
|
||||
{ .name = "cloudabi_sys_sock_stat_get", .ret_type = 1, .nargs = 3,
|
||||
|
Loading…
Reference in New Issue
Block a user