I have a code that reads a file descriptor in an infinite loop.
like :
Code:
{
int fd ;
char buf10[10] = {'\0'} ;
fd = open ("/dev/somePort",O_RDWR);
while(1){
read(fd ,buf10,5 );
//do some operation on buf10
//here i want to clear the system space buffer/cache associated
//with read()
}
}
Is there any system call available in linux which could do that?
Any relevant help would be greatly appreciated.