summaryrefslogtreecommitdiffstats
path: root/kmem.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-07-17 22:47:51 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-07-17 22:47:51 +0200
commitad4a1e15877aff3da889c0c433475d3173a677e4 (patch)
tree541d61b531e71662f7c91d9b56393b80bd80ae47 /kmem.c
parent2c52de4f914806c040f62d9fc3ee88081a7aa56b (diff)
downloadipecamera-ad4a1e15877aff3da889c0c433475d3173a677e4.tar.gz
ipecamera-ad4a1e15877aff3da889c0c433475d3173a677e4.tar.bz2
ipecamera-ad4a1e15877aff3da889c0c433475d3173a677e4.tar.xz
ipecamera-ad4a1e15877aff3da889c0c433475d3173a677e4.zip
Support forceful clean-up of kernel memory
Diffstat (limited to 'kmem.c')
-rw-r--r--kmem.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/kmem.c b/kmem.c
index 0ad9b39..cc84e8c 100644
--- a/kmem.c
+++ b/kmem.c
@@ -17,6 +17,15 @@
#include "kmem.h"
#include "error.h"
+int pcilib_clean_kernel_memory(pcilib_t *ctx, pcilib_kmem_use_t use, pcilib_kmem_flags_t flags) {
+ kmem_handle_t kh = {0};
+ kh.use = use;
+ kh.flags = flags|KMEM_FLAG_MASS;
+
+ return ioctl(ctx->handle, PCIDRIVER_IOC_KMEM_FREE, &kh);
+}
+
+
static int pcilib_free_kernel_buffer(pcilib_t *ctx, pcilib_kmem_list_t *kbuf, size_t i, pcilib_kmem_flags_t flags) {
kmem_handle_t kh = {0};