From owner-freebsd-arch Wed Nov 29 23:39:16 2000 Delivered-To: freebsd-arch@freebsd.org Received: from palrel1.hp.com (palrel1.hp.com [156.153.255.242]) by hub.freebsd.org (Postfix) with ESMTP id B0ADF37B400 for ; Wed, 29 Nov 2000 23:39:14 -0800 (PST) Received: from adlmail.cup.hp.com (adlmail.cup.hp.com [15.0.100.30]) by palrel1.hp.com (Postfix) with ESMTP id ED6BE1113; Wed, 29 Nov 2000 23:39:13 -0800 (PST) Received: from cup.hp.com (p1000180.nsr.hp.com [15.109.0.180]) by adlmail.cup.hp.com (8.9.3 (PHNE_18546)/8.9.3 SMKit7.02) with ESMTP id XAA10696; Wed, 29 Nov 2000 23:39:13 -0800 (PST) Message-ID: <3A260420.6A753ECB@cup.hp.com> Date: Wed, 29 Nov 2000 23:39:12 -0800 From: Marcel Moolenaar Organization: Hewlett-Packard X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Terry Lambert Cc: Alfred Perlstein , Marc Slemko , Daniel Eischen , arch@FreeBSD.ORG Subject: Re: Modifying FILE to add lock References: <200011300653.XAA07381@usr08.primenet.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Terry Lambert wrote: > > You might consider using the old "debugging malloc" trick, > of allocating one structure, but referring to another, and > reference your "hidden" lock at a negative offset. Hmmmm.... yes. This would present an unchanged struct __sFILE to programs, but adding a field at the end would also present an unchanged struct __sFILE. In both cases, the program doesn't know there are more fields; either before or after what it thinks is struct __sFILE. Adding to the struct however is much simpler. -- Marcel Moolenaar mail: marcel@cup.hp.com / marcel@FreeBSD.org tel: (408) 447-4222 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message