chiark / gitweb /
realtime: avoid needless signalling problems related to interference
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Mon, 3 Jan 2011 23:23:41 +0000 (23:23 +0000)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Mon, 3 Jan 2011 23:23:41 +0000 (23:23 +0000)
commit6218b2c28eff39421d26983497bb902ffba8482f
tree1aec2012827bbe61738f741a2a10c76e28a5d45c
parent6824b31ede052d0b1d142191a7470b5534ccf290
realtime: avoid needless signalling problems related to interference

When we are considering an interfering segment, we want to first see
whether the segment has anything in it and only if so consider its
position.  That avoids is calling it a problem that the interfering
segment's position is not known (eg, because it has never been set).

To support this, split segment_interferes into two functions:
  segment_interferer: simply returns the possibly-interfering segment
      so that we can check whether it's relevant
  segment_interferer_does: does the hard work, dealing appropriately
      with errors

At all but the one call site of interest we can assert that the
getmovpos callback never fails, so we provide a helper function
  segment_interferes_simple
which does what segment_interferes used to (except that getmovpos
returning an error now causes an abort).
hostside/resolve.c
hostside/safety.c
hostside/safety.h
hostside/trackloc.c