cvs commit: projects/csup mux.c mux.h proto.c

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


mux         2006-02-11 02:27:58 UTC

  FreeBSD projects repository

  Modified files:
    csup                 mux.c mux.h proto.c 
  Log:
  Do something I've been wanting to do for a lot of time but couldn't
  before: remove all the global variables from the multiplexer code and
  have an opaque structure to hand to consumers, like for all the other
  APIs.  This means that it is now possible to open several multiplexers
  on several sockets, which is needed if someone wants to code a csupd
  with this code.  It is also less error-prone when we need to start
  a new multiplexer code after the previous run failed.  It also allows
  me to have cool structure names! :-)
  
  To sum up:
  - The mux_init() function becomes mux_open() and returns a struct mux *.
  - The mux_fini() function becomes mux_close() and takes a struct mux *.
  - Several functions of the chan API take a struct mux * as a parameter
    too now.
  - And a lot of code churn in mux.c.
  
  Revision  Changes    Path
  1.61      +196 -178  projects/csup/mux.c
  1.21      +6 -5      projects/csup/mux.h
  1.64      +28 -23    projects/csup/proto.c


More information about the cvs-all mailing list