- Oct 18, 2021
-
-
Federico authored
-
Federico authored
-
The kernel's API has been amended such that the periodic context switch works along with exact awakening of the sleeping threads: 1) SleepData is not in terms of kernel's tick anymore but directly in terms of context switch timer tick. 2) Sleeping threads are being awakened in the time they have requested rather than just waiting for the context switch to happen. 3) Three functions are added to the kernel's API: -tickSleepUntil(tick) which is private to the kernel and is the main reference of other sleep functions of a thread and it's implemented as an inline function to keep both maintainability and efficiency -Thread::nanoSleep -Thread::nanoSleepUntil 4) Besides sleep functions, the following functions has been updated in order to keep the timer interrupt sync with the head of the sleeping list. I'm not sure about this being correct and it may have some conflicts with the scheduler's policy: -IRQwakeThreads: After removing the head of the sleeping list, the next interrupt should be set to the head again! Another change in this is that it does not expect the exact equivalence between timer's tick and wakeup_time as when the kernel reaches that particular point the timer's tick has already passed the wakeup_time. -IRQaddToSleepingList: Due to the change in order of items in the sleeping list, the interrupt should be set again. 5) Constructor and Interrupt handler of the context switch timer has been amended in order to put the next context switch time as a record in the sleeping list. As the meaning of tick in sleep functions has been changed, the test suit does not work properly with option t anymore but some critical tests has been done on the current state of the project and everything seems to work fine but some optimizations are needed specially in the case that the time window between items in the list is very short. Signed-off-by:
Sasan Golchin <ahmad.golchin@mail.polimi.it> Signed-off-by:
Terraneo Federico <fede.tft@miosix.org>
-
A generic interface miosix::ContextSwitchTimer has been added to the kernel that can play the role of either periodic/aperiodic system timer. Like other kernel interfaces, there should be provided a proper implementation for cstimer. Currently the only available implementation is done for cortexM4_stm32f which is based on TIM2 timer. Although the implementation is an aperiodic timer, it is set to act like a periodic timer with T=1ms. Signed-off-by:
Sasan Golchin <ahmad.golchin@mail.polimi.it> Signed-off-by:
Terraneo Federico <fede.tft@miosix.org>
-
In this subproject, an 64 bit apriodic timer is created based on TIM2 in which the overflow is managed automatically and the user is able to set checkpoints (in terms of timer ticks) to fire IRQ. An expected usecase is the use this driver as the context switch tool for the kernel. There might be some errors in which overflows/checkpoints are not managed correctly that will be OK asap. Signed-off-by:
sasan_golchin <ahmad.golchin@mail.polimi.it> Signed-off-by:
sasan_golchin <ahmad.golchin@mail.polimi.it> Signed-off-by:
Terraneo Federico <fede.tft@miosix.org>
-
- Jul 14, 2013
-
-
Terraneo Federico authored
-
- Jul 07, 2013
-
-
Terraneo Federico authored
-
Terraneo Federico authored
-
- Jun 09, 2013
-
-
Terraneo Federico authored
-
Terraneo Federico authored
-
Terraneo Federico authored
-
- Jan 08, 2013
-
-
Matteo authored
-
- Dec 17, 2012
-
-
Andrea authored
-
- May 05, 2012
-
-
Terraneo Federico authored
-
Terraneo Federico authored
-
- May 03, 2012
-
-
Terraneo Federico authored
-
- May 02, 2012
-
-
Terraneo Federico authored
-
- Apr 22, 2012
-
-
Terraneo Federico authored
-
- Apr 18, 2012
-
-
Terraneo Federico authored
-
- Apr 06, 2012
-
-
Terraneo Federico authored
-
- Mar 26, 2012
-
-
Terraneo Federico authored
-
- Mar 22, 2012
-
-
Terraneo Federico authored
-
- Mar 21, 2012
-
-
Terraneo Federico authored
-
- Mar 20, 2012
-
-
Terraneo Federico authored
-
Terraneo Federico authored
-
- Mar 16, 2012
-
-
Terraneo Federico authored
-
- Mar 14, 2012
-
-
Terraneo Federico authored
-
Terraneo Federico authored
-
- Dec 09, 2011
-
-
Terraneo Federico authored
-
- Dec 30, 2010
-
-
Terraneo Federico authored
-
- Dec 28, 2010
-
-
Terraneo Federico authored
-
- Dec 27, 2010
-
-
Terraneo Federico authored
-
- Dec 16, 2010
-
-
Federico Terraneo authored
-