>>> Ben Sanda <ben.sa...@dornerworks.com> 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.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to