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

Re: [Xen-devel] [PATCH] Adjust number of domains in cpupools when destroying domain



>>> On 12.11.14 at 11:46, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 12/11/14 10:40, Juergen Gross wrote:
>> --- a/xen/common/cpupool.c
>> +++ b/xen/common/cpupool.c
>> @@ -225,6 +225,35 @@ static int cpupool_destroy(struct cpupool *c)
>>  }
>>  
>>  /*
>> + * Move domain to another cpupool
>> + */
>> +static int cpupool_move_domain_unlocked(struct domain *d, struct cpupool *c)
> 
> This isn't an unlocked function.  It is strictly called with the
> cpupool_lock held.  Per prevailing style, it should be named
> "__cpupool_move_domain()".

I generally disagree to this, even if this is the prevailing style.
Double-underscore prefixed names shouldn't be used at all in our
code, as they're being reserved by the C library standard (and
the compiler is free to introduce library calls named such). But
the question of course is valid why the function name says
"unlocked" when it's always being called with the lock held -
"locked" would seem more natural in this case. But in the end
JÃrgen is the maintainer of that code, so he decides.

Jan

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

 


Rackspace

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