Subject: Re: build aborts in regress/lib/libpthread/sem
To: None <port-dreamcast@netbsd.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-dreamcast
Date: 02/23/2003 00:17:08
In article <yf91y21bceg.fsf@mc.pp.se>
marcus@mc.pp.se wrote:

> If it's useful to do it like that, then I'd suggest we go with Jason's
> variant instead, where the variable is a parameter to the macros.

Yeah, I think Jason's idea is a good compromise.
But how do you think about adding G2LOCK_DECL macro
to declare the temp variable instead of pass it via an arg?

> But
> I'm still a bit puzzled why you'd want the critical section to span
> the beginning and end of the loop, but not the middle.  What does the
> actual code look like?

Well, my example is not so good (since I'm not a good programmer :-)
More particular case I know is:

{
 G2LOCK();
 :
 if (xxx) {
  G2_UNLOCK();
  return;
 }
 :
 G2_UNLOCK;
}

etc.

> At least, that's what _I_ think.  :-)

I this case, maybe the portmaster's mind has priority.. :-)
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp