Author: ed Date: Wed Aug 30 07:30:06 2017 New Revision: 323015 URL: https://svnweb.freebsd.org/changeset/base/323015
Log: Complete the CloudABI networking refactoring. Now that all of the packaged software has been adjusted to either use Flower (https://github.com/NuxiNL/flower) for making incoming/outgoing network connections or can have connections injected, there is no longer need to keep accept() around. It is now a lot easier to write networked services that are address family independent, dual-stack, testable, etc. Remove all of the bits related to accept(), but also to getsockopt(SO_ACCEPTCONN). Modified: head/sys/compat/cloudabi/cloudabi_fd.c head/sys/compat/cloudabi/cloudabi_sock.c head/sys/compat/cloudabi32/cloudabi32_proto.h head/sys/compat/cloudabi32/cloudabi32_syscall.h head/sys/compat/cloudabi32/cloudabi32_syscalls.c head/sys/compat/cloudabi32/cloudabi32_sysent.c head/sys/compat/cloudabi32/cloudabi32_systrace_args.c head/sys/compat/cloudabi64/cloudabi64_proto.h head/sys/compat/cloudabi64/cloudabi64_syscall.h head/sys/compat/cloudabi64/cloudabi64_syscalls.c head/sys/compat/cloudabi64/cloudabi64_sysent.c head/sys/compat/cloudabi64/cloudabi64_systrace_args.c head/sys/contrib/cloudabi/cloudabi_types_common.h head/sys/contrib/cloudabi/cloudabi_vdso_aarch64.S head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S head/sys/contrib/cloudabi/cloudabi_vdso_i686.S head/sys/contrib/cloudabi/cloudabi_vdso_i686_on_64bit.S head/sys/contrib/cloudabi/cloudabi_vdso_x86_64.S head/sys/contrib/cloudabi/syscalls32.master head/sys/contrib/cloudabi/syscalls64.master head/usr.bin/truss/syscalls.c Modified: head/sys/compat/cloudabi/cloudabi_fd.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_fd.c Wed Aug 30 07:05:29 2017 (r323014) +++ head/sys/compat/cloudabi/cloudabi_fd.c Wed Aug 30 07:30:06 2017 (r323015) @@ -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 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; Modified: head/sys/compat/cloudabi/cloudabi_sock.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_sock.c Wed Aug 30 07:05:29 2017 (r323014) +++ head/sys/compat/cloudabi/cloudabi_sock.c Wed Aug 30 07:30:06 2017 (r323015) @@ -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) { @@ -77,37 +69,6 @@ cloudabi_sys_sock_shutdown(struct thread *td, } return (kern_shutdown(td, uap->sock, how)); -} - -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 Modified: head/sys/compat/cloudabi32/cloudabi32_proto.h ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_proto.h Wed Aug 30 07:05:29 2017 (r323014) +++ head/sys/compat/cloudabi32/cloudabi32_proto.h Wed Aug 30 07:30:06 2017 (r323015) @@ -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 clo 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 #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 Modified: head/sys/compat/cloudabi32/cloudabi32_syscall.h ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_syscall.h Wed Aug 30 07:05:29 2017 (r323014) +++ head/sys/compat/cloudabi32/cloudabi32_syscall.h Wed Aug 30 07:30:06 2017 (r323015) @@ -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 Modified: head/sys/compat/cloudabi32/cloudabi32_syscalls.c ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_syscalls.c Wed Aug 30 07:05:29 2017 (r323014) +++ head/sys/compat/cloudabi32/cloudabi32_syscalls.c Wed Aug 30 07:30:06 2017 (r323015) @@ -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 */ }; Modified: head/sys/compat/cloudabi32/cloudabi32_sysent.c ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_sysent.c Wed Aug 30 07:05:29 2017 (r323014) +++ head/sys/compat/cloudabi32/cloudabi32_sysent.c Wed Aug 30 07:30:06 2017 (r323015) @@ -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 */ }; Modified: head/sys/compat/cloudabi32/cloudabi32_systrace_args.c ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_systrace_args.c Wed Aug 30 07:05:29 2017 (r323014) +++ head/sys/compat/cloudabi32/cloudabi32_systrace_args.c Wed Aug 30 07:30:06 2017 (r323015) @@ -407,16 +407,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *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 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 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 break; } /* cloudabi_sys_thread_yield */ - case 51: { + case 49: { *n_args = 0; break; } @@ -1183,26 +1166,13 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; - /* cloudabi_sys_sock_accept */ + /* cloudabi32_sys_sock_recv */ 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: - switch(ndx) { - case 0: - p = "cloudabi_fd_t"; - break; - case 1: p = "userland const cloudabi32_recv_in_t *"; break; case 2: @@ -1213,7 +1183,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; 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 *d }; 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 *d 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 *d }; 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 *d }; break; /* cloudabi_sys_thread_yield */ - case 51: + case 49: break; default: break; @@ -1511,43 +1465,33 @@ systrace_return_setargdesc(int sysnum, int ndx, char * if (ndx == 0 || ndx == 1) p = "void"; break; - /* cloudabi_sys_sock_accept */ + /* cloudabi32_sys_sock_recv */ case 44: if (ndx == 0 || ndx == 1) - p = "cloudabi_fd_t"; - break; - /* cloudabi32_sys_sock_recv */ - case 45: - 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: + case 46: if (ndx == 0 || ndx == 1) p = "void"; break; - /* cloudabi_sys_sock_stat_get */ - case 48: - 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; }; Modified: head/sys/compat/cloudabi64/cloudabi64_proto.h ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_proto.h Wed Aug 30 07:05:29 2017 (r323014) +++ head/sys/compat/cloudabi64/cloudabi64_proto.h Wed Aug 30 07:30:06 2017 (r323015) @@ -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 clo 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 #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 Modified: head/sys/compat/cloudabi64/cloudabi64_syscall.h ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_syscall.h Wed Aug 30 07:05:29 2017 (r323014) +++ head/sys/compat/cloudabi64/cloudabi64_syscall.h Wed Aug 30 07:30:06 2017 (r323015) @@ -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 Modified: head/sys/compat/cloudabi64/cloudabi64_syscalls.c ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_syscalls.c Wed Aug 30 07:05:29 2017 (r323014) +++ head/sys/compat/cloudabi64/cloudabi64_syscalls.c Wed Aug 30 07:30:06 2017 (r323015) @@ -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 */ }; Modified: head/sys/compat/cloudabi64/cloudabi64_sysent.c ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_sysent.c Wed Aug 30 07:05:29 2017 (r323014) +++ head/sys/compat/cloudabi64/cloudabi64_sysent.c Wed Aug 30 07:30:06 2017 (r323015) @@ -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 */ }; Modified: head/sys/compat/cloudabi64/cloudabi64_systrace_args.c ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_systrace_args.c Wed Aug 30 07:05:29 2017 (r323014) +++ head/sys/compat/cloudabi64/cloudabi64_systrace_args.c Wed Aug 30 07:30:06 2017 (r323015) @@ -407,16 +407,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *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 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 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 break; } /* cloudabi_sys_thread_yield */ - case 51: { + case 49: { *n_args = 0; break; } @@ -1183,26 +1166,13 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; - /* cloudabi_sys_sock_accept */ + /* cloudabi64_sys_sock_recv */ 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: - switch(ndx) { - case 0: - p = "cloudabi_fd_t"; - break; - case 1: p = "userland const cloudabi64_recv_in_t *"; break; case 2: @@ -1213,7 +1183,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; 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 *d }; 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 *d 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 *d }; 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 *d }; break; /* cloudabi_sys_thread_yield */ - case 51: + case 49: break; default: break; @@ -1511,43 +1465,33 @@ systrace_return_setargdesc(int sysnum, int ndx, char * if (ndx == 0 || ndx == 1) p = "void"; break; - /* cloudabi_sys_sock_accept */ + /* cloudabi64_sys_sock_recv */ case 44: if (ndx == 0 || ndx == 1) - p = "cloudabi_fd_t"; - break; - /* cloudabi64_sys_sock_recv */ - case 45: - 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: + case 46: if (ndx == 0 || ndx == 1) p = "void"; break; - /* cloudabi_sys_sock_stat_get */ - case 48: - 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; }; Modified: head/sys/contrib/cloudabi/cloudabi_types_common.h ============================================================================== --- head/sys/contrib/cloudabi/cloudabi_types_common.h Wed Aug 30 07:05:29 2017 (r323014) +++ head/sys/contrib/cloudabi/cloudabi_types_common.h Wed Aug 30 07:30:06 2017 (r323015) @@ -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 @@ -417,16 +409,5 @@ _Static_assert(offsetof(cloudabi_lookup_t, fd) == 0, " _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 Modified: head/sys/contrib/cloudabi/cloudabi_vdso_aarch64.S ============================================================================== --- head/sys/contrib/cloudabi/cloudabi_vdso_aarch64.S Wed Aug 30 07:05:29 2017 (r323014) +++ head/sys/contrib/cloudabi/cloudabi_vdso_aarch64.S Wed Aug 30 07:30:06 2017 (r323015) @@ -401,45 +401,27 @@ ENTRY(cloudabi_sys_random_get) ret END(cloudabi_sys_random_get) -ENTRY(cloudabi_sys_sock_accept) - str x2, [sp, #-8] +ENTRY(cloudabi_sys_sock_recv) 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 - 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) Modified: head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S ============================================================================== --- head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S Wed Aug 30 07:05:29 2017 (r323014) +++ head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S Wed Aug 30 07:30:06 2017 (r323015) @@ -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] +ENTRY(cloudabi_sys_sock_recv) 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 - 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) Modified: head/sys/contrib/cloudabi/cloudabi_vdso_i686.S ============================================================================== --- head/sys/contrib/cloudabi/cloudabi_vdso_i686.S Wed Aug 30 07:05:29 2017 (r323014) +++ head/sys/contrib/cloudabi/cloudabi_vdso_i686.S Wed Aug 30 07:30:06 2017 (r323015) @@ -389,43 +389,26 @@ ENTRY(cloudabi_sys_random_get) ret END(cloudabi_sys_random_get) -ENTRY(cloudabi_sys_sock_accept) +ENTRY(cloudabi_sys_sock_recv) 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 - 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) Modified: head/sys/contrib/cloudabi/cloudabi_vdso_i686_on_64bit.S ============================================================================== --- head/sys/contrib/cloudabi/cloudabi_vdso_i686_on_64bit.S Wed Aug 30 07:05:29 2017 (r323014) +++ head/sys/contrib/cloudabi/cloudabi_vdso_i686_on_64bit.S Wed Aug 30 07:30:06 2017 (r323015) @@ -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 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"