#undef dequeue
#endif
+#define DISABLE_DATAQUEUE_WARNING /* IODataQueue is deprecated, please use IOSharedDataQueue instead */
+
#include <IOKit/IODataQueue.h>
+#undef DISABLE_DATAQUEUE_WARNING
+
typedef struct _IODataQueueEntry IODataQueueEntry;
/*!
ExpansionData * _reserved;
protected:
- virtual void free();
+ virtual void free() APPLE_KEXT_OVERRIDE;
+ /*!
+ * @function getQueueSize
+ * @abstract Returns the size of the data queue.
+ * @discussion Use this method to access the size of the data queue. Do not access the value of size directly, as it can get modified from userspace and is not reliable.
+ * @result Returns the size of the data queue, or zero in case of failure.
+ */
UInt32 getQueueSize();
+
+ /*!
+ * @function setQueueSize
+ * @abstract Stores the value of the size of the data queue.
+ * @discussion Use this method to store the value of the size of the data queue. Do not access the value of size directly, as it can get modified from userspace and is not reliable.
+ * @param size The size of the data queue.
+ * @result Returns true in case of success, false otherwise.
+ */
Boolean setQueueSize(UInt32 size);
public:
* @param size The size of the data queue memory region.
* @result Returns true on success and false on failure.
*/
- virtual Boolean initWithCapacity(UInt32 size);
+ virtual Boolean initWithCapacity(UInt32 size) APPLE_KEXT_OVERRIDE;
/*!
* @function getMemoryDescriptor
* @discussion The IOMemoryDescriptor instance returned by this method is intended to be mapped into a user process. This is the memory region that the IODataQueueClient code operates on.
* @result Returns a newly allocated IOMemoryDescriptor for the IODataQueueMemory region. Returns zero on failure.
*/
- virtual IOMemoryDescriptor *getMemoryDescriptor();
+ virtual IOMemoryDescriptor *getMemoryDescriptor() APPLE_KEXT_OVERRIDE;
/*!
* @function peek
* @param dataSize Size of the data pointed to by data.
* @result Returns true on success and false on failure. Typically failure means that the queue is full.
*/
- virtual Boolean enqueue(void *data, UInt32 dataSize);
+ virtual Boolean enqueue(void *data, UInt32 dataSize) APPLE_KEXT_OVERRIDE;
OSMetaClassDeclareReservedUnused(IOSharedDataQueue, 0);
OSMetaClassDeclareReservedUnused(IOSharedDataQueue, 1);