On 20/09/17 21:26, Volodymyr Babchuk wrote:
On 20.09.17 23:02, Julien Grall wrote:
On 20/09/2017 19:11, Volodymyr Babchuk wrote:
On 20.09.17 20:21, Julien Grall wrote:
On 19/09/17 22:44, Volodymyr Babchuk wrote:
Hi Julien,
Hi Volodymyr,
On 13.09.17 14:11, Julien Grall wrote:
Hi,
On 08/31/2017 09:09 PM, Volodymyr Babchuk wrote:
+static void fill_uuid(struct cpu_user_regs *regs, const xen_uuid_t
*u)
Actually why do you pass a pointer for u? This requires every caller
to introduce temporary variable because the UUID is usually a define.
Hmm, another way probably is to pass a whole structure as a parameter.
Are you suggesting this approach? Something like
fill_uuid(regs, (xen_uuid_t)MY_UUID)?
Something list that. But why do you need the cast? MY_UUID is supposed
to be a xen_uuid_t. No?
It have no type. It is just an initializer list like {1,2,3,4,5,6}. If
you remember that thread, there is a requirement to make public headers
compatible with c89. So I can't define MY_UUID as (xen_uuid_t){1,2,3}.
Instead it is defined as a plain initializer list.
In that case why don't introduce a version for non-strict ansi? This
would introduce a bit of safety and avoid cast a bit unexplained. (see
how __DECL_REG(...,...) is done in include/public/asm-arm.h?
I believe you meant arch-arm.h.
Just to be clear, you are proposing to introduce one
#define XEN_DEFINE_UUID in a public header, and another one in a private
header?
No the two in the public header. One version for strict-ansi compiler,
the other for gcc-compatible one.
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel