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

Re: [Xen-devel] [PATCH v3 1/5] xentrace: Common Support for get_pg_owner/put_pg_owner on ARM and x86

>>> Ben Sanda <Ben.Sanda@xxxxxxxxxxxxxxx> 04/14/16 10:03 PM >>>
>>> +void put_pg_owner(struct domain *pg_owner) {
>>> +    rcu_unlock_domain(pg_owner);
>>> +}
> I cannot see why this then can't just become an inline function.
>I investigated this but making put_pg_owner() static inline creates a
>circular dependency on rcu_unlock_domain(), which is also a static
>inline function. The two functions are in different header files and
>this creates a dependency on the one header being included by the
>other, which, depending on how C files include them, creates an
>implicit definition error by the compiler. For now I will leave the
>function as is.

While generally macros are undesirable in place of inline functions,
with the type checking aspect not being relevant here (both functions
have identically typed parameters), using a #define here instead of an
out of line call to a function which does nothing other than adjust the
preempt count seems warranted if the include dependency can't be
addressed in a satisfactory manner.


Xen-devel mailing list



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