/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pcilib/kmem.h

  • Committer: Suren A. Chilingaryan
  • Date: 2015-06-22 16:32:27 UTC
  • Revision ID: csa@suren.me-20150622163227-xrajwpfxhequsi7j
Keep C++ compilers happy

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
} pcilib_tristate_t;
14
14
 
15
15
#define PCILIB_KMEM_TYPE_MASK   0xFFFF0000
16
 
#define PCILIB_KMEM_USE(type, subtype) (((type) << 16)|(subtype))
 
16
#define PCILIB_KMEM_USE(type, subtype) ((pcilib_kmem_use_t)(((type) << 16)|(subtype)))
 
17
 
17
18
 
18
19
typedef enum {
19
20
    PCILIB_KMEM_TYPE_CONSISTENT = 0x00000,
95
96
    pcilib_kmem_buffer_t buf;   // variable size, should be last item in struct
96
97
};
97
98
 
 
99
#ifdef __cplusplus
 
100
extern "C" {
 
101
#endif
 
102
 
98
103
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);
99
104
void pcilib_free_kernel_memory(pcilib_t *ctx, pcilib_kmem_handle_t *k, pcilib_kmem_flags_t flags);
100
105
//int pcilib_kmem_sync(pcilib_t *ctx, pcilib_kmem_handle_t *k, pcilib_kmem_sync_direction_t dir);
110
115
 
111
116
int pcilib_clean_kernel_memory(pcilib_t *ctx, pcilib_kmem_use_t use, pcilib_kmem_flags_t flags);
112
117
 
 
118
#ifdef __cplusplus
 
119
}
 
120
#endif
 
121
 
113
122
#endif /* _PCILIB_KMEM_H */