Skip to content
Snippets Groups Projects
  1. Dec 30, 2022
  2. Dec 29, 2022
    • Rob Swindell's avatar
      Remove startup->node_spysem, nobody's using it and it had a bad bug · 4192b404
      Rob Swindell authored
      This came about through the realization that the global 'sbbs' in main.cpp
      can (and was/is) hiding some copy/pasta bugs.
      4192b404
    • Deucе's avatar
      Output snappiness improvements. · 2135b877
      Deucе authored
      When the system checks for an incoming byte, if there's any pending
      output, send it immediately, bypassing the outbuf highwater mark.
      
      This allows the final non-full packet to be sent without waiting
      for the OutbufDrainTimeout (default 10ms), and makes a big difference
      when doing a large number of ANSI queries (send an ANSI code, wait
      for a response).  There's a small but noticable placebo effect as
      well that makes everything feel smoother.
      
      This commit also cleans up the output thread where it pulls from
      the ring buffer into the linear buffer to take advantage of the new
      event-based ring buffers.  Much easier to read now.
      
      Speaking of easier to read, this also includes some whitespace
      fixups.
      2135b877
    • Rob Swindell's avatar
    • Rob Swindell's avatar
    • Deucе's avatar
      Add console.flush() method. · fc9c51bf
      Deucе authored
      Seems to work a treat.
      fc9c51bf
    • Deucе's avatar
      Fix typo · 3d1e88e8
      Deucе authored
      3d1e88e8
    • Deucе's avatar
      4bedae72
    • Deucе's avatar
      Fix name of data event · 562a87e3
      Deucе authored
      562a87e3
    • Deucе's avatar
    • Deucе's avatar
      Remove RINGBUF_SEM for RINGBUG_EVENT · d0760706
      Deucе authored
      We've never really cared how many times the ring buffer has become
      empty, how many times data was added to it, or how many times we've
      been over the highwater mark.  These have effectively always been
      event signalling, with extra hackiness to clear "extra" semaphore
      posts.
      
      This commit removes RINGBUF_SEM entirely, and uses events for
      everything.  There's an empty event (set when the ring buffer is empty),
      a data event (set when the ring buffer is not empty), and a highwater
      event (set when the ring buffer has at least highwater mark bytes).
      
      A RingBufWrite() will set data and highwater events if applicable,
      and clear the empty event.
      
      A RingBufRead() will set empty event and clear data and highwater
      events if applicable.
      
      RingBufReInit() will now set the empty event, and clear the data
      and highwater events.
      
      These are the only actions the RingBuf API will perform on the
      events, it does *not* clear the highwater event on a RingBufWrite()
      if the buffer does not have enough bytes in it for example, this
      will *only* be done by RingBufRead() or RingBufReInit().  This
      allows consumers to force specific behaviours (such as forcing
      the highwater event on shutdown to prevent waiting for it).  Since
      the current code was able to deal with the semaphores having
      arbitrarily high counts, the existing code shouldn't have any
      issue with this.
      
      For things that want to shut something down, we're now setting both
      the data and highwater events to ensure it doesn't wait for a
      timeout (even for things that don't use highwater like the inbuf).
      The RingBuffer API should grow a thing to do this (RingBufferFlush
      perhaps?) rather than the consumers poking into the innards
      arbitrarily.
      
      Tested on the webserver and RLogin server and seems to be working
      great.  sexyz builds.  It seems there's some Windows thing that
      uses the ringbuffer sem for something, but I couldn't figure out
      what... updated the build file, but no clue if that's broken or not
      now... I'm sure DigitalMan will be happy to fix it if CI doesn't
      catch it. ;)
      
      This should allow the console object to grow a "flush" method that
      will set the highwater and data events.
      d0760706
  3. Dec 27, 2022
  4. Dec 24, 2022
  5. Dec 23, 2022
  6. Dec 21, 2022
  7. Dec 17, 2022
  8. Dec 14, 2022
Loading