Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Nov 2016 10:43:55 -0700
From:      jd1008 <jd1008@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Memory Barrier
Message-ID:  <5838785B.7080607@gmail.com>
In-Reply-To: <4806733.Z4QWb7OVgq@dragon.local>
References:  <4806733.Z4QWb7OVgq@dragon.local>

next in thread | previous in thread | raw e-mail | index | archive | help
I "used" to use the madvise(2) syscall.
I am not sure if it still works or even available.

On 11/25/2016 08:25 AM, David Naylor wrote:
> 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




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