Changes

2 bytes removed ,  02:42, 7 February 2017
m
Line 18: Line 18:     
* Additional bound checks were added to timer-handling code (setting and/or incrementing a timer's value, etc.) and to the KTimerAndWDTManager second virtual function, so that a timer's value can never be set to either a negative value or the past (which is what fasthax needed to do).
 
* Additional bound checks were added to timer-handling code (setting and/or incrementing a timer's value, etc.) and to the KTimerAndWDTManager second virtual function, so that a timer's value can never be set to either a negative value or the past (which is what fasthax needed to do).
* The two functions that either add a [[KTimeableInterruptEvents]] instance to the global queue of pending [[KTimeableInterruptEvents]] (see [[KTimerAndWDTManager]]), or remove one from it, now return a boolean indicating whether the interrupt event already is/was in the queue (if that is true, the function that adds the interrupt event will now update the timer registers in that case as well). This is especially used for the below fixes.
+
* The two functions that either add a [[KTimeableInterruptEvent]] instance to the global queue of pending [[KTimeableInterruptEvent]] (see [[KTimerAndWDTManager]]), or remove one from it, now return a boolean indicating whether the interrupt event already is/was in the queue (if that is true, the function that adds the interrupt event will now update the timer registers in that case as well). This is especially used for the below fixes.
 
* When adding a timer to that queue, its reference count is incremented (if it wasn't already in the queue). It is only decremented when needed, after actually signaling the timer by the interrupt-handling code.
 
* When adding a timer to that queue, its reference count is incremented (if it wasn't already in the queue). It is only decremented when needed, after actually signaling the timer by the interrupt-handling code.
 
* A virtual method was added to the definition of abstract class [[KTimeableInterruptEvent]], which returns <code>static_cast<KAutoObject *>(this)->referenceCount != 1</code> for KTimer instances and <code>true</code> for KThread instances. Prior to (re)adding timer interrupt events (as well as some other objects) to the queue, objects with a refcount of 1 are removed from it.
 
* A virtual method was added to the definition of abstract class [[KTimeableInterruptEvent]], which returns <code>static_cast<KAutoObject *>(this)->referenceCount != 1</code> for KTimer instances and <code>true</code> for KThread instances. Prior to (re)adding timer interrupt events (as well as some other objects) to the queue, objects with a refcount of 1 are removed from it.
516

edits