summaryrefslogtreecommitdiffstats
path: root/pcilib/kmem.h
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2015-08-05 00:52:55 +0200
committerSuren A. Chilingaryan <csa@suren.me>2015-08-05 00:52:55 +0200
commitb05d6147eb4ccc7527a806506c2154c7795487f6 (patch)
tree28bbafa26a576b1d7896b78de51ed3e5f724e535 /pcilib/kmem.h
parent61068e3ba4863cf41b2399ea3057b3bb1c4a9dcf (diff)
parentedd5ccf24c146915ee475bd223e2ad695520a241 (diff)
downloadpcitool-b05d6147eb4ccc7527a806506c2154c7795487f6.tar.gz
pcitool-b05d6147eb4ccc7527a806506c2154c7795487f6.tar.bz2
pcitool-b05d6147eb4ccc7527a806506c2154c7795487f6.tar.xz
pcitool-b05d6147eb4ccc7527a806506c2154c7795487f6.zip
Integrate locking subsystem from Nicolas Zilio
Diffstat (limited to 'pcilib/kmem.h')
-rw-r--r--pcilib/kmem.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/pcilib/kmem.h b/pcilib/kmem.h
index 8299379..9cd1971 100644
--- a/pcilib/kmem.h
+++ b/pcilib/kmem.h
@@ -1,6 +1,8 @@
#ifndef _PCILIB_KMEM_H
#define _PCILIB_KMEM_H
+#include <stdint.h>
+
typedef struct pcilib_s pcilib_t;
typedef struct pcilib_kmem_list_s pcilib_kmem_list_t;
@@ -14,7 +16,8 @@ typedef enum {
#define PCILIB_KMEM_TYPE_MASK 0xFFFF0000
#define PCILIB_KMEM_USE(type, subtype) ((pcilib_kmem_use_t)(((type) << 16)|(subtype)))
-
+#define PCILIB_KMEM_USE_TYPE(use) (use >> 16)
+#define PCILIB_KMEM_USE_SUBTYPE(use) (use & 0xFFFF)
typedef enum {
PCILIB_KMEM_TYPE_CONSISTENT = 0x00000,
@@ -31,6 +34,7 @@ typedef enum {
PCILIB_KMEM_USE_DMA_RING = 1,
PCILIB_KMEM_USE_DMA_PAGES = 2,
PCILIB_KMEM_USE_SOFTWARE_REGISTERS = 3,
+ PCILIB_KMEM_USE_LOCKS = 4,
PCILIB_KMEM_USE_USER = 0x10
} pcilib_kmem_use_t;