[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for 6.2 33/49] bsd-user: Rewrite target system call defininti
From: |
Warner Losh |
Subject: |
Re: [PATCH for 6.2 33/49] bsd-user: Rewrite target system call definintion glue |
Date: |
Thu, 19 Aug 2021 19:10:12 -0600 |
> On Aug 10, 2021, at 9:18 AM, Richard Henderson <richard.henderson@linaro.org>
> wrote:
>
> On 8/7/21 11:42 AM, Warner Losh wrote:
>> From: Warner Losh <imp@FreeBSD.org>
>> Rewrite target definnitions to interface with the FreeBSD system calls.
>> This covers basic types (time_t, iovec, umtx_time, timespec, timeval,
>> rusage, rwusage) and basic defines (mmap, rusage). Also included are
>> FreeBSD version-specific variations.
>> Signed-off-by: Stacey Son <sson@FreeBSD.org>
>> Signed-off-by: Warner Losh <imp@bsdimp.com>
>> ---
>> bsd-user/bsd-mman.h | 121 --------------------
>> bsd-user/mmap.c | 2 -
>> bsd-user/syscall_defs.h | 247 ++++++++++++++++++++++++++--------------
>> 3 files changed, 162 insertions(+), 208 deletions(-)
>> delete mode 100644 bsd-user/bsd-mman.h
>
> Oof. Well, I guess it's progress, but it's hard to read.
I too find it… tricky… Once we have it all integrated and upstream matches our
fork, I’d be happy to do some cleanup in this area if you have good suggestions.
>> +struct target_freebsd_timeval {
>> + target_freebsd_time_t tv_sec; /* seconds */
>> + target_freebsd_suseconds_t tv_usec;/* and microseconds */
>> +#if !defined(TARGET_I386) && TARGET_ABI_BITS == 32
>> + abi_long _pad;
>> +#endif
>> +} __packed;
>
> I question the use of packed here. You do realize that removes all alignment
> requirements? This is probably not what you want. It's certainly not
> present in the real freebsd _timeval.h.
>
> Similarly with _timespec.h.
Yea, these are wrong. they used to be a thing, but as you point out, __packed
doesn’t do what people think it does… I’ll remove.
Warner
signature.asc
Description: Message signed with OpenPGP
- [PATCH for 6.2 28/49] bsd-user: Move stack initializtion into a per-os file., (continued)
- [PATCH for 6.2 28/49] bsd-user: Move stack initializtion into a per-os file., Warner Losh, 2021/08/07
- [PATCH for 6.2 30/49] bsd-user: elf cleanup, Warner Losh, 2021/08/07
- [PATCH for 6.2 31/49] bsd-user: Remove dead #ifdefs from elfload.c, Warner Losh, 2021/08/07
- [PATCH for 6.2 32/49] bsd-user: *BSD specific siginfo defintions, Warner Losh, 2021/08/07
- [PATCH for 6.2 33/49] bsd-user: Rewrite target system call definintion glue, Warner Losh, 2021/08/07
- [PATCH for 6.2 34/49] bsd-user: Fix initializtion of task state, Warner Losh, 2021/08/07
- [PATCH for 6.2 36/49] bsd-user: Make cpu_model and cpu_type visible to all of main.c, Warner Losh, 2021/08/07
- [PATCH for 6.2 35/49] bsd-user: remove error_init, Warner Losh, 2021/08/07
- [PATCH for 6.2 39/49] bsd-user: Need to reset CPU after creation., Warner Losh, 2021/08/07