aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/compat/cloudabi/cloudabi_fd.c7
-rw-r--r--sys/compat/cloudabi/cloudabi_sock.c39
-rw-r--r--sys/compat/cloudabi32/cloudabi32_proto.h13
-rw-r--r--sys/compat/cloudabi32/cloudabi32_syscall.h16
-rw-r--r--sys/compat/cloudabi32/cloudabi32_syscalls.c14
-rw-r--r--sys/compat/cloudabi32/cloudabi32_sysent.c14
-rw-r--r--sys/compat/cloudabi32/cloudabi32_systrace_args.c92
-rw-r--r--sys/compat/cloudabi64/cloudabi64_proto.h13
-rw-r--r--sys/compat/cloudabi64/cloudabi64_syscall.h16
-rw-r--r--sys/compat/cloudabi64/cloudabi64_syscalls.c14
-rw-r--r--sys/compat/cloudabi64/cloudabi64_sysent.c14
-rw-r--r--sys/compat/cloudabi64/cloudabi64_systrace_args.c92
-rw-r--r--sys/contrib/cloudabi/cloudabi_types_common.h19
-rw-r--r--sys/contrib/cloudabi/cloudabi_vdso_aarch64.S30
-rw-r--r--sys/contrib/cloudabi/cloudabi_vdso_armv6.S28
-rw-r--r--sys/contrib/cloudabi/cloudabi_vdso_i686.S29
-rw-r--r--sys/contrib/cloudabi/cloudabi_vdso_i686_on_64bit.S52
-rw-r--r--sys/contrib/cloudabi/cloudabi_vdso_x86_64.S30
-rw-r--r--sys/contrib/cloudabi/syscalls32.master21
-rw-r--r--sys/contrib/cloudabi/syscalls64.master21
-rw-r--r--usr.bin/truss/syscalls.c49
21 files changed, 117 insertions, 506 deletions
diff --git a/sys/compat/cloudabi/cloudabi_fd.c b/sys/compat/cloudabi/cloudabi_fd.c
index ce41ba634d65..eb02f0357bb3 100644
--- a/sys/compat/cloudabi/cloudabi_fd.c
+++ b/sys/compat/cloudabi/cloudabi_fd.c
@@ -78,10 +78,7 @@ __FBSDID("$FreeBSD$");
MAPPING(CLOUDABI_RIGHT_POLL_PROC_TERMINATE, CAP_EVENT) \
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_SHUTDOWN, CAP_SHUTDOWN) \
- MAPPING(CLOUDABI_RIGHT_SOCK_STAT_GET, CAP_GETPEERNAME, \
- CAP_GETSOCKNAME, CAP_GETSOCKOPT)
int
cloudabi_sys_fd_close(struct thread *td, struct cloudabi_sys_fd_close_args *uap)
@@ -386,9 +383,7 @@ cloudabi_remove_conflicting_rights(cloudabi_filetype_t filetype,
CLOUDABI_RIGHT_FD_WRITE |
CLOUDABI_RIGHT_FILE_STAT_FGET |
CLOUDABI_RIGHT_POLL_FD_READWRITE |
- CLOUDABI_RIGHT_SOCK_ACCEPT |
- CLOUDABI_RIGHT_SOCK_SHUTDOWN |
- CLOUDABI_RIGHT_SOCK_STAT_GET;
+ CLOUDABI_RIGHT_SOCK_SHUTDOWN;
break;
default:
*inheriting = 0;
diff --git a/sys/compat/cloudabi/cloudabi_sock.c b/sys/compat/cloudabi/cloudabi_sock.c
index 3db2a5a33f8f..f202ef32f1a0 100644
--- a/sys/compat/cloudabi/cloudabi_sock.c
+++ b/sys/compat/cloudabi/cloudabi_sock.c
@@ -49,14 +49,6 @@ __FBSDID("$FreeBSD$");
#include <compat/cloudabi/cloudabi_util.h>
int
-cloudabi_sys_sock_accept(struct thread *td,
- struct cloudabi_sys_sock_accept_args *uap)
-{
-
- return (kern_accept(td, uap->sock, NULL, NULL, NULL));
-}
-
-int
cloudabi_sys_sock_shutdown(struct thread *td,
struct cloudabi_sys_sock_shutdown_args *uap)
{
@@ -80,37 +72,6 @@ cloudabi_sys_sock_shutdown(struct thread *td,
}
int
-cloudabi_sys_sock_stat_get(struct thread *td,
- struct cloudabi_sys_sock_stat_get_args *uap)
-{
- cloudabi_sockstat_t ss = {};
- cap_rights_t rights;
- struct file *fp;
- struct socket *so;
- int error;
-
- error = getsock_cap(td, uap->sock, cap_rights_init(&rights,
- CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp, NULL, NULL);
- if (error != 0)
- return (error);
- so = fp->f_data;
-
- /* Set ss_error. */
- SOCK_LOCK(so);
- ss.ss_error = cloudabi_convert_errno(so->so_error);
- if ((uap->flags & CLOUDABI_SOCKSTAT_CLEAR_ERROR) != 0)
- so->so_error = 0;
- SOCK_UNLOCK(so);
-
- /* Set ss_state. */
- if ((so->so_options & SO_ACCEPTCONN) != 0)
- ss.ss_state |= CLOUDABI_SOCKSTATE_ACCEPTCONN;
-
- fdrop(fp, td);
- return (copyout(&ss, uap->buf, sizeof(ss)));
-}
-
-int
cloudabi_sock_recv(struct thread *td, cloudabi_fd_t fd, struct iovec *data,
size_t datalen, cloudabi_fd_t *fds, size_t fdslen,
cloudabi_riflags_t flags, size_t *rdatalen, size_t *rfdslen,
diff --git a/sys/compat/cloudabi32/cloudabi32_proto.h b/sys/compat/cloudabi32/cloudabi32_proto.h
index 25e6e609a4aa..108bbbc2debb 100644
--- a/sys/compat/cloudabi32/cloudabi32_proto.h
+++ b/sys/compat/cloudabi32/cloudabi32_proto.h
@@ -255,10 +255,6 @@ struct cloudabi_sys_random_get_args {
char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)];
char buf_len_l_[PADL_(size_t)]; size_t buf_len; char buf_len_r_[PADR_(size_t)];
};
-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 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 *)];
@@ -273,11 +269,6 @@ struct cloudabi_sys_sock_shutdown_args {
char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
char how_l_[PADL_(cloudabi_sdflags_t)]; cloudabi_sdflags_t how; char how_r_[PADR_(cloudabi_sdflags_t)];
};
-struct cloudabi_sys_sock_stat_get_args {
- char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
- char buf_l_[PADL_(cloudabi_sockstat_t *)]; cloudabi_sockstat_t * buf; char buf_r_[PADR_(cloudabi_sockstat_t *)];
- char flags_l_[PADL_(cloudabi_ssflags_t)]; cloudabi_ssflags_t flags; char flags_r_[PADR_(cloudabi_ssflags_t)];
-};
struct cloudabi32_sys_thread_create_args {
char attr_l_[PADL_(cloudabi32_threadattr_t *)]; cloudabi32_threadattr_t * attr; char attr_r_[PADR_(cloudabi32_threadattr_t *)];
};
@@ -332,11 +323,9 @@ int cloudabi_sys_proc_exit(struct thread *, struct cloudabi_sys_proc_exit_args *
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 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 *);
-int cloudabi_sys_sock_stat_get(struct thread *, struct cloudabi_sys_sock_stat_get_args *);
int cloudabi32_sys_thread_create(struct thread *, struct cloudabi32_sys_thread_create_args *);
int cloudabi_sys_thread_exit(struct thread *, struct cloudabi_sys_thread_exit_args *);
int cloudabi_sys_thread_yield(struct thread *, struct cloudabi_sys_thread_yield_args *);
@@ -420,11 +409,9 @@ int cloudabi_sys_thread_yield(struct thread *, struct cloudabi_sys_thread_yield_
#define CLOUDABI32_SYS_AUE_cloudabi_sys_proc_fork AUE_NULL
#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_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
-#define CLOUDABI32_SYS_AUE_cloudabi_sys_sock_stat_get AUE_NULL
#define CLOUDABI32_SYS_AUE_cloudabi32_sys_thread_create AUE_NULL
#define CLOUDABI32_SYS_AUE_cloudabi_sys_thread_exit AUE_NULL
#define CLOUDABI32_SYS_AUE_cloudabi_sys_thread_yield AUE_NULL
diff --git a/sys/compat/cloudabi32/cloudabi32_syscall.h b/sys/compat/cloudabi32/cloudabi32_syscall.h
index 4bc7ce955b67..ba0aa0ef71b9 100644
--- a/sys/compat/cloudabi32/cloudabi32_syscall.h
+++ b/sys/compat/cloudabi32/cloudabi32_syscall.h
@@ -49,12 +49,10 @@
#define CLOUDABI32_SYS_cloudabi_sys_proc_fork 41
#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_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
+#define CLOUDABI32_SYS_cloudabi32_sys_sock_recv 44
+#define CLOUDABI32_SYS_cloudabi32_sys_sock_send 45
+#define CLOUDABI32_SYS_cloudabi_sys_sock_shutdown 46
+#define CLOUDABI32_SYS_cloudabi32_sys_thread_create 47
+#define CLOUDABI32_SYS_cloudabi_sys_thread_exit 48
+#define CLOUDABI32_SYS_cloudabi_sys_thread_yield 49
+#define CLOUDABI32_SYS_MAXSYSCALL 50
diff --git a/sys/compat/cloudabi32/cloudabi32_syscalls.c b/sys/compat/cloudabi32/cloudabi32_syscalls.c
index 168726a4f3f6..dfe24e7cd6eb 100644
--- a/sys/compat/cloudabi32/cloudabi32_syscalls.c
+++ b/sys/compat/cloudabi32/cloudabi32_syscalls.c
@@ -50,12 +50,10 @@ const char *cloudabi32_syscallnames[] = {
"cloudabi_sys_proc_fork", /* 41 = cloudabi_sys_proc_fork */
"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 */
- "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 */
+ "cloudabi32_sys_sock_recv", /* 44 = cloudabi32_sys_sock_recv */
+ "cloudabi32_sys_sock_send", /* 45 = cloudabi32_sys_sock_send */
+ "cloudabi_sys_sock_shutdown", /* 46 = cloudabi_sys_sock_shutdown */
+ "cloudabi32_sys_thread_create", /* 47 = cloudabi32_sys_thread_create */
+ "cloudabi_sys_thread_exit", /* 48 = cloudabi_sys_thread_exit */
+ "cloudabi_sys_thread_yield", /* 49 = cloudabi_sys_thread_yield */
};
diff --git a/sys/compat/cloudabi32/cloudabi32_sysent.c b/sys/compat/cloudabi32/cloudabi32_sysent.c
index 9072f53e121b..e48bcd1d509b 100644
--- a/sys/compat/cloudabi32/cloudabi32_sysent.c
+++ b/sys/compat/cloudabi32/cloudabi32_sysent.c
@@ -58,12 +58,10 @@ struct sysent cloudabi32_sysent[] = {
{ 0, (sy_call_t *)cloudabi_sys_proc_fork, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 41 = cloudabi_sys_proc_fork */
{ 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(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 */
+ { AS(cloudabi32_sys_sock_recv_args), (sy_call_t *)cloudabi32_sys_sock_recv, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 44 = 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 }, /* 45 = 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 }, /* 46 = cloudabi_sys_sock_shutdown */
+ { AS(cloudabi32_sys_thread_create_args), (sy_call_t *)cloudabi32_sys_thread_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 47 = 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 }, /* 48 = cloudabi_sys_thread_exit */
+ { 0, (sy_call_t *)cloudabi_sys_thread_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 49 = cloudabi_sys_thread_yield */
};
diff --git a/sys/compat/cloudabi32/cloudabi32_systrace_args.c b/sys/compat/cloudabi32/cloudabi32_systrace_args.c
index 05b6acd00ba4..532ce4dd4a4f 100644
--- a/sys/compat/cloudabi32/cloudabi32_systrace_args.c
+++ b/sys/compat/cloudabi32/cloudabi32_systrace_args.c
@@ -407,16 +407,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
*n_args = 2;
break;
}
- /* cloudabi_sys_sock_accept */
- case 44: {
- struct cloudabi_sys_sock_accept_args *p = params;
- iarg[0] = p->sock; /* cloudabi_fd_t */
- uarg[1] = (intptr_t) p->unused; /* void * */
- *n_args = 2;
- break;
- }
/* cloudabi32_sys_sock_recv */
- case 45: {
+ case 44: {
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 * */
@@ -425,7 +417,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
break;
}
/* cloudabi32_sys_sock_send */
- case 46: {
+ case 45: {
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 * */
@@ -434,31 +426,22 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
break;
}
/* cloudabi_sys_sock_shutdown */
- case 47: {
+ case 46: {
struct cloudabi_sys_sock_shutdown_args *p = params;
iarg[0] = p->sock; /* cloudabi_fd_t */
iarg[1] = p->how; /* cloudabi_sdflags_t */
*n_args = 2;
break;
}
- /* cloudabi_sys_sock_stat_get */
- 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 * */
- iarg[2] = p->flags; /* cloudabi_ssflags_t */
- *n_args = 3;
- break;
- }
/* cloudabi32_sys_thread_create */
- case 49: {
+ case 47: {
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 50: {
+ case 48: {
struct cloudabi_sys_thread_exit_args *p = params;
uarg[0] = (intptr_t) p->lock; /* cloudabi_lock_t * */
iarg[1] = p->scope; /* cloudabi_scope_t */
@@ -466,7 +449,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
break;
}
/* cloudabi_sys_thread_yield */
- case 51: {
+ case 49: {
*n_args = 0;
break;
}
@@ -1183,21 +1166,8 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
};
break;
- /* cloudabi_sys_sock_accept */
- case 44:
- switch(ndx) {
- case 0:
- p = "cloudabi_fd_t";
- break;
- case 1:
- p = "userland void *";
- break;
- default:
- break;
- };
- break;
/* cloudabi32_sys_sock_recv */
- case 45:
+ case 44:
switch(ndx) {
case 0:
p = "cloudabi_fd_t";
@@ -1213,7 +1183,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
};
break;
/* cloudabi32_sys_sock_send */
- case 46:
+ case 45:
switch(ndx) {
case 0:
p = "cloudabi_fd_t";
@@ -1229,7 +1199,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
};
break;
/* cloudabi_sys_sock_shutdown */
- case 47:
+ case 46:
switch(ndx) {
case 0:
p = "cloudabi_fd_t";
@@ -1241,24 +1211,8 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
};
break;
- /* cloudabi_sys_sock_stat_get */
- case 48:
- switch(ndx) {
- case 0:
- p = "cloudabi_fd_t";
- break;
- case 1:
- p = "userland cloudabi_sockstat_t *";
- break;
- case 2:
- p = "cloudabi_ssflags_t";
- break;
- default:
- break;
- };
- break;
/* cloudabi32_sys_thread_create */
- case 49:
+ case 47:
switch(ndx) {
case 0:
p = "userland cloudabi32_threadattr_t *";
@@ -1268,7 +1222,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
};
break;
/* cloudabi_sys_thread_exit */
- case 50:
+ case 48:
switch(ndx) {
case 0:
p = "userland cloudabi_lock_t *";
@@ -1281,7 +1235,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
};
break;
/* cloudabi_sys_thread_yield */
- case 51:
+ case 49:
break;
default:
break;
@@ -1511,43 +1465,33 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
if (ndx == 0 || ndx == 1)
p = "void";
break;
- /* cloudabi_sys_sock_accept */
- case 44:
- if (ndx == 0 || ndx == 1)
- p = "cloudabi_fd_t";
- break;
/* cloudabi32_sys_sock_recv */
- case 45:
+ case 44:
if (ndx == 0 || ndx == 1)
p = "void";
break;
/* cloudabi32_sys_sock_send */
- case 46:
+ case 45:
if (ndx == 0 || ndx == 1)
p = "void";
break;
/* cloudabi_sys_sock_shutdown */
- case 47:
- if (ndx == 0 || ndx == 1)
- p = "void";
- break;
- /* cloudabi_sys_sock_stat_get */
- case 48:
+ case 46:
if (ndx == 0 || ndx == 1)
p = "void";
break;
/* cloudabi32_sys_thread_create */
- case 49:
+ case 47:
if (ndx == 0 || ndx == 1)
p = "cloudabi_tid_t";
break;
/* cloudabi_sys_thread_exit */
- case 50:
+ case 48:
if (ndx == 0 || ndx == 1)
p = "void";
break;
/* cloudabi_sys_thread_yield */
- case 51:
+ case 49:
default:
break;
};
diff --git a/sys/compat/cloudabi64/cloudabi64_proto.h b/sys/compat/cloudabi64/cloudabi64_proto.h
index 02713d57bdb8..7adbea2d2d2e 100644
--- a/sys/compat/cloudabi64/cloudabi64_proto.h
+++ b/sys/compat/cloudabi64/cloudabi64_proto.h
@@ -255,10 +255,6 @@ struct cloudabi_sys_random_get_args {
char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)];
char buf_len_l_[PADL_(size_t)]; size_t buf_len; char buf_len_r_[PADR_(size_t)];
};
-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 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 *)];
@@ -273,11 +269,6 @@ struct cloudabi_sys_sock_shutdown_args {
char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
char how_l_[PADL_(cloudabi_sdflags_t)]; cloudabi_sdflags_t how; char how_r_[PADR_(cloudabi_sdflags_t)];
};
-struct cloudabi_sys_sock_stat_get_args {
- char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
- char buf_l_[PADL_(cloudabi_sockstat_t *)]; cloudabi_sockstat_t * buf; char buf_r_[PADR_(cloudabi_sockstat_t *)];
- char flags_l_[PADL_(cloudabi_ssflags_t)]; cloudabi_ssflags_t flags; char flags_r_[PADR_(cloudabi_ssflags_t)];
-};
struct cloudabi64_sys_thread_create_args {
char attr_l_[PADL_(cloudabi64_threadattr_t *)]; cloudabi64_threadattr_t * attr; char attr_r_[PADR_(cloudabi64_threadattr_t *)];
};
@@ -332,11 +323,9 @@ int cloudabi_sys_proc_exit(struct thread *, struct cloudabi_sys_proc_exit_args *
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 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 *);
-int cloudabi_sys_sock_stat_get(struct thread *, struct cloudabi_sys_sock_stat_get_args *);
int cloudabi64_sys_thread_create(struct thread *, struct cloudabi64_sys_thread_create_args *);
int cloudabi_sys_thread_exit(struct thread *, struct cloudabi_sys_thread_exit_args *);
int cloudabi_sys_thread_yield(struct thread *, struct cloudabi_sys_thread_yield_args *);
@@ -420,11 +409,9 @@ int cloudabi_sys_thread_yield(struct thread *, struct cloudabi_sys_thread_yield_
#define CLOUDABI64_SYS_AUE_cloudabi_sys_proc_fork AUE_NULL
#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_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
-#define CLOUDABI64_SYS_AUE_cloudabi_sys_sock_stat_get AUE_NULL
#define CLOUDABI64_SYS_AUE_cloudabi64_sys_thread_create AUE_NULL
#define CLOUDABI64_SYS_AUE_cloudabi_sys_thread_exit AUE_NULL
#define CLOUDABI64_SYS_AUE_cloudabi_sys_thread_yield AUE_NULL
diff --git a/sys/compat/cloudabi64/cloudabi64_syscall.h b/sys/compat/cloudabi64/cloudabi64_syscall.h
index c2a0ebd58041..af22a32eae90 100644
--- a/sys/compat/cloudabi64/cloudabi64_syscall.h
+++ b/sys/compat/cloudabi64/cloudabi64_syscall.h
@@ -49,12 +49,10 @@
#define CLOUDABI64_SYS_cloudabi_sys_proc_fork 41
#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_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
+#define CLOUDABI64_SYS_cloudabi64_sys_sock_recv 44
+#define CLOUDABI64_SYS_cloudabi64_sys_sock_send 45
+#define CLOUDABI64_SYS_cloudabi_sys_sock_shutdown 46
+#define CLOUDABI64_SYS_cloudabi64_sys_thread_create 47
+#define CLOUDABI64_SYS_cloudabi_sys_thread_exit 48
+#define CLOUDABI64_SYS_cloudabi_sys_thread_yield 49
+#define CLOUDABI64_SYS_MAXSYSCALL 50
diff --git a/sys/compat/cloudabi64/cloudabi64_syscalls.c b/sys/compat/cloudabi64/cloudabi64_syscalls.c
index 461620ab868a..101ed369b276 100644
--- a/sys/compat/cloudabi64/cloudabi64_syscalls.c
+++ b/sys/compat/cloudabi64/cloudabi64_syscalls.c
@@ -50,12 +50,10 @@ const char *cloudabi64_syscallnames[] = {
"cloudabi_sys_proc_fork", /* 41 = cloudabi_sys_proc_fork */
"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 */
- "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 */
+ "cloudabi64_sys_sock_recv", /* 44 = cloudabi64_sys_sock_recv */
+ "cloudabi64_sys_sock_send", /* 45 = cloudabi64_sys_sock_send */
+ "cloudabi_sys_sock_shutdown", /* 46 = cloudabi_sys_sock_shutdown */
+ "cloudabi64_sys_thread_create", /* 47 = cloudabi64_sys_thread_create */
+ "cloudabi_sys_thread_exit", /* 48 = cloudabi_sys_thread_exit */
+ "cloudabi_sys_thread_yield", /* 49 = cloudabi_sys_thread_yield */
};
diff --git a/sys/compat/cloudabi64/cloudabi64_sysent.c b/sys/compat/cloudabi64/cloudabi64_sysent.c
index 5841a207ee1a..3772cdbb2722 100644
--- a/sys/compat/cloudabi64/cloudabi64_sysent.c
+++ b/sys/compat/cloudabi64/cloudabi64_sysent.c
@@ -58,12 +58,10 @@ struct sysent cloudabi64_sysent[] = {
{ 0, (sy_call_t *)cloudabi_sys_proc_fork, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 41 = cloudabi_sys_proc_fork */
{ 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(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 */
+ { AS(cloudabi64_sys_sock_recv_args), (sy_call_t *)cloudabi64_sys_sock_recv, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 44 = 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 }, /* 45 = 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 }, /* 46 = cloudabi_sys_sock_shutdown */
+ { AS(cloudabi64_sys_thread_create_args), (sy_call_t *)cloudabi64_sys_thread_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 47 = 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 }, /* 48 = cloudabi_sys_thread_exit */
+ { 0, (sy_call_t *)cloudabi_sys_thread_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 49 = cloudabi_sys_thread_yield */
};
diff --git a/sys/compat/cloudabi64/cloudabi64_systrace_args.c b/sys/compat/cloudabi64/cloudabi64_systrace_args.c
index 80ea3ba5c3fd..14f10ce64fb1 100644
--- a/sys/compat/cloudabi64/cloudabi64_systrace_args.c
+++ b/sys/compat/cloudabi64/cloudabi64_systrace_args.c
@@ -407,16 +407,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
*n_args = 2;
break;
}
- /* cloudabi_sys_sock_accept */
- case 44: {
- struct cloudabi_sys_sock_accept_args *p = params;
- iarg[0] = p->sock; /* cloudabi_fd_t */
- uarg[1] = (intptr_t) p->unused; /* void * */
- *n_args = 2;
- break;
- }
/* cloudabi64_sys_sock_recv */
- case 45: {
+ case 44: {
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 * */
@@ -425,7 +417,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
break;
}
/* cloudabi64_sys_sock_send */
- case 46: {
+ case 45: {
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 * */
@@ -434,31 +426,22 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
break;
}
/* cloudabi_sys_sock_shutdown */
- case 47: {
+ case 46: {
struct cloudabi_sys_sock_shutdown_args *p = params;
iarg[0] = p->sock; /* cloudabi_fd_t */
iarg[1] = p->how; /* cloudabi_sdflags_t */
*n_args = 2;
break;
}
- /* cloudabi_sys_sock_stat_get */
- 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 * */
- iarg[2] = p->flags; /* cloudabi_ssflags_t */
- *n_args = 3;
- break;
- }
/* cloudabi64_sys_thread_create */
- case 49: {
+ case 47: {
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 50: {
+ case 48: {
struct cloudabi_sys_thread_exit_args *p = params;
uarg[0] = (intptr_t) p->lock; /* cloudabi_lock_t * */
iarg[1] = p->scope; /* cloudabi_scope_t */
@@ -466,7 +449,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
break;
}
/* cloudabi_sys_thread_yield */
- case 51: {
+ case 49: {
*n_args = 0;
break;
}
@@ -1183,21 +1166,8 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
};
break;
- /* cloudabi_sys_sock_accept */
- case 44:
- switch(ndx) {
- case 0:
- p = "cloudabi_fd_t";
- break;
- case 1:
- p = "userland void *";
- break;
- default:
- break;
- };
- break;
/* cloudabi64_sys_sock_recv */
- case 45:
+ case 44:
switch(ndx) {
case 0:
p = "cloudabi_fd_t";
@@ -1213,7 +1183,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
};
break;
/* cloudabi64_sys_sock_send */
- case 46:
+ case 45:
switch(ndx) {
case 0:
p = "cloudabi_fd_t";
@@ -1229,7 +1199,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
};
break;
/* cloudabi_sys_sock_shutdown */
- case 47:
+ case 46:
switch(ndx) {
case 0:
p = "cloudabi_fd_t";
@@ -1241,24 +1211,8 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
};
break;
- /* cloudabi_sys_sock_stat_get */
- case 48:
- switch(ndx) {
- case 0:
- p = "cloudabi_fd_t";
- break;
- case 1:
- p = "userland cloudabi_sockstat_t *";
- break;
- case 2:
- p = "cloudabi_ssflags_t";
- break;
- default:
- break;
- };
- break;
/* cloudabi64_sys_thread_create */
- case 49:
+ case 47:
switch(ndx) {
case 0:
p = "userland cloudabi64_threadattr_t *";
@@ -1268,7 +1222,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
};
break;
/* cloudabi_sys_thread_exit */
- case 50:
+ case 48:
switch(ndx) {
case 0:
p = "userland cloudabi_lock_t *";
@@ -1281,7 +1235,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
};
break;
/* cloudabi_sys_thread_yield */
- case 51:
+ case 49:
break;
default:
break;
@@ -1511,43 +1465,33 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
if (ndx == 0 || ndx == 1)
p = "void";
break;
- /* cloudabi_sys_sock_accept */
- case 44:
- if (ndx == 0 || ndx == 1)
- p = "cloudabi_fd_t";
- break;
/* cloudabi64_sys_sock_recv */
- case 45:
+ case 44:
if (ndx == 0 || ndx == 1)
p = "void";
break;
/* cloudabi64_sys_sock_send */
- case 46:
+ case 45:
if (ndx == 0 || ndx == 1)
p = "void";
break;
/* cloudabi_sys_sock_shutdown */
- case 47:
- if (ndx == 0 || ndx == 1)
- p = "void";
- break;
- /* cloudabi_sys_sock_stat_get */
- case 48:
+ case 46:
if (ndx == 0 || ndx == 1)
p = "void";
break;
/* cloudabi64_sys_thread_create */
- case 49:
+ case 47:
if (ndx == 0 || ndx == 1)
p = "cloudabi_tid_t";
break;
/* cloudabi_sys_thread_exit */
- case 50:
+ case 48:
if (ndx == 0 || ndx == 1)
p = "void";
break;
/* cloudabi_sys_thread_yield */
- case 51:
+ case 49:
default:
break;
};
diff --git a/sys/contrib/cloudabi/cloudabi_types_common.h b/sys/contrib/cloudabi/cloudabi_types_common.h
index a5176d4df35c..2764e3697d84 100644
--- a/sys/contrib/cloudabi/cloudabi_types_common.h
+++ b/sys/contrib/cloudabi/cloudabi_types_common.h
@@ -282,9 +282,7 @@ typedef uint64_t cloudabi_rights_t;
#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
@@ -328,12 +326,6 @@ typedef uint8_t cloudabi_signal_t;
#define CLOUDABI_SIGXCPU 25
#define CLOUDABI_SIGXFSZ 26
-typedef uint8_t cloudabi_ssflags_t;
-#define CLOUDABI_SOCKSTAT_CLEAR_ERROR 0x01
-
-typedef uint32_t cloudabi_sstate_t;
-#define CLOUDABI_SOCKSTATE_ACCEPTCONN 0x00000001
-
typedef uint16_t cloudabi_subclockflags_t;
#define CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME 0x0001
@@ -418,15 +410,4 @@ _Static_assert(offsetof(cloudabi_lookup_t, flags) == 4, "Incorrect layout");
_Static_assert(sizeof(cloudabi_lookup_t) == 8, "Incorrect layout");
_Static_assert(_Alignof(cloudabi_lookup_t) == 4, "Incorrect layout");
-typedef struct {
- _Alignas(1) char ss_unused[40];
- _Alignas(2) cloudabi_errno_t ss_error;
- _Alignas(4) cloudabi_sstate_t ss_state;
-} cloudabi_sockstat_t;
-_Static_assert(offsetof(cloudabi_sockstat_t, ss_unused) == 0, "Incorrect layout");
-_Static_assert(offsetof(cloudabi_sockstat_t, ss_error) == 40, "Incorrect layout");
-_Static_assert(offsetof(cloudabi_sockstat_t, ss_state) == 44, "Incorrect layout");
-_Static_assert(sizeof(cloudabi_sockstat_t) == 48, "Incorrect layout");
-_Static_assert(_Alignof(cloudabi_sockstat_t) == 4, "Incorrect layout");
-
#endif
diff --git a/sys/contrib/cloudabi/cloudabi_vdso_aarch64.S b/sys/contrib/cloudabi/cloudabi_vdso_aarch64.S
index 8564dfd74f76..7c98e5b3f005 100644
--- a/sys/contrib/cloudabi/cloudabi_vdso_aarch64.S
+++ b/sys/contrib/cloudabi/cloudabi_vdso_aarch64.S
@@ -401,45 +401,27 @@ ENTRY(cloudabi_sys_random_get)
ret
END(cloudabi_sys_random_get)
-ENTRY(cloudabi_sys_sock_accept)
- str x2, [sp, #-8]
- mov w8, #44
- svc #0
- ldr x2, [sp, #-8]
- b.cs 1f
- str w0, [x2]
- mov w0, wzr
-1:
- ret
-END(cloudabi_sys_sock_accept)
-
ENTRY(cloudabi_sys_sock_recv)
- mov w8, #45
+ mov w8, #44
svc #0
ret
END(cloudabi_sys_sock_recv)
ENTRY(cloudabi_sys_sock_send)
- mov w8, #46
+ mov w8, #45
svc #0
ret
END(cloudabi_sys_sock_send)
ENTRY(cloudabi_sys_sock_shutdown)
- mov w8, #47
+ mov w8, #46
svc #0
ret
END(cloudabi_sys_sock_shutdown)
-ENTRY(cloudabi_sys_sock_stat_get)
- mov w8, #48
- svc #0
- ret
-END(cloudabi_sys_sock_stat_get)
-
ENTRY(cloudabi_sys_thread_create)
str x1, [sp, #-8]
- mov w8, #49
+ mov w8, #47
svc #0
ldr x2, [sp, #-8]
b.cs 1f
@@ -450,12 +432,12 @@ ENTRY(cloudabi_sys_thread_create)
END(cloudabi_sys_thread_create)
ENTRY(cloudabi_sys_thread_exit)
- mov w8, #50
+ mov w8, #48
svc #0
END(cloudabi_sys_thread_exit)
ENTRY(cloudabi_sys_thread_yield)
- mov w8, #51
+ mov w8, #49
svc #0
ret
END(cloudabi_sys_thread_yield)
diff --git a/sys/contrib/cloudabi/cloudabi_vdso_armv6.S b/sys/contrib/cloudabi/cloudabi_vdso_armv6.S
index 6fc626d19813..7ca7a39419d6 100644
--- a/sys/contrib/cloudabi/cloudabi_vdso_armv6.S
+++ b/sys/contrib/cloudabi/cloudabi_vdso_armv6.S
@@ -365,43 +365,27 @@ ENTRY(cloudabi_sys_random_get)
bx lr
END(cloudabi_sys_random_get)
-ENTRY(cloudabi_sys_sock_accept)
- str r2, [sp, #-4]
- mov ip, #44
- swi 0
- ldrcc r2, [sp, #-4]
- strcc r0, [r2]
- movcc r0, $0
- bx lr
-END(cloudabi_sys_sock_accept)
-
ENTRY(cloudabi_sys_sock_recv)
- mov ip, #45
+ mov ip, #44
swi 0
bx lr
END(cloudabi_sys_sock_recv)
ENTRY(cloudabi_sys_sock_send)
- mov ip, #46
+ mov ip, #45
swi 0
bx lr
END(cloudabi_sys_sock_send)
ENTRY(cloudabi_sys_sock_shutdown)
- mov ip, #47
+ mov ip, #46
swi 0
bx lr
END(cloudabi_sys_sock_shutdown)
-ENTRY(cloudabi_sys_sock_stat_get)
- mov ip, #48
- swi 0
- bx lr
-END(cloudabi_sys_sock_stat_get)
-
ENTRY(cloudabi_sys_thread_create)
str r1, [sp, #-4]
- mov ip, #49
+ mov ip, #47
swi 0
ldrcc r2, [sp, #-4]
strcc r0, [r2]
@@ -410,12 +394,12 @@ ENTRY(cloudabi_sys_thread_create)
END(cloudabi_sys_thread_create)
ENTRY(cloudabi_sys_thread_exit)
- mov ip, #50
+ mov ip, #48
swi 0
END(cloudabi_sys_thread_exit)
ENTRY(cloudabi_sys_thread_yield)
- mov ip, #51
+ mov ip, #49
swi 0
bx lr
END(cloudabi_sys_thread_yield)
diff --git a/sys/contrib/cloudabi/cloudabi_vdso_i686.S b/sys/contrib/cloudabi/cloudabi_vdso_i686.S
index 47d02b254f1b..135ea8d55bf1 100644
--- a/sys/contrib/cloudabi/cloudabi_vdso_i686.S
+++ b/sys/contrib/cloudabi/cloudabi_vdso_i686.S
@@ -389,43 +389,26 @@ ENTRY(cloudabi_sys_random_get)
ret
END(cloudabi_sys_random_get)
-ENTRY(cloudabi_sys_sock_accept)
- mov $44, %eax
- int $0x80
- jc 1f
- mov 12(%esp), %ecx
- mov %eax, (%ecx)
- xor %eax, %eax
-1:
- ret
-END(cloudabi_sys_sock_accept)
-
ENTRY(cloudabi_sys_sock_recv)
- mov $45, %eax
+ mov $44, %eax
int $0x80
ret
END(cloudabi_sys_sock_recv)
ENTRY(cloudabi_sys_sock_send)
- mov $46, %eax
+ mov $45, %eax
int $0x80
ret
END(cloudabi_sys_sock_send)
ENTRY(cloudabi_sys_sock_shutdown)
- mov $47, %eax
+ mov $46, %eax
int $0x80
ret
END(cloudabi_sys_sock_shutdown)
-ENTRY(cloudabi_sys_sock_stat_get)
- mov $48, %eax
- int $0x80
- ret
-END(cloudabi_sys_sock_stat_get)
-
ENTRY(cloudabi_sys_thread_create)
- mov $49, %eax
+ mov $47, %eax
int $0x80
jc 1f
mov 8(%esp), %ecx
@@ -436,12 +419,12 @@ ENTRY(cloudabi_sys_thread_create)
END(cloudabi_sys_thread_create)
ENTRY(cloudabi_sys_thread_exit)
- mov $50, %eax
+ mov $48, %eax
int $0x80
END(cloudabi_sys_thread_exit)
ENTRY(cloudabi_sys_thread_yield)
- mov $51, %eax
+ mov $49, %eax
int $0x80
ret
END(cloudabi_sys_thread_yield)
diff --git a/sys/contrib/cloudabi/cloudabi_vdso_i686_on_64bit.S b/sys/contrib/cloudabi/cloudabi_vdso_i686_on_64bit.S
index 460936c6f227..009f928d71e5 100644
--- a/sys/contrib/cloudabi/cloudabi_vdso_i686_on_64bit.S
+++ b/sys/contrib/cloudabi/cloudabi_vdso_i686_on_64bit.S
@@ -993,28 +993,6 @@ ENTRY(cloudabi_sys_random_get)
ret
END(cloudabi_sys_random_get)
-ENTRY(cloudabi_sys_sock_accept)
- push %ebp
- mov %esp, %ebp
- mov 8(%ebp), %ecx
- mov %ecx, -16(%ebp)
- mov 12(%ebp), %ecx
- mov %ecx, -8(%ebp)
- movl $0, -4(%ebp)
- mov $44, %eax
- mov %ebp, %ecx
- sub $16, %ecx
- int $0x80
- test %eax, %eax
- jnz 1f
- mov 16(%ebp), %ecx
- mov -16(%ebp), %edx
- mov %edx, 0(%ecx)
-1:
- pop %ebp
- ret
-END(cloudabi_sys_sock_accept)
-
ENTRY(cloudabi_sys_sock_recv)
push %ebp
mov %esp, %ebp
@@ -1026,7 +1004,7 @@ ENTRY(cloudabi_sys_sock_recv)
mov 16(%ebp), %ecx
mov %ecx, -8(%ebp)
movl $0, -4(%ebp)
- mov $45, %eax
+ mov $44, %eax
mov %ebp, %ecx
sub $24, %ecx
int $0x80
@@ -1045,7 +1023,7 @@ ENTRY(cloudabi_sys_sock_send)
mov 16(%ebp), %ecx
mov %ecx, -8(%ebp)
movl $0, -4(%ebp)
- mov $46, %eax
+ mov $45, %eax
mov %ebp, %ecx
sub $24, %ecx
int $0x80
@@ -1060,7 +1038,7 @@ ENTRY(cloudabi_sys_sock_shutdown)
mov %ecx, -16(%ebp)
mov 12(%ebp), %ecx
mov %ecx, -8(%ebp)
- mov $47, %eax
+ mov $46, %eax
mov %ebp, %ecx
sub $16, %ecx
int $0x80
@@ -1068,31 +1046,13 @@ ENTRY(cloudabi_sys_sock_shutdown)
ret
END(cloudabi_sys_sock_shutdown)
-ENTRY(cloudabi_sys_sock_stat_get)
- push %ebp
- mov %esp, %ebp
- mov 8(%ebp), %ecx
- mov %ecx, -24(%ebp)
- mov 12(%ebp), %ecx
- mov %ecx, -16(%ebp)
- movl $0, -12(%ebp)
- mov 16(%ebp), %ecx
- mov %ecx, -8(%ebp)
- mov $48, %eax
- mov %ebp, %ecx
- sub $24, %ecx
- int $0x80
- pop %ebp
- ret
-END(cloudabi_sys_sock_stat_get)
-
ENTRY(cloudabi_sys_thread_create)
push %ebp
mov %esp, %ebp
mov 8(%ebp), %ecx
mov %ecx, -16(%ebp)
movl $0, -12(%ebp)
- mov $49, %eax
+ mov $47, %eax
mov %ebp, %ecx
sub $16, %ecx
int $0x80
@@ -1114,7 +1074,7 @@ ENTRY(cloudabi_sys_thread_exit)
movl $0, -12(%ebp)
mov 12(%ebp), %ecx
mov %ecx, -8(%ebp)
- mov $50, %eax
+ mov $48, %eax
mov %ebp, %ecx
sub $16, %ecx
int $0x80
@@ -1123,7 +1083,7 @@ END(cloudabi_sys_thread_exit)
ENTRY(cloudabi_sys_thread_yield)
push %ebp
mov %esp, %ebp
- mov $51, %eax
+ mov $49, %eax
mov %ebp, %ecx
sub $16, %ecx
int $0x80
diff --git a/sys/contrib/cloudabi/cloudabi_vdso_x86_64.S b/sys/contrib/cloudabi/cloudabi_vdso_x86_64.S
index 18e89ed55488..217bd1cbea0a 100644
--- a/sys/contrib/cloudabi/cloudabi_vdso_x86_64.S
+++ b/sys/contrib/cloudabi/cloudabi_vdso_x86_64.S
@@ -419,45 +419,27 @@ ENTRY(cloudabi_sys_random_get)
ret
END(cloudabi_sys_random_get)
-ENTRY(cloudabi_sys_sock_accept)
- push %rdx
- mov $44, %eax
- syscall
- pop %rcx
- jc 1f
- mov %eax, (%rcx)
- xor %eax, %eax
-1:
- ret
-END(cloudabi_sys_sock_accept)
-
ENTRY(cloudabi_sys_sock_recv)
- mov $45, %eax
+ mov $44, %eax
syscall
ret
END(cloudabi_sys_sock_recv)
ENTRY(cloudabi_sys_sock_send)
- mov $46, %eax
+ mov $45, %eax
syscall
ret
END(cloudabi_sys_sock_send)
ENTRY(cloudabi_sys_sock_shutdown)
- mov $47, %eax
+ mov $46, %eax
syscall
ret
END(cloudabi_sys_sock_shutdown)
-ENTRY(cloudabi_sys_sock_stat_get)
- mov $48, %eax
- syscall
- ret
-END(cloudabi_sys_sock_stat_get)
-
ENTRY(cloudabi_sys_thread_create)
push %rsi
- mov $49, %eax
+ mov $47, %eax
syscall
pop %rcx
jc 1f
@@ -468,12 +450,12 @@ ENTRY(cloudabi_sys_thread_create)
END(cloudabi_sys_thread_create)
ENTRY(cloudabi_sys_thread_exit)
- mov $50, %eax
+ mov $48, %eax
syscall
END(cloudabi_sys_thread_exit)
ENTRY(cloudabi_sys_thread_yield)
- mov $51, %eax
+ mov $49, %eax
syscall
ret
END(cloudabi_sys_thread_yield)
diff --git a/sys/contrib/cloudabi/syscalls32.master b/sys/contrib/cloudabi/syscalls32.master
index 69c2f8d250c4..6ed39ec7ed98 100644
--- a/sys/contrib/cloudabi/syscalls32.master
+++ b/sys/contrib/cloudabi/syscalls32.master
@@ -258,34 +258,25 @@
void *buf, \
size_t buf_len); }
-44 AUE_NULL STD { cloudabi_fd_t cloudabi_sys_sock_accept( \
- cloudabi_fd_t sock, \
- void *unused); }
-
-45 AUE_NULL STD { void cloudabi32_sys_sock_recv( \
+44 AUE_NULL STD { void cloudabi32_sys_sock_recv( \
cloudabi_fd_t sock, \
const cloudabi32_recv_in_t *in, \
cloudabi32_recv_out_t *out); }
-46 AUE_NULL STD { void cloudabi32_sys_sock_send( \
+45 AUE_NULL STD { void cloudabi32_sys_sock_send( \
cloudabi_fd_t sock, \
const cloudabi32_send_in_t *in, \
cloudabi32_send_out_t *out); }
-47 AUE_NULL STD { void cloudabi_sys_sock_shutdown( \
+46 AUE_NULL STD { void cloudabi_sys_sock_shutdown( \
cloudabi_fd_t sock, \
cloudabi_sdflags_t how); }
-48 AUE_NULL STD { void cloudabi_sys_sock_stat_get( \
- cloudabi_fd_t sock, \
- cloudabi_sockstat_t *buf, \
- cloudabi_ssflags_t flags); }
-
-49 AUE_NULL STD { cloudabi_tid_t cloudabi32_sys_thread_create( \
+47 AUE_NULL STD { cloudabi_tid_t cloudabi32_sys_thread_create( \
cloudabi32_threadattr_t *attr); }
-50 AUE_NULL STD { void cloudabi_sys_thread_exit( \
+48 AUE_NULL STD { void cloudabi_sys_thread_exit( \
cloudabi_lock_t *lock, \
cloudabi_scope_t scope); }
-51 AUE_NULL STD { void cloudabi_sys_thread_yield(); }
+49 AUE_NULL STD { void cloudabi_sys_thread_yield(); }
diff --git a/sys/contrib/cloudabi/syscalls64.master b/sys/contrib/cloudabi/syscalls64.master
index 642bb8c6e9db..81a77dcbefd1 100644
--- a/sys/contrib/cloudabi/syscalls64.master
+++ b/sys/contrib/cloudabi/syscalls64.master
@@ -258,34 +258,25 @@
void *buf, \
size_t buf_len); }
-44 AUE_NULL STD { cloudabi_fd_t cloudabi_sys_sock_accept( \
- cloudabi_fd_t sock, \
- void *unused); }
-
-45 AUE_NULL STD { void cloudabi64_sys_sock_recv( \
+44 AUE_NULL STD { void cloudabi64_sys_sock_recv( \
cloudabi_fd_t sock, \
const cloudabi64_recv_in_t *in, \
cloudabi64_recv_out_t *out); }
-46 AUE_NULL STD { void cloudabi64_sys_sock_send( \
+45 AUE_NULL STD { void cloudabi64_sys_sock_send( \
cloudabi_fd_t sock, \
const cloudabi64_send_in_t *in, \
cloudabi64_send_out_t *out); }
-47 AUE_NULL STD { void cloudabi_sys_sock_shutdown( \
+46 AUE_NULL STD { void cloudabi_sys_sock_shutdown( \
cloudabi_fd_t sock, \
cloudabi_sdflags_t how); }
-48 AUE_NULL STD { void cloudabi_sys_sock_stat_get( \
- cloudabi_fd_t sock, \
- cloudabi_sockstat_t *buf, \
- cloudabi_ssflags_t flags); }
-
-49 AUE_NULL STD { cloudabi_tid_t cloudabi64_sys_thread_create( \
+47 AUE_NULL STD { cloudabi_tid_t cloudabi64_sys_thread_create( \
cloudabi64_threadattr_t *attr); }
-50 AUE_NULL STD { void cloudabi_sys_thread_exit( \
+48 AUE_NULL STD { void cloudabi_sys_thread_exit( \
cloudabi_lock_t *lock, \
cloudabi_scope_t scope); }
-51 AUE_NULL STD { void cloudabi_sys_thread_yield(); }
+49 AUE_NULL STD { void cloudabi_sys_thread_yield(); }
diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c
index f12ac46fb990..49cbf30cf533 100644
--- a/usr.bin/truss/syscalls.c
+++ b/usr.bin/truss/syscalls.c
@@ -628,13 +628,8 @@ static struct syscall decoded_syscalls[] = {
.args = { { CloudABISignal, 0 } } },
{ .name = "cloudabi_sys_random_get", .ret_type = 1, .nargs = 2,
.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_shutdown", .ret_type = 1, .nargs = 2,
.args = { { Int, 0 }, { CloudABISDFlags, 1 } } },
- { .name = "cloudabi_sys_sock_stat_get", .ret_type = 1, .nargs = 3,
- .args = { { Int, 0 }, { CloudABISockStat | OUT, 1 },
- { CloudABISSFlags, 2 } } },
{ .name = "cloudabi_sys_thread_exit", .ret_type = 1, .nargs = 2,
.args = { { Ptr, 0 }, { CloudABIMFlags, 1 } } },
{ .name = "cloudabi_sys_thread_yield", .ret_type = 1, .nargs = 0 },
@@ -753,25 +748,6 @@ static struct xlat cloudabi_clockid[] = {
XEND
};
-static struct xlat cloudabi_errno[] = {
- X(E2BIG) X(EACCES) X(EADDRINUSE) X(EADDRNOTAVAIL)
- X(EAFNOSUPPORT) X(EAGAIN) X(EALREADY) X(EBADF) X(EBADMSG)
- X(EBUSY) X(ECANCELED) X(ECHILD) X(ECONNABORTED) X(ECONNREFUSED)
- X(ECONNRESET) X(EDEADLK) X(EDESTADDRREQ) X(EDOM) X(EDQUOT)
- X(EEXIST) X(EFAULT) X(EFBIG) X(EHOSTUNREACH) X(EIDRM) X(EILSEQ)
- X(EINPROGRESS) X(EINTR) X(EINVAL) X(EIO) X(EISCONN) X(EISDIR)
- X(ELOOP) X(EMFILE) X(EMLINK) X(EMSGSIZE) X(EMULTIHOP)
- X(ENAMETOOLONG) X(ENETDOWN) X(ENETRESET) X(ENETUNREACH)
- X(ENFILE) X(ENOBUFS) X(ENODEV) X(ENOENT) X(ENOEXEC) X(ENOLCK)
- X(ENOLINK) X(ENOMEM) X(ENOMSG) X(ENOPROTOOPT) X(ENOSPC)
- X(ENOSYS) X(ENOTCONN) X(ENOTDIR) X(ENOTEMPTY) X(ENOTRECOVERABLE)
- X(ENOTSOCK) X(ENOTSUP) X(ENOTTY) X(ENXIO) X(EOVERFLOW)
- X(EOWNERDEAD) X(EPERM) X(EPIPE) X(EPROTO) X(EPROTONOSUPPORT)
- X(EPROTOTYPE) X(ERANGE) X(EROFS) X(ESPIPE) X(ESRCH) X(ESTALE)
- X(ETIMEDOUT) X(ETXTBSY) X(EXDEV) X(ENOTCAPABLE)
- XEND
-};
-
static struct xlat cloudabi_fdflags[] = {
X(FDFLAG_APPEND) X(FDFLAG_DSYNC) X(FDFLAG_NONBLOCK)
X(FDFLAG_RSYNC) X(FDFLAG_SYNC)
@@ -833,16 +809,6 @@ static struct xlat cloudabi_signal[] = {
XEND
};
-static struct xlat cloudabi_ssflags[] = {
- X(SOCKSTAT_CLEAR_ERROR)
- XEND
-};
-
-static struct xlat cloudabi_ssstate[] = {
- X(SOCKSTATE_ACCEPTCONN)
- XEND
-};
-
static struct xlat cloudabi_ulflags[] = {
X(UNLINK_REMOVEDIR)
XEND
@@ -2262,21 +2228,6 @@ print_arg(struct syscall_args *sc, unsigned long *args, long *retval,
case CloudABISignal:
fputs(xlookup(cloudabi_signal, args[sc->offset]), fp);
break;
- case CloudABISockStat: {
- cloudabi_sockstat_t ss;
- if (get_struct(pid, (void *)args[sc->offset], &ss, sizeof(ss))
- != -1) {
- fprintf(fp, "%s, ", xlookup(
- cloudabi_errno, ss.ss_error));
- fprintf(fp, "%s }", xlookup_bits(
- cloudabi_ssstate, ss.ss_state));
- } else
- fprintf(fp, "0x%lx", args[sc->offset]);
- break;
- }
- case CloudABISSFlags:
- fputs(xlookup_bits(cloudabi_ssflags, args[sc->offset]), fp);
- break;
case CloudABITimestamp:
fprintf(fp, "%lu.%09lus", args[sc->offset] / 1000000000,
args[sc->offset] % 1000000000);