On 06/10/2018 02:39 AM, Peter Maydell wrote:
> It would be cleaner to have a single
> #if something
> static foo_impl(..) { ... }
> static syscall_impl foo = {
>     .name = "foo",
>     .impl = foo_impl,
>     .strace_stuff = ...,
> };
> register_syscall(foo);
> #endif
> 
> Hash table?

It would be cleaner to have everything in one place, yes.  I just replied along
those lines elsewhere in the thread.

Indeed, now that I'm thinking along the lines of strace, I'm thinking that
there should be a separate argument extraction step that would be shared by
both strace and syscall implementation.

I'm not a fan of register_syscall(foo) and the startup costs that implies.

The set of syscalls that we support is fixed at compile time.  We should have a
compile-time generation step that builds everything that is required.  Whether
this is C emitting C, or python emitting C, I do not yet have an opinion.


r~

Reply via email to