cvs commit: src/sys/netsmb smb_conn.c smb_iod.c smb_subr.h

Marcel Moolenaar marcel at FreeBSD.org
Sat Aug 23 14:43:34 PDT 2003


marcel      2003/08/23 14:43:33 PDT

  FreeBSD src repository

  Modified files:
    sys/netsmb           smb_conn.c smb_iod.c smb_subr.h 
  Log:
  Rewrite the code that uses the try/catch paradigm implemented by
  goto and abstracted by the itry, ithrow and icatch macros (among
  others). The problem with this code is that it doesn't compile on
  ia64. The compiler is sufficiently confused that it inserts a call
  to __ia64_save_stack_nonlock(). This is a magic function that saves
  enough of the stack to allow for non-local gotos, such as would be
  the case for nested functions. Since it's not a compiler defined
  function, it needs a runtime implementation. This we have not in a
  standalone compilation as is the kernel.
  
  There's no indication that the compiler is not confused on other
  platforms. It's likely that saving the stack in those cases is
  trivial enough that the compiler doesn't need to off-load the
  complexity to a runtime function.
  
  The code is believed to be correctly translated, but has not been
  tested. The overall structure remained the same, except that it's
  made explicit. The macros that implement the try/catch construct
  have been removed to avoid reintroduction of their use. It's not
  a good idea.
  
  In general the rewritten code is slightly more optimal in that it
  doesn't need as much stack space and generally is smaller in size.
  
  Found by: LINT
  
  Revision  Changes    Path
  1.9       +82 -67    src/sys/netsmb/smb_conn.c
  1.14      +33 -23    src/sys/netsmb/smb_iod.c
  1.10      +0 -36     src/sys/netsmb/smb_subr.h


More information about the cvs-src mailing list