Explicitly Flushing Asynchronous Streams
Posted:
Hi,
We are currently working on the CentOS 7 Linux distribution, and are trying to explicitly flush asynchronous downstreams. We are following the Xillybus host programming guide and using a zero length write():
Calling this function gives the following error:
It seems that it is possible to configure a program to allow zero-length writes using ioctl(), but we are unable to figure out how to do this on the CentOS7 Linux distribution. Any help would be greatly appreciated. Thanks!
We are currently working on the CentOS 7 Linux distribution, and are trying to explicitly flush asynchronous downstreams. We are following the Xillybus host programming guide and using a zero length write():
- Code: Select all
while (1) {
rc = write(xb_struct.fdw32, NULL, 0);
if ( (rc < 0) && (errno == EINTR)) {
continue;
}
if (rc < 0) {
perror("write() failed");
break;
}
break; //flush successful
}
Calling this function gives the following error:
- Code: Select all
write() failed : Bad Address
It seems that it is possible to configure a program to allow zero-length writes using ioctl(), but we are unable to figure out how to do this on the CentOS7 Linux distribution. Any help would be greatly appreciated. Thanks!