xref: /haiku/src/add-ons/kernel/busses/scsi/ahci/util.h (revision 1b8f7f13a3dc70e0e903cb94248220b40b732204)
1 /*
2  * Copyright 2004-2007, Marcus Overhagen. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef __UTIL_H
6 #define __UTIL_H
7 
8 #include <KernelExport.h>
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 area_id alloc_mem(void **virt, void **phy, size_t size, uint32 protection, const char *name);
15 area_id map_mem(void **virt, void *phy, size_t size, uint32 protection, const char *name);
16 
17 status_t sg_memcpy(const physical_entry *sgTable, int sgCount, const void *data, size_t dataSize);
18 
19 void swap_words(void *data, size_t size);
20 
21 #ifdef __cplusplus
22 }
23 #endif
24 
25 #endif
26