Skip to content
  • alex@thinkpad's avatar
    QEMU logging: updated DryOS and VxWorks task switch handling · 9049426c8cce
    alex@thinkpad authored
    It was quite hard to pass the test suite, as there were lots of edge cases:
    
    - context switch may happen either in a timer interrupt, or in a regular task (e.g. msleep, sempahores and so on)
    - context switch is not atomic - it happens a few instructions (or function calls!) afterh updating the current task pointer
    - until the registers are swapped for the new task, we are still on the stack of the previous task
    - there may be dummy task switches (i.e. from one task to the same task)
    - an interrupt can occur in the middle of a (non-atomic) context switch (!)
    - VxWorks models do not even use a unique task ID (!)
    
    Result: QEMU no longer crashes during logging tests!
    
    Issue: these cameras do not appear to use an unique task ID. Workaround: assign our own task IDs.
    
    --HG--
    branch : qemu
    9049426c8cce