From owner-freebsd-current Fri Apr 3 01:19:59 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA02179 for freebsd-current-outgoing; Fri, 3 Apr 1998 01:19:59 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from itesec.hsc.fr (root@itesec.hsc.fr [192.70.106.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA02136 for ; Fri, 3 Apr 1998 01:19:55 -0800 (PST) (envelope-from pb@hsc.fr) Received: from mars.hsc.fr (pb@mars.hsc.fr [192.70.106.44]) by itesec.hsc.fr (8.8.8/8.8.5/itesec-1.12-nospam) with ESMTP id LAA01739; Fri, 3 Apr 1998 11:15:24 +0200 (MET DST) Received: (from pb@localhost) by mars.hsc.fr (8.8.5/8.8.5/pb-19970301) id LAA07873; Fri, 3 Apr 1998 11:16:50 +0200 (MET DST) Message-ID: <19980403111649.ZF38052@mars.hsc.fr> Date: Fri, 3 Apr 1998 11:16:49 +0200 From: Pierre.Beyssac@hsc.fr (Pierre Beyssac) To: grog@lemis.com (Greg Lehey) Cc: phk@critter.freebsd.dk (Poul-Henning Kamp), gljohns@bellsouth.net (Glenn Johnson), freebsd-current@FreeBSD.ORG Subject: Re: error when compiling kernel with SOFTUPDATES References: <19980403150246.58202@papillon.lemis.com> <1127.891589691@critter.freebsd.dk> <19980403172205.30045@papillon.lemis.com> X-Mailer: Mutt 0.59.1e Mime-Version: 1.0 In-Reply-To: <19980403172205.30045@papillon.lemis.com>; from Greg Lehey on Apr 3, 1998 17:22:05 +0900 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG According to Greg Lehey: > >>> change "tv = time" to "getmicrotime(&tv);" > >> Wouldn't it have been possible to hide this change with a macro, like > >> was done with the reorganization of the buffer headers under 2.2.6? > > no. > > Yes. Prove me wrong. And yes, I know that the form you chose makes > it almost impossible, but that's no excuse. I don't know if it would be a good idea to hide the change with a macro, if that's what you mean. Adding a function call like getmicrotime() helps encapsulate dependencies on the clock code. Things like that are a big win in general. Redefining "time" as a macro would make the code a little less obvious about that, IMHO. On the other hand, for performance reasons and to make the generated code be as similar as possible with the code prior to the getmicrotime'isation, it would certainly be very interesting to define getmicrotime() and possibly others getxxxx() friends as macros. -- Pierre.Beyssac@hsc.fr To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message