Skip to content
  1. Mar 10, 2017
    • David Sidrane's avatar
      Merged in david_s5/nuttx/upstream_prio_fix (pull request #259) · 11eabc5a
      David Sidrane authored
      Priority Inversion fixes
      
      Approved-by: Gregory Nutt
      11eabc5a
    • David Sidrane's avatar
      Priority Inversion fixes:Initalization · 60d8606b
      David Sidrane authored
      60d8606b
    • David Sidrane's avatar
      Priority Inversion fixes:typo · 6cc8f910
      David Sidrane authored
      6cc8f910
    • David Sidrane's avatar
      Merged in david_s5/nuttx/upstream_i2c_fc2 (pull request #258) · 5ec25a87
      David Sidrane authored
      STM32, STM32 F7, and STM32 L4: Clone Freddie Chopin's I2C change to similar STM32 I2C drivers.
      
      Approved-by: Gregory Nutt
      5ec25a87
    • David Sidrane's avatar
      WS · 2baffab1
      David Sidrane authored
      2baffab1
    • Gregory Nutt's avatar
      Priority inheritance: When CONFIG_SEM_PREALLOCHOLDERS==0, there is only a... · 360539af
      Gregory Nutt authored
      Priority inheritance:  When CONFIG_SEM_PREALLOCHOLDERS==0, there is only a single, hard-allocated holder structure.  This is problem because in sem_wait() the holder is released, but needs to remain in the holder container until sem_restorebaseprio() is called.  The call to sem_restorebaseprio() must be one of the last things the sem_wait() does because it can cause the task to be suspended. If in sem_wait(), a new task gets the semaphore count then it will fail to allocate the holder and will not participate in priority inheritance.  This fix is to add two hard-allocated holders in the sem_t structure:  One of the old holder and one for the new holder.
      360539af
    • Gregory Nutt's avatar
      pthreads: Fix pthread_mutexattr_init(). It was not initializing the protocol... · 769427ed
      Gregory Nutt authored
      pthreads:  Fix pthread_mutexattr_init().  It was not initializing the protocol field when priority inheritance is enabled.
      769427ed
    • David Sidrane's avatar
      STM32, STM32 F7, and STM32 L4: Clone Freddie Chopin's I2C change to similar STM32 I2C drivers. · acaebb36
      David Sidrane authored
         Save elapsed time before handling I2C in stm32_i2c_sem_waitstop()
         This patch follows the same logic as in previous fix to
         stm32_i2c_sem_waitdone().
         It is possible that a context switch occurs after I2C registers are read
         but before elapsed time is saved in stm32_i2c_sem_waitstop(). It is then
         possible that the registers were read only once with "elapsed time"
         equal 0. When scheduler resumes this thread it is quite possible that
         now "elapsed time" will be well above timeout threshold. In that case
         the function returns and reports a timeout, even though the registers
         were not read "recently".
         Fix this by inverting the order of operations in the loop - save elapsed
         time before reading registers. This way a context switch anywhere in the
         loop will not cause an erroneous "timeout" error.
      acaebb36
    • Gregory Nutt's avatar
      Cosmetic · a93e46d0
      Gregory Nutt authored
      a93e46d0
    • Freddie Chopin's avatar
      ave elapsed time before handling I2C in stm32_i2c_sem_waitstop() · 3cd66af8
      Freddie Chopin authored
      This patch follows the same logic as in previous fix to
      stm32_i2c_sem_waitdone().
      
      It is possible that a context switch occurs after I2C registers are read
      but before elapsed time is saved in stm32_i2c_sem_waitstop(). It is then
      possible that the registers were read only once with "elapsed time"
      equal 0. When scheduler resumes this thread it is quite possible that
      now "elapsed time" will be well above timeout threshold. In that case
      the function returns and reports a timeout, even though the registers
      were not read "recently".
      
      Fix this by inverting the order of operations in the loop - save elapsed
      time before reading registers. This way a context switch anywhere in the
      loop will not cause an erroneous "timeout" error.
      3cd66af8
  2. Mar 09, 2017