X-Git-Url: https://rtime.felk.cvut.cz/gitweb/frescor/frsh.git/blobdiff_plain/c73ff50690752e3f45746841f2921eeb197381c0..9483d1c9372f42d39af18b6615ea13052a5702ed:/fres/resalloc/fra_generic.h diff --git a/fres/resalloc/fra_generic.h b/fres/resalloc/fra_generic.h index 415193e..4c58b19 100644 --- a/fres/resalloc/fra_generic.h +++ b/fres/resalloc/fra_generic.h @@ -117,7 +117,7 @@ struct fres_allocator { * fres_vres::new. * * @param vres VRES to create. - * @param priv + * @param priv User supplied pointer registered by fra_register() * * @return Zero in case of success, nonzero error code on error. */ @@ -132,14 +132,26 @@ struct fres_allocator { * the return of this function. * * @param vres VRES to change. - * @param priv + * @param priv User supplied pointer registered by fra_register() * * @return Zero in case of success, nonzero error code on error. */ int (*change_vres)(fres_vres_t *vres, void *priv); + /** + * Cancel the CRES + * + * @param cancel_vres VRES to cancel + * + * @return Zero on succaess, non-zero error code on error. + */ + int (*cancel_vres)(fres_vres_t *vres, void *priv); /*@}*/ + /** @name Full interface - * The allocator can influence the order of applying changes. */ + * + * Full interface provides a way for the allocator to + * influence the order of applying changes. + */ /*@{*/ /** * A more general (and more compilcated) allocator @@ -154,7 +166,8 @@ struct fres_allocator { * fres_vres::perceived to @a fres_vres::new at some point in * time (depending on the kind of the change) as the * fres_vres::allocated parameters will be freed after the - * return of this function. + * return of this function. When the fres_vres::new contains + * no blocks, the VRES should be canceled. * * @param vreses Array of pointers to VRESes. * @param length The number of elements in @a vreses. @@ -165,14 +178,6 @@ struct fres_allocator { int (*apply_vres_changes)(fres_vres_t *vreses[], unsigned length, void *priv); /*@}*/ - /** - * - * - * @param cancel_vres - * - * @return - */ - int (*cancel_vres)(fres_vres_t *vres, void *priv); void *priv; /**< Pointer to allocator's private data */ /**