From owner-freebsd-hackers Fri Nov 15 13:00:31 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA15966 for hackers-outgoing; Fri, 15 Nov 1996 13:00:31 -0800 (PST) Received: from brasil.moneng.mei.com (brasil.moneng.mei.com [151.186.109.160]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id NAA15957 for ; Fri, 15 Nov 1996 13:00:28 -0800 (PST) Received: (from jgreco@localhost) by brasil.moneng.mei.com (8.7.Beta.1/8.7.Beta.1) id OAA28943; Fri, 15 Nov 1996 14:59:35 -0600 From: Joe Greco Message-Id: <199611152059.OAA28943@brasil.moneng.mei.com> Subject: Re: Sockets question... To: fenner@parc.xerox.com (Bill Fenner) Date: Fri, 15 Nov 1996 14:59:34 -0600 (CST) Cc: fenner@parc.xerox.com, jgreco@brasil.moneng.mei.com, hackers@freebsd.org In-Reply-To: <96Nov15.124412pst.177557@crevenia.parc.xerox.com> from "Bill Fenner" at Nov 15, 96 12:44:03 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > >Actually... I usually found it easier to do the following. > > And that's what Terry's complaining about; if you have alignment > requirements when writing big_ugly->yadda, those alignment requirements > might not be met by the read() inside of xread(). Ummm... and the problem is...? As far as I am aware, byte oriented data can be written to unaligned addresses on any UNIX architecture that I have seen. xread is explicitly called with what is clearly a byte oriented buffer. If you are possibly worried about something such as the atomicity of reads (potentially valid in a threaded environment, or one using shared memory), I agree that there may be some concern. Since it is not clear to _me_ that such atomicity of access would be valid under the same circumstances even with read(), I would probably code around the situation anyways. Is there some other problem that I am missing? I've done this sort of things for several years now... ... JG