/*
- * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 1998-2011 Apple Computer, Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
/*! @function IOFree
@abstract Frees memory allocated with IOMalloc.
@discussion This function frees memory allocated with IOMalloc, it may block and so should not be called from interrupt level or while a simple lock is held.
- @param address Pointer to the allocated memory.
- @param size Size of the memory allocated. */
+ @param address Pointer to the allocated memory. Must be identical to result
+ @of a prior IOMalloc.
+ @param size Size of the memory allocated. Must be identical to size of
+ @the corresponding IOMalloc */
void IOFree(void * address, vm_size_t size);
void IOMappedWrite64(IOPhysicalAddress address, UInt64 value);
-/*! @function IOSetProcessorCacheMode
- @abstract Sets the processor cache mode for mapped memory.
- @discussion This function sets the cache mode of an already mapped & wired memory range. Note this may not be supported on I/O mappings or shared memory - it is far preferable to set the cache mode as mappings are created with the IOMemoryDescriptor::map method.
- @param task Task the memory is mapped into.
- @param address Virtual address of the memory.
- @param length Length of the range to set.
- @param cacheMode A constant from IOTypes.h, <br>
- kIOMapDefaultCache to inhibit the cache in I/O areas, kIOMapCopybackCache in general purpose RAM.<br>
- kIOMapInhibitCache, kIOMapWriteThruCache, kIOMapCopybackCache to set the appropriate caching.<br>
- @result An IOReturn code.*/
+/* This function is deprecated. Cache settings may be set for allocated memory with the IOBufferMemoryDescriptor api. */
IOReturn IOSetProcessorCacheMode( task_t task, IOVirtualAddress address,
- IOByteCount length, IOOptionBits cacheMode );
+ IOByteCount length, IOOptionBits cacheMode ) __attribute__((deprecated));
/*! @function IOFlushProcessorCache
@abstract Flushes the processor cache for mapped memory.
void IOPanic(const char *reason) __attribute__((deprecated));
#endif
-struct OSDictionary * IOBSDNameMatching( const char * name );
-struct OSDictionary * IOOFPathMatching( const char * path, char * buf, int maxLen );
+#ifdef __cplusplus
+class OSDictionary;
+#endif
+
+#ifdef __cplusplus
+OSDictionary *
+#else
+struct OSDictionary *
+#endif
+IOBSDNameMatching( const char * name );
+
+#ifdef __cplusplus
+OSDictionary *
+#else
+struct OSDictionary *
+#endif
+IOOFPathMatching( const char * path, char * buf, int maxLen ) __attribute__((deprecated));
/*
* Convert between size and a power-of-two alignment.