From 7ac0539951ff0eba200e64b850b5181a82915c86 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sat, 16 Jul 2011 06:18:05 +0200 Subject: Implement DMA access synchronization in the driver --- driver/pciDriver.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'driver/pciDriver.h') diff --git a/driver/pciDriver.h b/driver/pciDriver.h index 3ff3357..9aa580f 100644 --- a/driver/pciDriver.h +++ b/driver/pciDriver.h @@ -99,6 +99,18 @@ /* Maximum number of interrupt sources */ #define PCIDRIVER_INT_MAXSOURCES 16 + +#define KMEM_FLAG_REUSE 1 /**< Try to reuse existing buffer with the same use & item */ +#define KMEM_FLAG_EXCLUSIVE 2 /**< Allow only a single application accessing a specified use & item */ +#define KMEM_FLAG_PERSISTENT 4 /**< Sets persistent mode */ +#define KMEM_FLAG_HW 8 /**< The buffer may be accessed by hardware, the hardware access will not occur any more if passed to _free function */ + +#define KMEM_FLAG_REUSED 1 /**< Indicates if buffer with specified use & item was already allocated and reused */ +#define KMEM_FLAG_REUSED_PERSISTENT 4 /**< Indicates that reused buffer was persistent before the call */ +#define KMEM_FLAG_REUSED_HW 8 /**< Indicates that reused buffer had a HW reference before the call */ + + + /* Types */ typedef struct { unsigned long type; @@ -107,7 +119,7 @@ typedef struct { unsigned long align; unsigned long use; unsigned long item; - int reuse; + int flags; int handle_id; } kmem_handle_t; -- cgit v1.2.3