1. 02 Mar, 2016 6 commits
  2. 01 Mar, 2016 3 commits
    • Philippe Gerum's avatar
      cobalt/thread: force secondary mode for joining threads · 738d0d12
      Philippe Gerum authored
      Make xnthread_join() switch the caller to secondary mode prior to
      waiting for the target thread termination. The original runtime mode
      is restored upon return.
      
      Since the joiner was already synchronized on an event that may be sent
      by the joinee from secondary mode exclusively, this change does not
      drop any real-time guarantee for the joiner: there has never been any
      in the first place.
      
      This is a preparation step to a stricter synchronization between the
      joiner and the joinee, especially in the SMP case.
      738d0d12
    • Philippe Gerum's avatar
      cobalt/thread: do not demote kthreads when cancelling · 67db5a44
      Philippe Gerum authored
      There is no point in switching a kthread to weak scheduling when
      cancelling it, as it must reach a cancellation point asap as part of
      its work loop anyway. Would it omit testing for cancellation, weak
      scheduling would not help enforcing the exit request anyway.
      67db5a44
    • Philippe Gerum's avatar
      cobalt/heap: export *vmalloc helpers · ec65be24
      Philippe Gerum authored
      ec65be24
  3. 29 Feb, 2016 11 commits
  4. 28 Feb, 2016 1 commit
  5. 27 Feb, 2016 3 commits
  6. 26 Feb, 2016 4 commits
  7. 24 Feb, 2016 8 commits
  8. 16 Feb, 2016 2 commits
  9. 12 Feb, 2016 1 commit
    • Philippe Gerum's avatar
      cobalt/registry: return -EAGAIN upon lack of registry slot · 364a91b4
      Philippe Gerum authored
      -ENOMEM is confusing in this case, does not actually reflect the error
      condition, and does not match the error code commonly returned by
      POSIX services for denoting a (temporary) lack of resources.
      Besides, this source of error was not even mentioned in the
      documentation of the affected services.
      
      All error codes must be detected, and any program that might have
      specifically checked for -ENOMEM during error recovery in the affected
      services was potentially confused, so this change does not introduce a
      significant ABI variation.
      364a91b4
  10. 09 Feb, 2016 1 commit
    • Philippe Gerum's avatar
      copperplate/syncobj: fix race in aborted wait_grant/drain operations · a12c0967
      Philippe Gerum authored
      Fixup a potential race upon return from grant/drain_wait operations,
      e.g. given two threads A and B:
      
      A:enqueue_waiter(self)
      A:monitor_wait
         A:monitor_unlock
         A:[timed] sleep
         A:wakeup on timeout/interrupt
            B:monitor_lock
            B:look_for_queued_waiter
               (found A, update A's state)
            B:monitor_unlock
         A:dequeue_waiter(self)
         A:return -ETIMEDOUT/-EINTR
      
      The race may happen anytime between the timeout/interrupt event is
      received by A, and the moment it grabs back the monitor lock before
      unqueuing. When the race happens, B can squeeze in a signal before A
      unqueues after resumption on error.
      
      Problem: A's internal state has been updated (e.g. some data
      transferred to it), but it will receive -ETIMEDOUT/-EINTR, causing it
      to miss the update eventually.
      
      The fix involves filtering out -ETIMEDOUT/-EINTR errors upon return
      from wait_grant/drain operations whenever the syncobj was actually
      signaled.
      
      This issue was detected and described by
      http://xenomai.org/pipermail/xenomai/2016-February/035852.html
      a12c0967