From: Trevor Higgins <plan9fullfrontal@qs.co.nz>
To: 9front@9front.org
Subject: Re: [9front] Mixfs: potential bug?
Date: Thu, 13 Feb 2020 14:22:58 +1300 [thread overview]
Message-ID: <38b84859-2c31-a83c-3b90-f5c9e623d964@qs.co.nz> (raw)
In-Reply-To: <CAHjwAuxsW9J2faquv2djaedf9fT9OgFXc6FRfBH29vQBaRm6fA@mail.gmail.com>
Ok, thanks. Sorry for being too lazy to just compile some code and check
it out my self. Which I have done now.
I got the first part of anon structures long ago but missed the second
point. about compiler automunging the references.
I had a crack at porting hjfs to front9port, by naming the anon
structures and converting the refs to &struct->qlock et al
but it was not 100% successful.
The program runs without seg faulting but does not create
'namespace'/hjfs.cmd and hangs somewhere without serving anthing on the
mount point.
I will now have to check that I put the correct structure reference into
the edits.
Thanks again.
On 02/13/2020 01:21 PM, Silas McCroskey wrote:
> http://doc.cat-v.org/plan_9/4th_edition/papers/comp
>
> The "Extensions" section goes over this compiler extension:
>
> structs-within-structs declared without a name allow their members to
> be accessed directly, so
> qlock(s)
> does the same thing as
> qlock(s->Lock)
> since the "locked" member used by qlock is accessible to both.
>
> This is a compiler extension rather than pointer tricks, so it does
> not depend on ordering within the struct (as displayed in the
> Extensions section itself, where Lock is the last member of the outer
> struct).
>
> - sam-d
>
> On Wed, Feb 12, 2020 at 4:07 PM Trevor Higgins
> <plan9fullfrontal@qs.co.nz> wrote:
>> Looking at the code for audio/mixfs (mixfs.c)
>>
>> The code uses qlock(s) where s is: struct Stream*.
>>
>> In the structure ,shouldn't the QLock member of the structure be the
>> first member in the structure?
>> If not so, then why does it not matter?
>>
>> Thanks.
>>
>> --
>>
--
We need another plan
prev parent reply other threads:[~2020-02-13 1:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-12 20:51 Libpng and Zlib updates on the ports tree Lucas Francesco
2020-02-12 21:01 ` [9front] " ori
2020-02-13 0:06 ` Mixfs: potential bug? Trevor Higgins
2020-02-13 0:21 ` [9front] " Silas McCroskey
2020-02-13 0:33 ` Eli Cohen
2020-02-13 1:22 ` Trevor Higgins [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=38b84859-2c31-a83c-3b90-f5c9e623d964@qs.co.nz \
--to=plan9fullfrontal@qs.co.nz \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).