1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-12-26 20:05:12 +02:00

ubb-patgen/ubb-patgen.c (dma_pattern): mlockall (before address translation and DMA)

This commit is contained in:
Werner Almesberger 2013-01-14 23:32:37 -03:00
parent c6306ff591
commit dad97398d3

View File

@ -18,6 +18,7 @@
#include <math.h>
#include <time.h>
#include <assert.h>
#include <sys/mman.h>
#include <asm/cachectl.h>
#include <ubb/ubb.h>
@ -361,7 +362,12 @@ static void dma_pattern(const struct mmcclk *clk,
exit(1);
}
buf = parse_pattern(pattern, &n);
if (mlockall(MCL_CURRENT | MCL_FUTURE)) {
perror("mlockall");
exit(1);
}
dma_init();
/* Initial static state: the first pattern. */