diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2015-06-22 18:32:27 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2015-06-22 18:32:27 +0200 |
commit | e2515f6e1a7b17addda4c558a0a6ca05b4ec6e55 (patch) | |
tree | ea63b9499de4abbf7e09c3b6a6952786740be577 /pcilib/kmem.h | |
parent | 87583e6ec5c1961ef975b873041eeada3e1e6c6d (diff) | |
download | pcitool-e2515f6e1a7b17addda4c558a0a6ca05b4ec6e55.tar.gz pcitool-e2515f6e1a7b17addda4c558a0a6ca05b4ec6e55.tar.bz2 pcitool-e2515f6e1a7b17addda4c558a0a6ca05b4ec6e55.tar.xz pcitool-e2515f6e1a7b17addda4c558a0a6ca05b4ec6e55.zip |
Keep C++ compilers happy
Diffstat (limited to 'pcilib/kmem.h')
-rw-r--r-- | pcilib/kmem.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pcilib/kmem.h b/pcilib/kmem.h index ae690fe..8299379 100644 --- a/pcilib/kmem.h +++ b/pcilib/kmem.h @@ -13,7 +13,8 @@ typedef enum { } pcilib_tristate_t; #define PCILIB_KMEM_TYPE_MASK 0xFFFF0000 -#define PCILIB_KMEM_USE(type, subtype) (((type) << 16)|(subtype)) +#define PCILIB_KMEM_USE(type, subtype) ((pcilib_kmem_use_t)(((type) << 16)|(subtype))) + typedef enum { PCILIB_KMEM_TYPE_CONSISTENT = 0x00000, @@ -95,6 +96,10 @@ struct pcilib_kmem_list_s { pcilib_kmem_buffer_t buf; // variable size, should be last item in struct }; +#ifdef __cplusplus +extern "C" { +#endif + pcilib_kmem_handle_t *pcilib_alloc_kernel_memory(pcilib_t *ctx, pcilib_kmem_type_t type, size_t nmemb, size_t size, size_t alignment, pcilib_kmem_use_t use, pcilib_kmem_flags_t flags); void pcilib_free_kernel_memory(pcilib_t *ctx, pcilib_kmem_handle_t *k, pcilib_kmem_flags_t flags); //int pcilib_kmem_sync(pcilib_t *ctx, pcilib_kmem_handle_t *k, pcilib_kmem_sync_direction_t dir); @@ -110,4 +115,8 @@ pcilib_kmem_reuse_state_t pcilib_kmem_is_reused(pcilib_t *ctx, pcilib_kmem_handl int pcilib_clean_kernel_memory(pcilib_t *ctx, pcilib_kmem_use_t use, pcilib_kmem_flags_t flags); +#ifdef __cplusplus +} +#endif + #endif /* _PCILIB_KMEM_H */ |