Date: Wed, 5 Aug 2015 13:09:47 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r286318 - in head/sys: compat/cloudabi64 contrib/cloudabi Message-ID: <201508051309.t75D9lhi025549@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ed Date: Wed Aug 5 13:09:46 2015 New Revision: 286318 URL: https://svnweb.freebsd.org/changeset/base/286318 Log: Import the latest CloudABI system call definitions and table. We're going to need these for next code I'm going to send out for review: support for poll() and kqueue() on CloudABI. Modified: head/sys/compat/cloudabi64/cloudabi64_poll.c head/sys/compat/cloudabi64/syscalls.master head/sys/contrib/cloudabi/syscalldefs_md.h head/sys/contrib/cloudabi/syscalldefs_mi.h Modified: head/sys/compat/cloudabi64/cloudabi64_poll.c ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_poll.c Wed Aug 5 12:53:55 2015 (r286317) +++ head/sys/compat/cloudabi64/cloudabi64_poll.c Wed Aug 5 13:09:46 2015 (r286318) @@ -36,3 +36,12 @@ cloudabi64_sys_poll(struct thread *td, s /* Not implemented. */ return (ENOSYS); } + +int +cloudabi64_sys_poll_fd(struct thread *td, + struct cloudabi64_sys_poll_fd_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} Modified: head/sys/compat/cloudabi64/syscalls.master ============================================================================== --- head/sys/compat/cloudabi64/syscalls.master Wed Aug 5 12:53:55 2015 (r286317) +++ head/sys/compat/cloudabi64/syscalls.master Wed Aug 5 13:09:46 2015 (r286318) @@ -157,11 +157,9 @@ void * addr, size_t len); } 39 AUE_NULL STD { cloudabi64_size_t cloudabi64_sys_poll( \ - cloudabi_fd_t fd, \ const cloudabi64_subscription_t *in, \ - cloudabi64_size_t nin, \ cloudabi64_event_t *out, \ - cloudabi64_size_t nout); } + cloudabi64_size_t nevents); } 40 AUE_NULL STD { void cloudabi_sys_proc_exec( \ cloudabi_fd_t fd, const void *data, \ @@ -212,3 +210,11 @@ cloudabi_mflags_t scope); } 55 AUE_NULL STD { void cloudabi_sys_thread_tcb_set(void *tcb); } 56 AUE_NULL STD { void cloudabi_sys_thread_yield(); } + +57 AUE_NULL STD { cloudabi64_size_t cloudabi64_sys_poll_fd( \ + cloudabi_fd_t fd, \ + const cloudabi64_subscription_t *in, \ + cloudabi64_size_t nin, \ + cloudabi64_event_t *out, \ + cloudabi64_size_t nout, \ + const cloudabi64_subscription_t *timeout); } Modified: head/sys/contrib/cloudabi/syscalldefs_md.h ============================================================================== --- head/sys/contrib/cloudabi/syscalldefs_md.h Wed Aug 5 12:53:55 2015 (r286317) +++ head/sys/contrib/cloudabi/syscalldefs_md.h Wed Aug 5 13:09:46 2015 (r286318) @@ -186,6 +186,7 @@ typedef struct { MEMBER(cloudabi_clockid_t) clock_id; MEMBER(cloudabi_timestamp_t) timeout; MEMBER(cloudabi_timestamp_t) precision; + MEMBER(uint16_t) flags; } clock; // CLOUDABI_EVENTTYPE_CONDVAR: Release a lock and wait on a @@ -202,6 +203,7 @@ typedef struct { // called without blocking. struct { MEMBER(cloudabi_fd_t) fd; + MEMBER(uint16_t) flags; } fd_readwrite; // CLOUDABI_EVENT_LOCK_RDLOCK and CLOUDABI_EVENT_LOCK_WRLOCK: Wait @@ -224,15 +226,17 @@ ASSERT_OFFSET(subscription_t, clock.iden ASSERT_OFFSET(subscription_t, clock.clock_id, 24, 24); ASSERT_OFFSET(subscription_t, clock.timeout, 32, 32); ASSERT_OFFSET(subscription_t, clock.precision, 40, 40); +ASSERT_OFFSET(subscription_t, clock.flags, 48, 48); ASSERT_OFFSET(subscription_t, condvar.condvar, 16, 16); ASSERT_OFFSET(subscription_t, condvar.lock, 20, 24); ASSERT_OFFSET(subscription_t, condvar.condvar_scope, 24, 32); ASSERT_OFFSET(subscription_t, condvar.lock_scope, 25, 33); ASSERT_OFFSET(subscription_t, fd_readwrite.fd, 16, 16); +ASSERT_OFFSET(subscription_t, fd_readwrite.flags, 20, 20); ASSERT_OFFSET(subscription_t, lock.lock, 16, 16); ASSERT_OFFSET(subscription_t, lock.lock_scope, 20, 24); ASSERT_OFFSET(subscription_t, proc_terminate.fd, 16, 16); -ASSERT_SIZE(subscription_t, 48, 48); +ASSERT_SIZE(subscription_t, 56, 56); typedef struct { MEMBER(PTR(IDENT(threadentry_t))) entry_point; // Entry point. Modified: head/sys/contrib/cloudabi/syscalldefs_mi.h ============================================================================== --- head/sys/contrib/cloudabi/syscalldefs_mi.h Wed Aug 5 12:53:55 2015 (r286317) +++ head/sys/contrib/cloudabi/syscalldefs_mi.h Wed Aug 5 13:09:46 2015 (r286318) @@ -204,9 +204,6 @@ #define CLOUDABI_O_EXCL 0x4 #define CLOUDABI_O_TRUNC 0x8 -// File descriptor passed to poll() to poll just once. -#define CLOUDABI_POLL_ONCE 0xffffffff - // File descriptor returned to pdfork()'s child process. #define CLOUDABI_PROCESS_CHILD 0xffffffff @@ -326,6 +323,12 @@ #define CLOUDABI_SUBSCRIPTION_ENABLE 0x10 #define CLOUDABI_SUBSCRIPTION_ONESHOT 0x20 +// cloudabi_subscription_t::clock.flags. +#define CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME 0x1 + +// cloudabi_subscription_t::fd_readwrite.flags. +#define CLOUDABI_SUBSCRIPTION_FD_READWRITE_POLL 0x1 + // unlinkat(). #define CLOUDABI_UNLINK_REMOVEDIR 0x1
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508051309.t75D9lhi025549>