return 0;
}
+int aqcpu_fra_activate(forb_orb orb)
+{
+ qos_rv qrv;
+ if ((qrv = qres_init()) != QOS_OK) {
+ if (qrv == QOS_E_MISSING_COMPONENT) {
+ return FRES_ERR_KERNEL_SUPPORT_MISSING;
+ } else
+ return FRSH_ERR_INTERNAL_ERROR;
+ }
+
+ /* install the cleanup function of th AQuoSA framework as an exit
+ * handler function (quite futile but, for now, it's sufficent) */
+ if (atexit(aqcpu_cleanup_wrapper))
+ return(FRSH_ERR_INTERNAL_ERROR);
+
+ aqcpu_initialized = 1;
+
+ return 0;
+}
+
static struct fres_allocator aqcpu_allocator = {
.res_type = FRSH_RT_PROCESSOR,
.res_id = 0, /* CPU ID 0 */
.get_desired_budget = fra_CPU_get_desired_budget,
.set_desired_budget = fra_CPU_set_desired_budget,
.get_actual_budget = fra_CPU_get_actual_budget,
+
+ .activate_callback = aqcpu_fra_activate,
.priv = NULL
};
*/
int aqcpu_fra_init(void)
{
- qos_rv qrv;
int rv;
- if ((qrv = qres_init()) != QOS_OK) {
- return -1;
- }
-
if ((rv = fra_register(&aqcpu_allocator))) {
qres_cleanup();
return rv;
}
- /* install the cleanup function of th AQuoSA framework as an exit
- * handler function (quite futile but, for now, it's sufficent) */
- if (atexit(aqcpu_cleanup_wrapper))
- return(FRSH_ERR_INTERNAL_ERROR);
-
- aqcpu_initialized = 1;
-
return 0;
}