1 /* 2 ** Copyright 2002/03, Thomas Kurschel. All rights reserved. 3 ** Distributed under the terms of the OpenBeOS License. 4 */ 5 6 /* 7 Functions that are missing in kernel. 8 */ 9 10 #ifndef _KERNEL_EXPORT_EXT_H 11 #define _KERNEL_EXPORT_EXT_H 12 13 #include <KernelExport.h> 14 #include <iovec.h> 15 16 17 // get memory map of iovec 18 status_t get_iovec_memory_map( 19 iovec *vec, // iovec to analyze 20 size_t vec_count, // number of entries in vec 21 size_t vec_offset, // number of bytes to skip at beginning of vec 22 size_t len, // number of bytes to analyze 23 physical_entry *map, // resulting memory map 24 size_t max_entries, // max number of entries in map 25 size_t *num_entries, // actual number of map entries used 26 size_t *mapped_len // actual number of bytes described by map 27 ); 28 29 // map main memory into virtual address space 30 status_t map_mainmemory( 31 addr_t physical_addr, // physical address to map 32 void **virtual_addr // receives corresponding virtual address 33 ); 34 35 // unmap main memory from virtual address space 36 status_t unmap_mainmemory( 37 void *virtual_addr // virtual address to release 38 ); 39 40 41 // this should be moved to SupportDefs.h 42 int32 atomic_exchange(vint32 *value, int32 newValue); 43 44 45 #endif 46