顯示具有 apple driver 標籤的文章。 顯示所有文章
顯示具有 apple driver 標籤的文章。 顯示所有文章

2009年2月18日 星期三

important type for driver

IOReturn: IOKit/IOReturn.h

IOByteCount: IOKit/IOTypes.h

SCSITaskIdentifier: IOKit/scsi/SCSITask.h

IOBufferMemoryDescriptor: IOKit/IOBufferMemoryDescriptor.h

SCSI_Sense_Data: IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h

UInt64: libkern/OSTypes.h

NULL: string.h

2009年2月10日 星期二

IO flow

AsyncReadWrite  -->  IssueRead  or IssueWrite

2009年1月22日 星期四

combine c and c++ for apple driver

set build option:
gcc 4.0 language -->  compile source as -->  c++

2009年1月21日 星期三

info.plist for driver

IOMatchCategory:
set IODefaultMatchCategory to compare with other driver
the driver with higher probe score will win

2008年7月16日 星期三

IOIteratorNext

iterator must be released

the element got from IOIteratorNext must be released 

ex:

ele= IOIteratorNext(iter)

while(ele != IO_OBJECT_NULL){

   IOObjectRelease(ele);

   ele = IOIteratorNext(iter);

}

IOObjectRelease(iter);

ioclasscount

the instance count of the class

useful for tracking leaks