]> rtime.felk.cvut.cz Git - frescor/frsh.git/commitdiff
Changed resource type and id of dummy resource
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 27 Nov 2008 11:38:39 +0000 (12:38 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 27 Nov 2008 11:38:39 +0000 (12:38 +0100)
This is necessary to avoid collision with the real CPU resource.

frsh_api/tests/negotiation.c
resources/dummy/res_dummy.h

index 7ba9dc621de34eed3462bc58db597b4d2d01e027..d670f0cc9a5faf0e9da3ed9ee179134efc77a4cc 100644 (file)
@@ -1,5 +1,6 @@
 #include <frsh.h>
 #include <error.h>
+#include <res_dummy.h>
 
 #define N 3
 
@@ -22,6 +23,12 @@ int main(int argc, char *argv[])
                ret = frsh_contract_init(&contract[i]);
                if (ret) PERROR_AND_EXIT(ret, "frsh_contract_init");
 
+               ret = frsh_contract_set_resource_and_label(
+                       &contract[i],
+                       DUMMY_RESOURCE_TYPE, DUMMY_RESOURCE_ID,
+                       NULL);
+               if (ret) PERROR_AND_EXIT(ret, "frsh_contract_set_resource_and_label");
+
                budget = fosa_msec_to_rel_time(b[i]);
                period = fosa_msec_to_rel_time(100);
                period = fosa_msec_to_rel_time(50);
index ecbc2ece9ac3f3cc7964c6070095182d967d80b9..708b14b801a27500ec7ff1da912e04a654ccd5f7 100644 (file)
@@ -7,8 +7,8 @@
 #include <fres_contract.h>
 #include <fres_container.h>
 
-#define DUMMY_RESOURCE_TYPE FRSH_RT_PROCESSOR
-#define DUMMY_RESOURCE_ID   0
+#define DUMMY_RESOURCE_TYPE 255
+#define DUMMY_RESOURCE_ID   255
 
 int fra_dummy_init(forb_orb orb, fres_contract_broker fcb, forb_executor_t *executor);
 int fres_block_register_dummy(void);