]> rtime.felk.cvut.cz Git - frescor/fosa.git/commitdiff
get appsched was wrong, changes in test fosa ads
authorsangorrin <sangorrin@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Thu, 14 Jun 2007 09:31:02 +0000 (09:31 +0000)
committersangorrin <sangorrin@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Thu, 14 Jun 2007 09:31:02 +0000 (09:31 +0000)
git-svn-id: http://www.frescor.org/private/svn/frescor/fosa/trunk@474 35b4ef3e-fd22-0410-ab77-dab3279adceb

src_marte/fosa_app_def_sched.c
src_marte/test_fosa_ads.c

index 2d5d37a75a9bfd8893f0fa71ca31fc2ad183d15d..9c8ccb5b781e7b0c39c0b457358f9ddd572ccf2b 100644 (file)
@@ -682,7 +682,8 @@ int fosa_ads_get_appscheduled
   if (error_code!=0) {
     return error_code;
   } else {
-    return policy==SCHED_APP;
+     *appscheduled = (policy==SCHED_APP);
+     return 0;
   }
 }
 
index ded89f23cb6d450c0db1e528989b9496e46a9506..d55b7566a23ec706e45a028626379389fb2deaa0 100644 (file)
@@ -302,26 +302,12 @@ int main () {
     printf("dettach thread 1, err=%d\n", err);
     assert(err == 0);
 
-    err = fosa_ads_set_appscheduled (tid2, false);
-    printf("dettach thread 2, err=%d\n", err);
-    assert(err == 0);
-
     err = fosa_ads_get_appscheduled (tid1, &is_appsched);
-    printf("thread 1 is dettached? %d, err=%d\n", is_appsched, err);
+    printf("thread 1 is dettached? %d, err=%d\n", !is_appsched, err);
     assert(err == 0);
 
     err = fosa_ads_get_appscheduled (tid2, &is_appsched);
-    printf("thread 2 is dettached? %d, err=%d\n", is_appsched, err);
-    assert(err == 0);
-
-    //////////////////////////////////////////////////////////////
-    //  2f) Cause errors by change sched params of dettached threads
-    //////////////////////////////////////////////////////////////
-    printf("--------------------------------------------------\n");
-    printf("2f) Cause errors by change sched params of dettached threads \n");
-
-    err = fosa_ads_set_appsched_params(tid2, (void *)&params, sizeof(params));
-    printf("urgency of thread 2 set to %d, err=%d\n", params.prio, err);
+    printf("thread 2 is dettached? %d, err=%d\n", !is_appsched, err);
     assert(err == 0);
 
     sleep(1000);