home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.sustworks.com 2018
/
ftp.sustworks.com.zip
/
ftp.sustworks.com
/
USBAx8817x_101.dmg
/
src
/
Source
/
AxOutputQueue.h
< prev
next >
Wrap
C/C++ Source or Header
|
2005-10-08
|
2KB
|
62 lines
#include "IOMbufQueue.h"
extern "C" {
#include <sys/param.h>
#if TIGER
#include <sys/kpi_mbuf.h>
#else
#include "mbufPanther.h"
#endif
}
class AxOutputQueue : public IOOutputQueue {
OSDeclareDefaultStructors( AxOutputQueue )
private:
IOLock *cmdLock;
IOLock *qLock;
UInt32 qState;
UInt32 qCmd;
IOThread qThread;
bool cmdActive;
UInt32 requestedCapacity;
OSObject *_target;
IOOutputAction _action;
IOMbufQueue *inQueue;
int blockingCount;
UInt32 stallCount;
UInt32 outputCount;
UInt32 dropCount;
UInt32 retryCount;
void *wakeConsumer;
static void qThreadEntry(void *ob);
void threadGo();
inline void ackCmdSync();
bool sendCmdSync(UInt32 cmd);
public:
virtual bool init(OSObject * target,
IOOutputAction action,
UInt32 capacity = 0);
static AxOutputQueue * withTarget(IONetworkController * target,
UInt32 capacity = 0);
static AxOutputQueue * withTarget(OSObject * target,
IOOutputAction action,
UInt32 capacity = 0);
virtual UInt32 enqueue(mbuf_t m, void * param);
virtual bool start();
virtual bool stop();
virtual void free();
virtual bool service(IOOptionBits options = 0);
virtual UInt32 flush();
virtual bool setCapacity(UInt32 capacity);
virtual UInt32 getCapacity() const;
virtual UInt32 getSize() const;
virtual UInt32 getDropCount();
virtual UInt32 getOutputCount();
virtual UInt32 getRetryCount();
virtual UInt32 getStallCount();
virtual UInt32 getState() const;
};