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

Re: [Xen-devel] [PATCH v2] xen: Add acpu_sleep=s3_fake command-line option for testing



>>> On 22.05.18 at 15:48, <george.dunlap@xxxxxxxxxx> wrote:
> On 05/22/2018 02:40 PM, Jan Beulich wrote:
>>>>> On 22.05.18 at 15:35, <george.dunlap@xxxxxxxxxx> wrote:
>>> --- a/xen/arch/x86/acpi/power.c
>>> +++ b/xen/arch/x86/acpi/power.c
>>> @@ -33,6 +33,8 @@
>>>  
>>>  uint32_t system_reset_counter = 1;
>>>  
>>> +static bool __read_mostly opt_fake_s3 = false;
>> 
>> With the typo in the title (wants to be acpi_sleep) corrected 
> 
> Oops -- I can fix this on check-in (once the development window opens).
> 
>> and
>> preferably with the pointless initializer here dropped
> 
> Are global variables in C automatically initialized?  That's new to me
> -- under what circumstances, and since when?

Yes, they are (albeit you mean "file scope" instead of "global" here):

"A declaration of an identifier for an object that has file scope without an
 initializer, and without a storage-class specifier or with the storage-class
 specifier static, constitutes a tentative definition. If a translation unit
 contains one or more tentative definitions for an identifier, and the
 translation unit contains no external definition for that identifier, then the
 behavior is exactly as if the translation unit contains a file scope
 declaration of that identifier, with the composite type as of the end of the
 translation unit, with an initializer equal to 0."

As to since when - forever, I would say. I don't have a K&R book to hand
though to see whether it was that way back then already.

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®.