Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Nov 2000 23:39:12 -0800
From:      Marcel Moolenaar <marcel@cup.hp.com>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        Alfred Perlstein <bright@wintelcom.net>, Marc Slemko <marcs@znep.com>, Daniel Eischen <eischen@vigrid.com>, arch@FreeBSD.ORG
Subject:   Re: Modifying FILE to add lock
Message-ID:  <3A260420.6A753ECB@cup.hp.com>
References:  <200011300653.XAA07381@usr08.primenet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A260420.6A753ECB>