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.
This commit is contained in:
Kyle Evans 2020-11-23 00:58:14 +00:00
parent f96078b8fe
commit 60e60e73fd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=367943
2 changed files with 21 additions and 21 deletions

View File

@ -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))

View File

@ -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");