Prevent resetprop function signature duplicate with libc

This commit is contained in:
topjohnwu
2017-05-30 23:34:39 +08:00
parent 14c5c60863
commit 17d3a87b1f
8 changed files with 156 additions and 932 deletions

View File

@@ -62,38 +62,38 @@ __BEGIN_DECLS
** Map the property area from the specified filename. This
** method is for testing only.
*/
int __system_property_set_filename(const char *filename);
int __system_property_set_filename2(const char *filename);
/*
** Initialize the area to be used to store properties. Can
** only be done by a single process that has write access to
** the property area.
*/
int __system_property_area_init();
int __system_property_area_init2();
/* Read the global serial number of the system properties
**
** Called to predict if a series of cached __system_property_find
** objects will have seen __system_property_serial values change.
** Called to predict if a series of cached __system_property_find2
** objects will have seen __system_property_serial2 values change.
** But also aids the converse, as changes in the global serial can
** also be used to predict if a failed __system_property_find
** also be used to predict if a failed __system_property_find2
** could in-turn now find a new object; thus preventing the
** cycles of effort to poll __system_property_find.
** cycles of effort to poll __system_property_find2.
**
** Typically called at beginning of a cache cycle to signal if _any_ possible
** changes have occurred since last. If there is, one may check each individual
** __system_property_serial to confirm dirty, or __system_property_find
** to check if the property now exists. If a call to __system_property_add
** or __system_property_update has completed between two calls to
** __system_property_area_serial then the second call will return a larger
** __system_property_serial2 to confirm dirty, or __system_property_find2
** to check if the property now exists. If a call to __system_property_add2
** or __system_property_update2 has completed between two calls to
** __system_property_area_serial2 then the second call will return a larger
** value than the first call. Beware of race conditions as changes to the
** properties are not atomic, the main value of this call is to determine
** whether the expensive __system_property_find is worth retrying to see if
** whether the expensive __system_property_find2 is worth retrying to see if
** a property now exists.
**
** Returns the serial number on success, -1 on error.
*/
uint32_t __system_property_area_serial();
uint32_t __system_property_area_serial2();
/* Add a new system property. Can only be done by a single
** process that has write access to the property area, and
@@ -103,7 +103,7 @@ uint32_t __system_property_area_serial();
**
** Returns 0 on success, -1 if the property area is full.
*/
int __system_property_add(const char *name, unsigned int namelen, const char *value, unsigned int valuelen);
int __system_property_add2(const char *name, unsigned int namelen, const char *value, unsigned int valuelen);
/* Delete a new system property. Added in resetprop
**
@@ -112,21 +112,21 @@ int __system_property_add(const char *name, unsigned int namelen, const char *va
int __system_property_del(const char *name);
/* Update the value of a system property returned by
** __system_property_find. Can only be done by a single process
** __system_property_find2. Can only be done by a single process
** that has write access to the property area, and that process
** must handle sequencing to ensure that only one property is
** updated at a time.
**
** Returns 0 on success, -1 if the parameters are incorrect.
*/
int __system_property_update(prop_info *pi, const char *value, unsigned int len);
int __system_property_update2(prop_info *pi, const char *value, unsigned int len);
/* Read the serial number of a system property returned by
** __system_property_find.
** __system_property_find2.
**
** Returns the serial number on success, -1 on error.
*/
uint32_t __system_property_serial(const prop_info* pi);
uint32_t __system_property_serial2(const prop_info* pi);
/* Initialize the system properties area in read only mode.
* Should be done by all processes that need to read system
@@ -134,10 +134,10 @@ uint32_t __system_property_serial(const prop_info* pi);
*
* Returns 0 on success, -1 otherwise.
*/
int __system_properties_init();
int __system_properties_init2();
/* Deprecated: use __system_property_wait instead. */
uint32_t __system_property_wait_any(uint32_t old_serial);
/* Deprecated: use __system_property_wait2 instead. */
uint32_t __system_property_wait_any2(uint32_t old_serial);
__END_DECLS