#include "frsh_resource.h"
-frsh_resource_t* frsh_resources[FRSH_RESOURCE_NUM+1];
-
-int frsh_resource_register(frsh_resource_type_t type, frsh_resource_t* resource)
-{
- if (frsh_resources[type]) {
- errno = EPERM;
- return (-errno);
- } else
- frsh_resources[type] = resource;
-
- return 0;
-}
-
-int frsh_resource_unregister(frsh_resource_type_t type)
-{
- frsh_resources[type] = NULL;
- return 0;
-}
+struct frsh_sched_ops* frsh_sched_ops[FRSH_RESOURCE_NUM+1] = {
+ NULL,
+ &frsh_aquosa_sched_ops,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
#include "frsh_err.h"
-struct frsh_contract_ops;
-
typedef enum {
- FRSH_DUMMY = 0,
- FRSH_CPU = 1,
- FRSH_MEMORY = 2,
- FRSH_DISK = 3,
+ FRSH_DUMMY = 0, /* reserved */
+ FRSH_CPU = 1, /* reserved */
+ FRSH_MEMORY = 2, /* reserved */
+ FRSH_DISK = 3, /* reserved */
FRSH_CAN = 4,
FRSH_WIFI = 5,
} frsh_resource_type_t;
-typedef struct frsh_resource {
- struct frsh_contract_ops *contract_ops;
- //Should call connect/disconnect from manager
- //int (*init)();
- //int (*del)
-} frsh_resource_t;
-
-int frsh_resource_register(frsh_resource_type_t type, frsh_resource_t* resource);
-int frsh_resource_unregister(frsh_resource_type_t type);
+typedef unsigned int frsh_vres_d_t;
#endif /* FRSH_RESOURCE_H */
*/
/* FRSH descriptor type */
-typedef unsigned int frsh_vres_d_t;
+//typedef unsigned int frsh_vres_d_t;
/*typedef struct frsh_vres_ops{
write;
--- /dev/null
+#include "frsh_scheduler.h"
+#include "qres_lib.h"
+
+int aquosa_sched_init()
+{
+ qos_rv rv;
+
+ if (qres_init() != QOS_OK) {
+ return -1;
+ }
+
+ /* register to DTM */
+ return 0
+}
+
+int aquosa_sched_exit()
+{
+ qos_rv rv;
+
+ rv = qres_cleanup();
+ return qos_rv_int(rv);
+}
+
+int aquosa_create_vres(contract_handle_t contract)
+{
+ // parse contract and create vres by calling
+ // qos_rv qres_create_server(qres_params_t *p_params,
+ // qres_sid_t *p_sid);
+
+}
+
+frsh_sched_ops aquosa_sched_ops = {
+ .init = aquosa_init();
+ .exit = aquosa_exit();
+ .create_vres = aquosa_create_vres();
+ .cancel_vres = aquosa_cancel_vres();
+ .change_vres = aquosa_change_vres();
+};
+
--- /dev/null
+#include "frsh_vres.h"
+
+