13
edits
(Remove masks, key callbacks on {cb,ctx}, remove callback repetition.) |
|||
Line 96: | Line 96: | ||
* cb: Callback function pointer. | * cb: Callback function pointer. | ||
* ctx: Opaque application data, passed to cb(). | * ctx: Opaque application data, passed to cb(). | ||
* | |||
* Output: | |||
* ret: If true, failure due to OOM; success otherwise. | |||
*/ | */ | ||
bool reserve_cb_register(reserve_cb_t *cb, void *ctx); | |||
/* | /* | ||
Line 105: | Line 108: | ||
* cb: Callback function pointer. | * cb: Callback function pointer. | ||
* ctx: Opaque application data, same as that passed to reserve_cb_register(). | * ctx: Opaque application data, same as that passed to reserve_cb_register(). | ||
* | |||
* Output: | |||
* ret: False upon success, true if the {cb,ctx} registration could not be | |||
* found. | |||
*/ | */ | ||
bool reserve_cb_unregister(reserve_cb_t *cb, void *ctx); | |||
/* | /* | ||
Line 126: | Line 133: | ||
* Set the minimum acceptable reserve size. | * Set the minimum acceptable reserve size. | ||
* | * | ||
* min: Reserve threshold. | * min: Reserve threshold. This value may be internally rounded up. | ||
* ret: False if the reserve was successfully resized; true otherwise. Note | * ret: False if the reserve was successfully resized; true otherwise. Note | ||
* that failure to resize the reserve also results in a RESERVE_CND_LOW | * that failure to resize the reserve also results in a RESERVE_CND_LOW |
edits