From 1f0020e1083d252d9403df72a600441836beadf9 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Fri, 8 Nov 2013 13:06:38 +0000 Subject: [PATCH] demo/ao_mmap: remove msync() call The msync() call doesn't seem to work on Comedi devices, and seems a bit pointless anyway, as it is meant for use on files with a backing store. Remove it. --- demo/ao_mmap.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/demo/ao_mmap.c b/demo/ao_mmap.c index b295938..520a74a 100644 --- a/demo/ao_mmap.c +++ b/demo/ao_mmap.c @@ -137,11 +137,6 @@ int main(int argc, char *argv[]) } num_samples = size / sizeof(sampl_t); write_waveform(map, num_samples, amplitude, offset, maxdata); - if(msync(map, size, MS_SYNC) < 0) - { - perror("msync"); - exit(1); - } printf("marking %i samples as written\n", num_samples); ret = comedi_mark_buffer_written(dev, options.subdevice, size); if(ret < 0)