Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Nov 2016 17:25:34 +0200
From:      David Naylor <naylor.b.david@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Memory Barrier
Message-ID:  <4806733.Z4QWb7OVgq@dragon.local>

next in thread | raw e-mail | index | archive | help
--nextPart1901237.3UfmMciAPK
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"

Hi

Is there anyway to implement a memory barrier in FreeBSD without using 
mprotect(2) [1].  Unfortunately, the mprotect(2) method uses mlock(2) and 
mlock(2) does not always work, depending on load and permissions.  

I see there was a proposal on a Linux mailing list for a new syscall to 
implement this functionality [2] but FreeBSD 11.0 does not appear to have it.  

Regards

[1] 
https://github.com/dotnet/coreclr/blob/master/src/pal/src/thread/process.cpp#L2886
https://github.com/dotnet/coreclr/blob/master/src/pal/src/thread/process.cpp#L2929
[2] https://lkml.org/lkml/2015/7/10/766

--nextPart1901237.3UfmMciAPK
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQJ8BAABCgBmBQJYOFfvXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ5NDhFQzUxMUEyN0YwMzAyRTc5OUI1M0FB
RDYzRkE4REQ2QjJEQTU1AAoJEK1j+o3WstpVdUAQAMNSI6ckoHjIXXijRW9D63Pl
gz6WGfKLX8PxlSbosC5+BVCDLVX35SrAIaGksSbcqy2P/4zXM+3i+sS5wVCPuBRe
hNe74c5BYZkXzMJKZ9YzEjslFGoHNegtwYCSZvZ9tnoBnaYeKZcEz4/1J0QJuJ2f
5NU8bh6yWziNfmvF8VF2JSsXZ9gYh8ldJ5/xwav45DPA8BYT2f1nA2qSw/DyYcnZ
Z6fZ7pT53Xkys/dwnvMM2m+hpuolDZLDBg5C8UtC1HaWJs14L0CQJPKv9FFw3PrI
hD/c3eipKTCD84FZ0jmiL/qH/kmT37RTzG+Y3rrEgvU6FFQlh2y5b50S530h9MIx
s/Kh6fMoCftSDwGd7M9UB3OxX7ESPchtwZuDhh7rrSr0Mj87qu4HByiENkyQuRyz
/c6029+Mp1vzPjCp4hU+F2LF2HHVCsD/fh1WgJUUfl3t8u7qDiI8yvdG6m8Akd9J
VuinvDUdk0ogrQIzJjfIOblfcKmdP+48giUjdldvvVJLDXg68djDqnUTmbNJbMsz
yllXNkR0Nj7WKFWazLutZOT2nMPFeAAsZA/u/6NjV/7uw8h335bDrA1MTOhGls3W
C13dkLuWarapV/ABSpv1r3BIS6VX5BCZXeAbjlEs/raH9JLsbvVf4KiJOBNpm8D8
nsQ5pD8qVBFEtibNQuuq
=H3Yy
-----END PGP SIGNATURE-----

--nextPart1901237.3UfmMciAPK--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4806733.Z4QWb7OVgq>