New param hashing spec

- When listing all params, lead with _HASH_CHECK value for cache load
 - When set value on _HASH_CHECK is rx'd, stop any ongoing listing req
This commit is contained in:
Nate Weibley
2016-02-15 18:07:37 -05:00
committed by Lorenz Meier
parent 854660bd36
commit 0419a99f00
3 changed files with 43 additions and 4 deletions
+1 -1
View File
@@ -1121,7 +1121,7 @@ uint32_t param_hash_check(void)
const char *name = param_name(param);
const void *val = param_get_value_ptr(param);
param_hash = crc32part((const uint8_t *)name, strlen(name), param_hash);
param_hash = crc32part(val, sizeof(union param_value_u), param_hash);
param_hash = crc32part(val, param_size(param), param_hash);
}
param_unlock();
+5
View File
@@ -82,6 +82,11 @@ typedef uintptr_t param_t;
*/
#define PARAM_INVALID ((uintptr_t)0xffffffff)
/**
* Magic handle for hash check param
*/
#define PARAM_HASH ((uintptr_t)INT32_MAX)
/**
* Look up a parameter by name.
*