Date: Tue, 25 Aug 1998 12:11:39 -0400 (EDT) From: zhihuizhang <bf20761@binghamton.edu> To: Marius Bendiksen <Marius.Bendiksen@scancall.no> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: fs_cs() macro in FFS Message-ID: <Pine.SOL.L3.93.980825120726.12906A-100000@bingsun2> In-Reply-To: <3.0.5.32.19980825175533.0091e570@mail.scancall.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 25 Aug 1998, Marius Bendiksen wrote: > >not see why it is accessed as a two-dimension array (I just write a small > > They're accessing a part of the data which is pointed to, not a 2d array. > > index1 => array \ > index2 => => struct > > >csum structure should be power of two. > > Because they use the << operator in it, not multiplication. > Thank for your help. But I am still confused with the macro. The fs_csp is defined as: struct csum *fs_csp[MAXCSBUF == 32]. So index1 should be 0..31, while index2 has no meaning, since each pointer points to only *one* csum structure. If you have char * charpointer[32], that will make more sense (it can be treated as a 2d array). To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.L3.93.980825120726.12906A-100000>