> [1] Note that because the libgee deals with pointers it needs to
> implement a bit more. If you need a guide see
> http://blog.piechotka.com.pl/2014/03/01/lock-free-collection-in-libgee-hazard-pointer/
> (even more self-promotion)
>
Thanks for the link. That eventually leads me to
ConcurrentLi
Summary: byte access (read/write) is atomic on
MOST architectures. Dang! I thought ALL.
> [1] Synchronized means if x and y are set to 0 and thread 1 sets first x
> and then y to 1 then thread 2 might read y == 1 and then x == 0. Atomic
> means that state of x and y are either 0 or 1. Note that x8
On Mon, 2014-06-16 at 08:44 +0800, Nor Jaidi Tuah wrote:
> > As a side question - why do you need volatile? In most cases it's not
> > needed (unless you write kernel/driver and do memory based I/O).
>
> My multithreaded code didn't work and I thought
> may be gcc is making a wrong optimization.
>
On Mon, 2014-06-16 at 09:18 +0800, Nor Jaidi Tuah wrote:
> > True - there is a few cases where volatile can be used (I know too
> > little about security to say if using just volatile is ok from standard
> > POV). I guess you could reformulate my question into - "in most you
> > don't need volatil
> True - there is a few cases where volatile can be used (I know too
> little about security to say if using just volatile is ok from standard
> POV). I guess you could reformulate my question into - "in most you
> don't need volatile and many programmers use volatile as atomic despite
> it does
> /* Need to register types with the glib type system for dynamic
> * construction with gtkbuilder. Need to figure out a better way
> * to ensure the calls to typeof() are not optimized out.
> */
>
> stdout.printf("Registering %s\n", typeof(AboutDialog).n
On Mon, 2014-06-16 at 02:29 +0200, Paul Marques Mota wrote:
> 2014-06-15 1:20 GMT+02:00 Maciej Piechotka
> :
>
> > On Wed, 2014-06-11 at 16:54 +0800, Nor Jaidi Tuah wrote:
> > > Is there any way to declare a volatile?
> >
> > As a side question - why do you need volatile? In most cases it's not
>
On Sun, 2014-06-15 at 11:39 -0700, Edward Hennessy wrote:
> On Jun 14, 2014, at 4:20 PM, Maciej Piechotka
> wrote:
> >
> > As a side question - why do you need volatile? In most cases it's not
> > needed (unless you write kernel/driver and do memory based I/O).
> >
>
> I've run into the issue
> As a side question - why do you need volatile? In most cases it's not
> needed (unless you write kernel/driver and do memory based I/O).
My multithreaded code didn't work and I thought
may be gcc is making a wrong optimization.
Turns out to be my own fault.
But still, I'm curious, can gcc make
2014-06-15 1:20 GMT+02:00 Maciej Piechotka :
> On Wed, 2014-06-11 at 16:54 +0800, Nor Jaidi Tuah wrote:
> > Is there any way to declare a volatile?
>
> As a side question - why do you need volatile? In most cases it's not
> needed (unless you write kernel/driver and do memory based I/O).
>
Or unl
On Jun 14, 2014, at 4:20 PM, Maciej Piechotka wrote:
>
> As a side question - why do you need volatile? In most cases it's not
> needed (unless you write kernel/driver and do memory based I/O).
>
I've run into the issue calling functions with side effects. Here is a snippet
of my code with th
11 matches
Mail list logo