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 11extern "C" { 12#endif 13 14area_id alloc_mem(void **virt, phys_addr_t *phy, size_t size, uint32 protection, 15 const char *name); 16area_id map_mem(void **virt, phys_addr_t phy, size_t size, uint32 protection, 17 const char *name); 18 19status_t sg_memcpy(const physical_entry *sgTable, int sgCount, const void *data, size_t dataSize); 20 21void swap_words(void *data, size_t size); 22 23int fls(unsigned mask); 24 25#ifdef __cplusplus 26} 27#endif 28 29#endif 30