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

Re: [Xen-devel] [PATCH v6 1/4] xen: introduce SYMBOL



>>> On 06.02.19 at 17:37, <ian.jackson@xxxxxxxxxx> wrote:
> Jan Beulich writes ("Re: [Xen-devel] [PATCH v6 1/4] xen: introduce SYMBOL"):
>> - it marks problem sites clearly (one of Stefano's goals),
>> - it isolates future changes to how exactly the comparisons
>>   are to be done to the comparison macro(s)
>> - it doesn't undermine type safety of the main (start-of-
>>   whatever) symbols (one of my goals),
>> - it allows the end-of-whatever symbols to also be handed to
>>   functions in a type-safe manner
> 
> Yes.  However...
> 
>>   (we could even have per-instance structure flavors, such that
>>   unrelated "end" symbols can't be mixed up; for example the type
>>   could simply be a structure wrapping a field of the original base
>>   type).
> 
> I think this would be difficult to achieve without writing a forbidden
> pointer comparison in the macro.  It could perhaps be achieved with
> typeof() if that is available in hypervisor code.

I'm afraid I don't understand - you want to cast to an integer
type anyway for doing the comparison.

As to typeof() - this being a compiler construct, it is available
whenever the compiler supports it. We certainly use it
elsewhere in hypervisor code.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.