cvs commit: projects/csup config.h detailer.c lister.c main.c mux.c mux.h proto.c stream.c stream.h updater.c

Maxime Henrion mux at FreeBSD.org
Fri Feb 10 10:18:48 PST 2006


mux         2006-02-10 18:18:47 UTC

  FreeBSD projects repository

  Modified files:
    csup                 config.h detailer.c lister.c main.c mux.c 
                         mux.h proto.c stream.c stream.h updater.c 
  Log:
  - Change the stream API so that a stream is associated with a void *,
    rather than with an int.  This changes the type of the read/write/close
    functions of the stream API.
  - Have a stream_open_fd() function to replace stream_fdopen() and new
    convenience functions for handling file descriptors : stream_read_fd(),
    stream_write_fd() and stream_close_fd().
  - Have stream_fileno() that will return the file descriptor associated
    with the stream or -1 if it's not associated with any.
  - There is now a stream_open() funtion which is the most generic way to
    open a stream, associating it with a void *.
  - Inspect the open() flags in stream_open_file() to only create the
    necessary buffers.
  - Automatically connect the channel 0 in mux_init(), like CVSup, and get
    rid of the now useless chan_open() function.
  - Create the channel if it doesn't exist in chan_get().
  - Now that I can, change the multiplexer API so that chan_connect() and
    chan_accept() return a struct chan * and not an id.  Thanks to this,
    we now don't pass an ID but a struct chan * to the following functions:
    chan_read(), chan_write(), chan_close() and chan_wait().  This means
    that for each of these functions, we now spare a mutex lock and unlock
    and also reduce contention on the multiplexer lock.
  - Because of the previous change, use the new stream_open() in the worker
    threads to bind the channel to the chan_read() and chan_write()
    functions.
  - Optimize the scheduling of the sender thread by restarting the scan at
    the last channel + 1.  This avoids starving high id channels with low
    id channels.
  
  That's a quite successful hacking night :-).
  
  Revision  Changes    Path
  1.29      +3 -2      projects/csup/config.h
  1.38      +5 -3      projects/csup/detailer.c
  1.23      +3 -2      projects/csup/lister.c
  1.31      +5 -3      projects/csup/main.c
  1.60      +65 -51    projects/csup/mux.c
  1.20      +11 -10    projects/csup/mux.h
  1.63      +21 -24    projects/csup/proto.c
  1.51      +126 -27   projects/csup/stream.c
  1.21      +15 -7     projects/csup/stream.h
  1.69      +3 -2      projects/csup/updater.c


More information about the cvs-all mailing list