Date: Wed, 22 Jul 2015 10:04:54 +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: r285790 - in head/sys: compat/cloudabi64 contrib/cloudabi Message-ID: <201507221004.t6MA4sqv070871@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ed Date: Wed Jul 22 10:04:53 2015 New Revision: 285790 URL: https://svnweb.freebsd.org/changeset/base/285790 Log: Import upstream changes to the system call definitions. Support has been added for providing the scope of a futex operation, whether the futex is local to the process or shared between processes. Modified: 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/syscalls.master ============================================================================== --- head/sys/compat/cloudabi64/syscalls.master Wed Jul 22 09:46:22 2015 (r285789) +++ head/sys/compat/cloudabi64/syscalls.master Wed Jul 22 10:04:53 2015 (r285790) @@ -21,6 +21,7 @@ 2 AUE_NULL STD { void cloudabi_sys_condvar_signal( \ cloudabi_condvar_t *condvar, \ + cloudabi_futexscope_t scope, \ cloudabi_nthreads_t nwaiters); } 3 AUE_NULL STD { void cloudabi_sys_fd_close( \ @@ -130,7 +131,8 @@ cloudabi_ulflags_t flag); } 31 AUE_NULL STD { void cloudabi_sys_lock_unlock( \ - cloudabi_lock_t *lock); } + cloudabi_lock_t *lock, \ + cloudabi_futexscope_t scope); } 32 AUE_NULL STD { void cloudabi_sys_mem_advise( \ void *addr, size_t len, \ @@ -206,6 +208,7 @@ 53 AUE_NULL STD { cloudabi_tid_t cloudabi64_sys_thread_create( \ cloudabi64_threadattr_t *attr); } 54 AUE_NULL STD { void cloudabi_sys_thread_exit( \ - cloudabi_lock_t *lock); } + cloudabi_lock_t *lock, \ + cloudabi_futexscope_t scope); } 55 AUE_NULL STD { void cloudabi_sys_thread_tcb_set(void *tcb); } 56 AUE_NULL STD { void cloudabi_sys_thread_yield(); } Modified: head/sys/contrib/cloudabi/syscalldefs_md.h ============================================================================== --- head/sys/contrib/cloudabi/syscalldefs_md.h Wed Jul 22 09:46:22 2015 (r285789) +++ head/sys/contrib/cloudabi/syscalldefs_md.h Wed Jul 22 10:04:53 2015 (r285790) @@ -193,6 +193,8 @@ typedef struct { struct { MEMBER(PTR(_Atomic(cloudabi_condvar_t))) condvar; MEMBER(PTR(_Atomic(cloudabi_lock_t))) lock; + MEMBER(cloudabi_futexscope_t) condvar_scope; + MEMBER(cloudabi_futexscope_t) lock_scope; } condvar; // CLOUDABI_EVENTTYPE_FD_READ and CLOUDABI_EVENTTYPE_FD_WRITE: @@ -206,6 +208,7 @@ typedef struct { // and acquire a read or write lock. struct { MEMBER(PTR(_Atomic(cloudabi_lock_t))) lock; + MEMBER(cloudabi_futexscope_t) lock_scope; } lock; // CLOUDABI_EVENTTYPE_PROC_TERMINATE: Wait for a process to terminate. @@ -223,8 +226,11 @@ ASSERT_OFFSET(subscription_t, clock.time ASSERT_OFFSET(subscription_t, clock.precision, 40, 40); 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, 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); Modified: head/sys/contrib/cloudabi/syscalldefs_mi.h ============================================================================== --- head/sys/contrib/cloudabi/syscalldefs_mi.h Wed Jul 22 09:46:22 2015 (r285789) +++ head/sys/contrib/cloudabi/syscalldefs_mi.h Wed Jul 22 10:04:53 2015 (r285790) @@ -189,6 +189,10 @@ #define CLOUDABI_FILETYPE_SOCKET_STREAM 0x82 #define CLOUDABI_FILETYPE_SYMBOLIC_LINK 0x90 +// Futex object scopes. +#define CLOUDABI_FUTEXSCOPE_GLOBAL 1 +#define CLOUDABI_FUTEXSCOPE_PROCESS_LOCAL 2 + // Read-write lock related constants. #define CLOUDABI_LOCK_UNLOCKED 0 // Lock is unlocked. #define CLOUDABI_LOCK_WRLOCKED 0x40000000 // Lock is write locked. @@ -350,6 +354,7 @@ typedef int64_t cloudabi_filedelta_t; typedef uint64_t cloudabi_filesize_t; // ftruncate(), struct stat::st_size. typedef uint8_t cloudabi_filetype_t; // struct stat::st_mode. typedef uint16_t cloudabi_fsflags_t; // file_stat_put(). +typedef uint8_t cloudabi_futexscope_t; // Scope of lock or condition variable. typedef uint64_t cloudabi_inode_t; // struct stat::st_ino. typedef uint32_t cloudabi_linkcount_t; // struct stat::st_nlink. typedef uint32_t cloudabi_lock_t; // pthread_{mutex,rwlock}_*().
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507221004.t6MA4sqv070871>