PATCH: Enable posix_fadvise for ARM

David J. Fiddes D.J at fiddes.net
Sun Feb 25 13:09:12 UTC 2007


Hi,

I work on an embedded video recorder application that uses posix_fadvise
to get Linux to push recently written video to disk to reduce cache
pollution. I noticed that there was quite a difference in the behaviour
of my x86 and ARM versions. I tracked this down to the problem that
neither __NR_fadvise64 nor __NR_fadvise64_64 syscalls exist on the ARM
platform due to problems with OABI/EABI compatibility.

The attached patch implements posix_fadvise() and posix_fadvise64() in
terms of the ARM __NR_arm_fadvise64_64 syscall which swaps the
parameters about. I've grepped the Linux kernel and this is the only
architecture which does this sort of thing for posix_fadvise().

I've tested this with my application and gcc 4.1.2 and it works very
well.

Dave
-- 
David J. Fiddes <D.J at fiddes.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: posix_fadvise.diff
Type: text/x-patch
Size: 2384 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20070225/02d49f9c/attachment-0002.bin 


More information about the uClibc mailing list