From owner-cvs-src@FreeBSD.ORG Sat Aug 23 14:43:34 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 10CC416A4BF; Sat, 23 Aug 2003 14:43:34 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B17A843FCB; Sat, 23 Aug 2003 14:43:33 -0700 (PDT) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h7NLhX0U063589; Sat, 23 Aug 2003 14:43:33 -0700 (PDT) (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h7NLhXdx063588; Sat, 23 Aug 2003 14:43:33 -0700 (PDT) Message-Id: <200308232143.h7NLhXdx063588@repoman.freebsd.org> From: Marcel Moolenaar Date: Sat, 23 Aug 2003 14:43:33 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/netsmb smb_conn.c smb_iod.c smb_subr.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2003 21:43:34 -0000 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