1. 06 Dec, 2021 1 commit
  2. 30 Nov, 2021 1 commit
  3. 23 Nov, 2021 2 commits
  4. 22 Nov, 2021 3 commits
  5. 21 Nov, 2021 21 commits
  6. 20 Nov, 2021 1 commit
  7. 18 Nov, 2021 2 commits
  8. 15 Nov, 2021 1 commit
    • Abramo Bagnara's avatar
      coding guidelines: comply with MISRA C:2012 Rule 21.13 · 835451e3
      Abramo Bagnara authored
      
      MISRA C:2012 Rule 21.13 (Any value passed to a function in <ctype.h>
      shall be representable as an unsigned char or be the value EOF).
      
      Functions in <ctype.h> have undefined behavior if they are called with
      any other value. Callers affected by this change are not prepared to
      handle EOF anyway. The addition of these casts avoids the issue
      and does not result in any performance penalty.
      Signed-off-by: default avatarAbramo Bagnara <abramo.bagnara@bugseng.com>
      835451e3
  9. 14 Nov, 2021 1 commit
    • Abramo Bagnara's avatar
      coding guidelines: comply with MISRA C:2012 Rule 7.2 · f6ce2893
      Abramo Bagnara authored
      
      MISRA C:2012 Rule 7.2 (A `u' or `U' suffix shall be applied to all
      integer constants that are represented in an unsigned type)
      
      Added missing `U' suffixes in constants that are involved in the
      analyzed build, plus a few more not to introduce inconsistencies
      with respect to nearby constants that are either unused in the
      build (but implicitly unsigned) or are used and are immediately
      converted to unsigned.
      Signed-off-by: default avatarAbramo Bagnara <abramo.bagnara@bugseng.com>
      f6ce2893
  10. 05 Nov, 2021 4 commits
  11. 29 Oct, 2021 1 commit
    • Andy Ross's avatar
      kernel/sched: Fix race with thread return values · 6a851f1f
      Andy Ross authored
      
      There was a brief (but seen in practice on real apps on real
      hardware!) race with the switch-based z_swap() implementation.  The
      thread return value was being initialized to -EAGAIN after the
      enclosing lock had been released.  But that lock is supposed to be
      atomic with the thread suspend.
      
      This opened a window for another racing thread to come by and "wake
      up" our pending thread (which is fine on its own), set its return
      value (e.g. to 0 for success) and then have that value clobbered by
      the thread continuing to suspend itself outside the lock.
      
      Melodramatic aside: I continue to hate this
      arch_thread_return_value_set() API; it needs to die.  At best it's a
      mild optimization on a handful of architectures (e.g. x86 implements
      it by writing to the EAX register save slot in the context block).
      Asynchronous APIs are almost always worse than synchronous ones, and
      in this case it's an async operation that races against literal
      context switch code that can't use traditional locking strategies.
      
      Fixes #39575
      Signed-off-by: default avatarAndy Ross <andrew.j.ross@intel.com>
      6a851f1f
  12. 26 Oct, 2021 2 commits