Skip to content
Snippets Groups Projects
  1. Jan 21, 2013
  2. Jan 19, 2013
  3. Jan 18, 2013
  4. Jan 17, 2013
  5. Jan 10, 2013
    • Alessandro Rubini's avatar
      Merge branch 'new-trigger' · 6931b380
      Alessandro Rubini authored
      This merges a series of commits that introduce self-timed devices
      (exemplified by a tdc driver), zero-size-block for input channels and
      an overall better and simplified locking policy for csets and
      triggers.
      6931b380
    • Alessandro Rubini's avatar
      bugfix for buffer change (long standing race condition) · 2672b21a
      Alessandro Rubini authored
      
      When the current buffer is changed, there should be no
      users on the channels (otherwise, either a user block
      is being produced/consumed or there's somebody sleeping
      on the wq of the buffer instance).
      
      This prevents changing the buffer if in use, and prevents
      users from opening a channel if the buffer is being changed.
      We use the "disabled" flag for the buffer, not used so far.
      
      We noticed this while working on buffer changes (see previous
      commit). I'm unable to backport this to the proper place in the
      history because it relies on the new locking introduced by this branch.
      
      Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
      Acked-by: default avatarFederico Vaga <federico.vaga@gmail.com>
      2672b21a
    • Alessandro Rubini's avatar
      bugfix for buffer change (bug exposed by this branch) · fb91b7ac
      Alessandro Rubini authored
      
      I'm unable to backport this commit to the proper place (too many
      conflicts). Anyways, this fixes an issue related to changing the
      buffer type (nothing bad happens if you don't change buffer type).
      
      The bug is exposed by the self-timed csets: when a buffer type is
      being changed, the trigger may be armed. This means that a block is
      being used by the device, but the hosting buffer instance is being
      destroyed.
      
      This commit aborts a trigger and keeps it disabled while the buffer
      is being changed. Re-enabling later, unless it was already disabled.
      
      Even without self-timed support there was a tiny window for the race
      to appear. Now it's fixed forever.
      
      Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
      Acked-by: default avatarFederico Vaga <federico.vaga@gmail.com>
      fb91b7ac