code: 9ferno

ref: 58055b9e3a8c6df1cd128a3d4ed3667eab94e472
dir: /emu/Linux/segflush-arm.c/

View raw version
#include <sys/types.h>
#include <sys/syscall.h>

#include "dat.h"

#define	SYS_cacheflush	__ARM_NR_cacheflush

int
segflush(void *a, ulong n)
{
	if(n)
		syscall(SYS_cacheflush, a, (char*)a+n-1, 1);
	return 0;
}