Re: ffi.copy/ffi.string fails with volatile-qualified char array

  • From: Mike Pall <mike-1311@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Mon, 4 Nov 2013 14:58:25 +0100

Justin Cormack wrote:
> Can we have an API for barriers please... Need them for hardware access and
> shared memory access...

I'm moderately sure you're better served by using the platform
APIs for synchronization. There's more to it than just emitting a
write barrier. To be truly useful under preemptive multitasking
one needs to cooperate with the kernel (e.g. to avoid busy wait).
The platform APIs already encapsulate all of the complexity -- no
need to reinvent them.

--Mike

Other related posts: