qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 12/19] linux-user: Setup split syscall infras


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v3 12/19] linux-user: Setup split syscall infrastructure
Date: Fri, 22 Jun 2018 10:32:36 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 06/22/2018 03:30 AM, Peter Maydell wrote:
>> +struct SyscallDef {
>> +    const char *name;
>> +    SyscallArgsFn *args;
>> +    SyscallImplFn *impl;
>> +    SyscallPrintFn *print;
>> +    SyscallPrintRetFn *print_ret;
> 
> Are all these hook functions mandatory, or can a syscall
> implementation leave some of them NULL for a default behaviour?

Only impl is mandatory.  You're right that there should be more doco here at
the structure definition.  Here, the docs got split down to the macros that
define the most common forms of the structures.  Will fix.


>>  static void
>>  print_flags(const struct flags *f, abi_long flags, int last)
>>  {
>> -    const char *sep = "";
>> -    int n;
>> +    char buf[256];
>> +    add_flags(buf, sizeof(buf), f, flags, false);
>> +    gemu_log("%s%s", buf, get_comma(last));
>> +}
> 
> All this refactoring of the strace functions feels like it
> should have been in a separate patch...

Fair.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]