pcp
[Top] [All Lists]

Tighten up the __pmDiscoverServicesWithOptions() Interface

To: PCP Mailing List <pcp@xxxxxxxxxxx>
Subject: Tighten up the __pmDiscoverServicesWithOptions() Interface
From: Dave Brolley <brolley@xxxxxxxxxx>
Date: Fri, 18 Jul 2014 12:43:34 -0400
Delivered-to: pcp@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0
This commit tightens up the declaration of the 'flags' pointer to be 'const volatile unsigned *' so that __pmDiscoverServicesWithOptions() code cannot write to the referenced memory, without the compiler complaining. It also tells the compiler that the value of the referenced memory can change at any time. This is a backward compatible change which does not affect existing callers.

Dave

commit 80ab04bcc51e89c9e0481a60fe292395aac7bffa
Author: Dave Brolley <brolley@xxxxxxxxxx>
Date:   Thu Jul 17 14:53:23 2014 -0400

Enforce properties of 'flags' parameter to __pmDiscoverServicesWithOptions().

    This parameter is now declared: const volatile unsigned *flags

    This enforces the requirement that __pmDiscoveryServicesWithOptions()
    must not write the the memory referenced by this pointer, since
    there is no knowledge of whether this memory requires synchronous
    access protection.

    It also enforces the semantics that the contents of the memory can
    change at any time; specifically the 'interrupted' bit.

<Prev in Thread] Current Thread [Next in Thread>
  • Tighten up the __pmDiscoverServicesWithOptions() Interface, Dave Brolley <=