Date: Mon, 23 Nov 2020 00:58:15 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367943 - in head/sys: compat/freebsd32 kern Message-ID: <202011230058.0AN0wFU8092034@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Mon Nov 23 00:58:14 2020 New Revision: 367943 URL: https://svnweb.freebsd.org/changeset/base/367943 Log: freebsd32: take the _umtx_op struct definitions back Providing these in freebsd32.h facilitates local testing/measuring of the structs rather than forcing one to locally recreate them. Sanity checking offsets/sizes remains in kern_umtx.c where these are typically used. Modified: head/sys/compat/freebsd32/freebsd32.h head/sys/kern/kern_umtx.c Modified: head/sys/compat/freebsd32/freebsd32.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32.h Mon Nov 23 00:33:06 2020 (r367942) +++ head/sys/compat/freebsd32/freebsd32.h Mon Nov 23 00:58:14 2020 (r367943) @@ -94,6 +94,27 @@ struct itimerval32 { struct timeval32 it_value; }; +struct umtx_time32 { + struct timespec32 _timeout; + uint32_t _flags; + uint32_t _clockid; +}; + +struct umtx_robust_lists_params_compat32 { + uint32_t robust_list_offset; + uint32_t robust_priv_list_offset; + uint32_t robust_inact_offset; +}; + +struct umutex32 { + volatile __lwpid_t m_owner; /* Owner of the mutex */ + __uint32_t m_flags; /* Flags of the mutex */ + __uint32_t m_ceilings[2]; /* Priority protect ceiling */ + __uint32_t m_rb_lnk; /* Robust linkage */ + __uint32_t m_pad; + __uint32_t m_spare[2]; +}; + #define FREEBSD4_MFSNAMELEN 16 #define FREEBSD4_MNAMELEN (88 - 2 * sizeof(int32_t)) Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Mon Nov 23 00:33:06 2020 (r367942) +++ head/sys/kern/kern_umtx.c Mon Nov 23 00:58:14 2020 (r367943) @@ -232,27 +232,6 @@ struct umtx_copyops { const bool compat32; }; -struct umtx_time32 { - struct timespec32 _timeout; - uint32_t _flags; - uint32_t _clockid; -}; - -struct umtx_robust_lists_params_compat32 { - uint32_t robust_list_offset; - uint32_t robust_priv_list_offset; - uint32_t robust_inact_offset; -}; - -struct umutex32 { - volatile __lwpid_t m_owner; /* Owner of the mutex */ - __uint32_t m_flags; /* Flags of the mutex */ - __uint32_t m_ceilings[2]; /* Priority protect ceiling */ - __uint32_t m_rb_lnk; /* Robust linkage */ - __uint32_t m_pad; - __uint32_t m_spare[2]; -}; - _Static_assert(sizeof(struct umutex) == sizeof(struct umutex32), "umutex32"); _Static_assert(__offsetof(struct umutex, m_spare[0]) == __offsetof(struct umutex32, m_spare[0]), "m_spare32");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011230058.0AN0wFU8092034>