Re: [9fans] _xinc vs ainc

2011-05-07 Thread ron minnich
The type signature reveals all: ainc returns a long, and xinc is void. You really can't test the value of the long * after you call xinc because somebody else might have done an xinc after your xinc but before you test the value. I think, among others, floren and I needed ainc for devtrace years

Re: [9fans] _xinc vs ainc

2011-05-07 Thread Venkatesh Srinivas
On Sat, May 7, 2011 at 9:24 PM, Bakul Shah wrote: > On Sat, 07 May 2011 20:25:25 EDT erik quanstrom   > wrote: >> > > the difference, and my main point is that the loop in ainc means >> > > that it is not a wait-free algorithm.  this is not only sub optimal, >> > > but also could lead to incorrec

Re: [9fans] _xinc vs ainc

2011-05-07 Thread Bakul Shah
On Sat, 07 May 2011 20:25:25 EDT erik quanstrom wrote: > > > the difference, and my main point is that the loop in ainc means > > > that it is not a wait-free algorithm. this is not only sub optimal, > > > but also could lead to incorrect behavior. > > > > I think a more likely possibility for

Re: [9fans] _xinc vs ainc

2011-05-07 Thread erik quanstrom
> > the difference, and my main point is that the loop in ainc means > > that it is not a wait-free algorithm. this is not only sub optimal, > > but also could lead to incorrect behavior. > > I think a more likely possibility for the change is to have a > *copy* of what was incremented. lock incl

Re: [9fans] _xinc vs ainc

2011-05-07 Thread Bakul Shah
On Sat, 07 May 2011 18:47:54 EDT erik quanstrom wrote: > > Just guessing. May be the new code allows more concurrency? If the > > value is not in the processor cache, will the old code block other > > processors for much longer? The new code forces caching with the first > > read so may be

Re: [9fans] _xinc vs ainc

2011-05-07 Thread erik quanstrom
> Just guessing. May be the new code allows more concurrency? If the > value is not in the processor cache, will the old code block other > processors for much longer? The new code forces caching with the first > read so may be high likelyhood cmpxchg will finish faster. I haven't > studied

Re: [9fans] Plan 9 GSoC projects selected

2011-05-07 Thread hiro
> The main idea is to avoid the duplication of xlib dependent code in > inferno, p9p, 9vx and drawterm and write a wsys device to use the > window manager of the host system through a file server similar to > rio(4). If the new x11 code will be a library or some sort of p9p's > devdraw(1) and if th

Re: [9fans] _xinc vs ainc

2011-05-07 Thread Bakul Shah
On May 7, 2011, at 6:05 AM, erik quanstrom wrote: i'm confused by the recent change to the thread library. the old code was simply to do a locked incl. the new code does a locked exchange /within a loop/ until it's seen that nobody else has updated the value at the same time, thus insuring t

[9fans] _xinc vs ainc

2011-05-07 Thread erik quanstrom
i'm confused by the recent change to the thread library. the old code was simply to do a locked incl. the new code does a locked exchange /within a loop/ until it's seen that nobody else has updated the value at the same time, thus insuring that the value has indeed been updated. since the expens

Re: [9fans] freedom (was Re: Compiling 9atom kernel)

2011-05-07 Thread Daniel Lyons
On May 6, 2011, at 11:01 PM, Lucio De Re wrote: > has anybody > conclusively established why something MS could not successfully market > has found such a ready audience when supplied by Apple? Is it the UI > as one might conclude from an earlier post? The stylus, maybe? http://www.tuaw.com/fi