Re: [osv-dev] [PATCH] libc: implement posix_madvise

2021-12-22 Thread Waldek Kozaczuk
On Tuesday, December 21, 2021 at 5:57:52 PM UTC-5 Nadav Har'El wrote: > On Wed, Dec 22, 2021 at 12:42 AM Waldek Kozaczuk > wrote: > >> The OSV_LIBC_API macro makes sure that during the compilation phase the >> posix_madvise symbol is left as GLOBAL DEFAULT in the libc/mman.o where all >> oth

Re: [osv-dev] [PATCH] libc: implement posix_madvise

2021-12-21 Thread Nadav Har'El
On Wed, Dec 22, 2021 at 12:42 AM Waldek Kozaczuk wrote: > The OSV_LIBC_API macro makes sure that during the compilation phase the > posix_madvise symbol is left as GLOBAL DEFAULT in the libc/mman.o where all > other symbols are left hidden. The presence of posix_madvise in those 4 > symbols files

Re: [osv-dev] [PATCH] libc: implement posix_madvise

2021-12-21 Thread Waldek Kozaczuk
The OSV_LIBC_API macro makes sure that during the compilation phase the posix_madvise symbol is left as GLOBAL DEFAULT in the libc/mman.o where all other symbols are left hidden. The presence of posix_madvise in those 4 symbols files is used to feed the version script that is used by the linker

Re: [osv-dev] [PATCH] libc: implement posix_madvise

2021-12-21 Thread Nadav Har'El
Can you please remind me why we need both OSV_LIBC_API and putting the function name in 5 different files? Isn't there a big risk that later when all this export stuff is less fresh in our mind, we forget one of these 6 places and create a mess? -- Nadav Har'El n...@scylladb.com On Tue, Dec 21,

[osv-dev] [PATCH] libc: implement posix_madvise

2021-12-21 Thread Waldemar Kozaczuk
Some apps/runtimes like dotnet call posix_madvise which we do not implement. This patch adds a simple implementation of it based on madvise with a difference that only POSIX_MADV_DONTNEED is supported. On top of this as required posix_madvise() returns an error without setting errno. Signed-off-by