[pok-devel] [48] * Correction of the Next_Activation time after a call by a thread/ process to periodic wait (ie.

[ Thread Index | Date Index | More lists.tuxfamily.org/pok-devel Archives ]


Revision: 48
Author:   jaouen
Date:     2014-02-19 20:21:05 +0100 (Wed, 19 Feb 2014)
Log Message:
-----------
* Correction of the Next_Activation time after a call by a thread/process to periodic wait (ie. wait until next period)
* Correction of the toolchain. The path of 'ar' binary was hard-coded
* Correction of model.aadl from arinc653-queueing example

Note : I saw some other examples which was incorrect with regard to the dimensioning of Major_Frame duration, 
       Partition_Slots (aka. Partition Windows in ARINC653) and period duration of threads/processes.
       Here is some advices from my experience of ARINC653 :
	- The accumulation of Partition_Slots must be equal to the Major_Frame duration
	- Threads/processes period are divisor of the Major_Frame duration
	- POK threads are strictly periodic (as far as I know...). Thus, a Partition Slot 
	  must be defined for each thread/process's job (ie. each period). Therefore, each job should be scheduled.

Modified Paths:
--------------
    trunk/examples/arinc653-queueing/model.aadl
    trunk/kernel/core/sched.c
    trunk/misc/conf-env.pl
    trunk/misc/mk/rules-common.mk
    trunk/misc/mk/rules-partition.mk

Modified: trunk/examples/arinc653-queueing/model.aadl
===================================================================
--- trunk/examples/arinc653-queueing/model.aadl	2013-08-02 11:57:52 UTC (rev 47)
+++ trunk/examples/arinc653-queueing/model.aadl	2014-02-19 19:21:05 UTC (rev 48)
@@ -96,7 +96,7 @@
    partition_common : virtual processor partition.common;
 properties
    ARINC653::Module_Major_Frame => 1000ms;
-   ARINC653::Partition_Slots => (1000ms, 1000ms);
+   ARINC653::Partition_Slots => (500ms, 500ms);
    ARINC653::Slots_Allocation => ( reference (partition_secure), reference (partition_common));
 end ppc.impl;
 

Modified: trunk/kernel/core/sched.c
===================================================================
--- trunk/kernel/core/sched.c	2013-08-02 11:57:52 UTC (rev 47)
+++ trunk/kernel/core/sched.c	2014-02-19 19:21:05 UTC (rev 48)
@@ -203,7 +203,7 @@
      {
        thread->state = POK_STATE_RUNNABLE;
        thread->remaining_time_capacity =  thread->time_capacity;
-       thread->next_activation = thread->period + POK_GETTICK();
+       thread->next_activation = thread->next_activation + thread->period; 
      }
    }
 

Modified: trunk/misc/conf-env.pl
===================================================================
--- trunk/misc/conf-env.pl	2013-08-02 11:57:52 UTC (rev 47)
+++ trunk/misc/conf-env.pl	2014-02-19 19:21:05 UTC (rev 48)
@@ -108,7 +108,6 @@
 
 my %tools_flags =
 (
- "AR" =>  ["rcs"],
  "RM" =>  ["-r", "-f"],
  );
 

Modified: trunk/misc/mk/rules-common.mk
===================================================================
--- trunk/misc/mk/rules-common.mk	2013-08-02 11:57:52 UTC (rev 47)
+++ trunk/misc/mk/rules-common.mk	2014-02-19 19:21:05 UTC (rev 48)
@@ -30,7 +30,7 @@
 
 %.a: $(LO_DEPS)
 	$(ECHO) $(ECHO_FLAGS) $(ECHO_FLAGS_ONELINE) "[AR] $@ "
-	$(AR) $@ $(LO_DEPS)
+	$(AR) rcs $@ $(LO_DEPS)
 	if test $$? -eq 0; then $(ECHO) $(ECHO_FLAGS) $(ECHO_GREEN) " OK "; else $(ECHO) $(ECHO_FLAGS) $(ECHO_RED) " KO"; fi
 
 %.o: %.S

Modified: trunk/misc/mk/rules-partition.mk
===================================================================
--- trunk/misc/mk/rules-partition.mk	2013-08-02 11:57:52 UTC (rev 47)
+++ trunk/misc/mk/rules-partition.mk	2014-02-19 19:21:05 UTC (rev 48)
@@ -17,8 +17,8 @@
 	$(CD) $(POK_PATH)/libpok && $(MAKE) distclean all
 	$(CP) $(POK_PATH)/libpok/libpok.a `pwd`/
 	$(ECHO) $(ECHO_FLAGS) $(ECHO_FLAGS_ONELINE) "[AR] libpart.a "
-	/bin/ar -x libpok.a
-	/bin/ar -csr libpart.a $(OBJS) *.lo
+	$(AR) -x libpok.a
+	$(AR) -csr libpart.a $(OBJS) *.lo
 	if test $$? -eq 0; then $(ECHO) $(ECHO_FLAGS) $(ECHO_GREEN) " OK "; else $(ECHO) $(ECHO_FLAGS) $(ECHO_RED) " KO"; fi
 	rm *.lo
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/