本文整理汇总了C++中DumpDebug函数的典型用法代码示例。如果您正苦于以下问题:C++ DumpDebug函数的具体用法?C++ DumpDebug怎么用?C++ DumpDebug使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DumpDebug函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: adpIsHalted
// sangam dbg : used by the set and query info but linux not supported
// is adapter halted?
BOOLEAN adpIsHalted(PMINIPORT_ADAPTER Adapter)
{
int i;
PMINIPORT_ADAPTER* p = g_Adapters;
ENTER;
// check first one
if (*p == Adapter) {
// found
if (g_HaltedFlags[0]) {
DumpDebug(HARDWARE, " Adapter (%lu, 0) halted: YES", (unsigned long)Adapter);
}
return g_HaltedFlags[0];
}
p++;
// check others
for (i = 1; i < ADAPTER_MAX_NUMBER; i++, p++) {
if (*p == Adapter) {
// found
if (g_HaltedFlags[i]) {
DumpDebug(HARDWARE, " Adapter (%lu, %d) halted: YES", (unsigned long)Adapter, i);
}
return g_HaltedFlags[i];
}
}
DumpDebug(HARDWARE, "Adapter (%lu) halted (removed): YES", (unsigned long)Adapter);
// not found, assume that it was removed already
return TRUE;
}
示例2: hwRemove
VOID hwRemove(MINIPORT_ADAPTER *Adapter)
{
PBUFFER_DESCRIPTOR dsc;
ENTER;
//sangam :Free the pending data packets and control packets
while(!QueueEmpty(Adapter->hw.Q_Send.Head)) { //sangam dbg : used only for data packet so free skb
DumpDebug(DISPATCH, "<1> Freeing Q_Send");
dsc = (PBUFFER_DESCRIPTOR) QueueGetHead(Adapter->hw.Q_Send.Head);
if (!dsc) {
DumpDebug(DISPATCH, "<1> Fail...node is null");
continue;
}
QueueRemoveHead(Adapter->hw.Q_Send.Head);
if(dsc->Buffer)
kfree(dsc->Buffer);
if(dsc)
kfree(dsc);
}
// stop data out buffer
// if (Adapter->hw.ReceiveBuffer!= NULL)
// kfree(Adapter->hw.ReceiveBuffer);
// stop TempData out buffer
#if 0 //cky 20100624
if (Adapter->hw.ReceiveTempBuffer!= NULL)
kfree(Adapter->hw.ReceiveTempBuffer);
#endif
hwGPIODeInit();
LEAVE;
}
示例3: DoConvolution
void
DoConvolution(FFT_DATA_TYPE *FFTNum,int Cache,size_t Len2)
{
StartTimer(ConvTime);
if (Cache==-2) /* In memory convolution of both nums */
{FFT_DATA_TYPE *FFTNum2=FFTNum+Len2;
DumpDebug("Cm...");
DoScrambledFHTConv(FFTNum,FFTNum2,Len2);
}
else if (Cache==-1) /* In memory self convolution. */
{
DumpDebug("C");
DoScrambledFHTConv(FFTNum,FFTNum,Len2);
}
#ifdef VIRTUAL_CACHE
else /* Virtual Mem based convolution. */
{FFT_DATA_TYPE *Num1=FFTNum;
FFT_DATA_TYPE *Num2=FFTCash[Cache].Mem;
if (Num2==NULL)
FatalError("Cache %d doesn't exist.\n",Cache);
DumpDebug("C%d...",Cache);
DoScrambledFHTConv(Num1,Num2,Len2);
}
#else
#error
#if 0
/*
** Eyuk! What a kludge!
*/
else
{FILE *f;FFT_DATA_TYPE h1p,h1m;
示例4: localFreeOffscreenLinear
static void
localFreeOffscreenLinear(FBLinearPtr linear)
{
FBManagerPtr offman;
FBLinearLinkPtr pLink, pLinkPrev = NULL;
ScreenPtr pScreen = linear->pScreen;
offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates,
xf86FBScreenKey);
pLink = offman->LinearAreas;
if (!pLink)
return;
while (&(pLink->linear) != linear) {
pLinkPrev = pLink;
pLink = pLink->next;
if (!pLink)
return;
}
if (pLink->area) { /* really an XY area */
DebugF("FREEING AREA\n");
localFreeOffscreenArea(pLink->area);
if (pLinkPrev)
pLinkPrev->next = pLink->next;
else
offman->LinearAreas = pLink->next;
free(pLink);
DumpDebug(offman->LinearAreas);
return;
}
pLink->free = 1;
if (pLink->next && pLink->next->free) {
FBLinearLinkPtr p = pLink->next;
pLink->linear.size += p->linear.size;
pLink->next = p->next;
free(p);
}
if (pLinkPrev) {
if (pLinkPrev->next && pLinkPrev->next->free && !pLinkPrev->area) {
FBLinearLinkPtr p = pLinkPrev->next;
pLinkPrev->linear.size += p->linear.size;
pLinkPrev->next = p->next;
free(p);
}
}
DebugF("FREEING LINEAR\n");
DumpDebug(offman->LinearAreas);
}
示例5: hwSetInterface
void hwSetInterface()
{
ENTER;
g_dwLineState = WimaxMode();
s3c_gpio_cfgpin(WIMAX_WAKEUP, S3C_GPIO_SFN(1));
s3c_gpio_cfgpin(WIMAX_IF_MODE0, S3C_GPIO_SFN(1));
if(g_dwLineState == SDIO_MODE)
{
gpio_set_value(WIMAX_WAKEUP, GPIO_LEVEL_HIGH);
gpio_set_value(WIMAX_IF_MODE0, GPIO_LEVEL_HIGH);
msleep(10);
DatadwValue = 1;
ControldwValue = 1;
DumpDebug(HARDWARE, "Interface mode SDIO_MODE");
}
else if(g_dwLineState == WTM_MODE || g_dwLineState == AUTH_MODE)
{
gpio_set_value(WIMAX_WAKEUP, GPIO_LEVEL_LOW);
gpio_set_value(WIMAX_IF_MODE0, GPIO_LEVEL_LOW);
msleep(10);
DatadwValue = 0;
ControldwValue = 0;
DumpDebug(HARDWARE, "Interface mode WTM_MODE || AUTH_MODE");
}
else if(g_dwLineState == DM_MODE)
{
gpio_set_value(WIMAX_WAKEUP, GPIO_LEVEL_HIGH);
gpio_set_value(WIMAX_IF_MODE0, GPIO_LEVEL_LOW);
msleep(10);
DumpDebug(HARDWARE, "Interface mode DM_MODE");
}
else if(g_dwLineState == USB_MODE || g_dwLineState == USIM_RELAY_MODE)
{
gpio_set_value(WIMAX_WAKEUP, GPIO_LEVEL_LOW);
gpio_set_value(WIMAX_IF_MODE0, GPIO_LEVEL_HIGH);
msleep(10);
DatadwValue = 1;
ControldwValue = 0;
DumpDebug(HARDWARE, "Interface mode USB_MODE (USIM_RELAY)");
}
LEAVE;
}
示例6: hwInit
INT hwInit(MINIPORT_ADAPTER *Adapter)
{
ENTER;
static PVOID ReceiveBuffer = NULL; //cky 20100624
if(!hwGPIOInit())
{
DumpDebug(DISPATCH, "hwInit: Can't intialize GPIO");
return STATUS_UNSUCCESSFUL;
}
if (ReceiveBuffer == NULL)
{
DumpDebug(DISPATCH, "Alloc ReceiveBuffer");
ReceiveBuffer = kmalloc(SDIO_BUFFER_SIZE+8, GFP_KERNEL); //sumanth: the extra space required to copy ethernet header
if (ReceiveBuffer == NULL)
{
DumpDebug(DISPATCH, "kmalloc fail!!");
return -ENOMEM;
}
}
else
{
DumpDebug(DISPATCH, "ReceiveBuffer already allocated - skip");
}
memset(&Adapter->hw,0,sizeof(HARDWARE_INFO));
/* Adapter->hw.ReceiveBuffer= kmalloc(SDIO_BUFFER_SIZE, GFP_ATOMIC);
if(Adapter->hw.ReceiveBuffer ==NULL) {
return -ENOMEM;
}*/ //sumanth: this buffer is not logically required hence it is eliminated
#if 1 //cky 20100624
Adapter->hw.ReceiveTempBuffer = ReceiveBuffer;
#else
Adapter->hw.ReceiveTempBuffer= kmalloc(SDIO_BUFFER_SIZE+8, GFP_ATOMIC); //sumanth: the extra space required to copy ethernet header
if(Adapter->hw.ReceiveTempBuffer ==NULL) {
// if(Adapter->hw.ReceiveBuffer) //sumanth no point in freeing a NULL pointer
// kfree(Adapter->hw.ReceiveTempBuffer);
return -ENOMEM;
}
#endif
// For sending data and control packets
QueueInitList(Adapter->hw.Q_Send.Head);
spin_lock_init(&Adapter->hw.Q_Send.Lock);
INIT_WORK(&Adapter->work, hwTransmitThread);
init_waitqueue_head(&Adapter->hFWDNEndEvent);
init_completion(&Adapter->hAwakeAckEvent);
return STATUS_SUCCESS;
LEAVE;
}
示例7: GetMacAddress
/* get MAC address from device */
VOID GetMacAddress(MINIPORT_ADAPTER *Adapter)
{
UINT nCount = 0;
int nResult = 0;
HW_PRIVATE_PACKET req;
ENTER;
req.Id0 = 'W';
req.Id1 = 'P';
req.Code = HwCodeMacRequest;
req.Value = 0;
Adapter->acquired_mac_address = FALSE;
do {
if(Adapter->bHaltPending)
return;
sdio_claim_host(Adapter->func);
//nResult = sdio_memcpy_toio(Adapter->func,SDIO_DATA_PORT_REG, &req, sizeof(HW_PRIVATE_PACKET));
nResult = sd_send(Adapter, &req, sizeof(HW_PRIVATE_PACKET));
if(nResult != 0)
DumpDebug(DRV_ENTRY,"Send GetMacAddress Request msg but error occurred!! res = %d",nResult);
sdio_release_host(Adapter->func);
if(!wait_for_completion_interruptible_timeout(&Adapter->hFWInitCompleteEvent, msecs_to_jiffies(HARDWARE_START_TIMEOUT))) {
DumpDebug(DRV_ENTRY, "timedout mac req, retry..");
if(nCount >= HARDWARE_MAX_MAC_RESPONSES || Adapter->bHaltPending == TRUE) {
DumpDebug(DRV_ENTRY,"Can't get mac address, exceeded number of retries (%d)",nCount);
Adapter->bHaltPending = TRUE;
wake_up_interruptible(&Adapter->hFWDNEndEvent);
gpio_wimax_poweroff();
gpio_wimax_poweron();
break;
}
nCount++;
continue;
}
// If wait exit before timeout then mac assigned or surprise remove
if(Adapter->acquired_mac_address == TRUE) {
DumpDebug(DRV_ENTRY,"MAC Address acquired");
break;
}
// msleep(500);
} while(TRUE);
return;
LEAVE;
}
示例8: DoConvolutions
static void
DoConvolutions(int Cache,size_t FFTLen2,size_t StartP, size_t EndP)
{size_t Pass;
ModInt *Num1,*Num2;
StartTimer(ConvTime);
if (Cache==-2) /* In memory convolution of both nums */
{ModInt *FFTNum2=FFTNum+FFTLen2*NPrimes;
DumpDebug("Cm...");
for (Pass=StartP;Pass < EndP;Pass++)
{
SetModPrime(Pass);
Num1=FFTNum+FFTLen2*(Pass-StartP);
Num2=FFTNum2+FFTLen2*(Pass-StartP);
PrepVector(Prime,FFTLen2);
VectorModMul( Num1, Num2, FFTLen2);
}
}
else if (Cache==-1) /* In memory self convolution. */
{
DumpDebug("C");
for (Pass=StartP;Pass < EndP;Pass++)
{
SetModPrime(Pass);
Num1=FFTNum+FFTLen2*(Pass-StartP);
PrepVector(Prime,FFTLen2);
VectorModMul( Num1, Num1, FFTLen2);
}
}
#ifdef VIRTUAL_CACHE
else /* Virtual Mem based convolution. */
{
Num1=FFTNum;
Num2=(ModInt*)FFTCash[Cache].Mem;
if (Num2==NULL)
FatalError("Cache %d doesn't exist.\n",Cache);
DumpDebug("C%d...",Cache);
for (Pass=StartP;Pass < EndP;Pass++)
{
SetModPrime(Pass);
PrepVector(Prime,FFTLen2);
VectorModMul( Num1, Num2, FFTLen2);
Num1+=FFTLen2;Num2+=FFTLen2;
}
}
#else
else /* Disk based convolution. */
{FILE *f;
示例9: proc_write_sleepmode
static int proc_write_sleepmode(struct file *foke, const char *buffer, unsigned long count, void *data)
{
if (buffer[0] == '0' && g_dwSleepMode == 1)
{
DumpDebug("WiMAX Sleep Mode: VI");
g_dwSleepMode = 0;
}
else if (buffer[0] == '1' && g_dwSleepMode == 0)
{
DumpDebug("WiMAX Sleep Mode: IDLE");
g_dwSleepMode = 1;
}
return 0;
}
示例10: SendCmdPacket
BOOLEAN SendCmdPacket(PMINIPORT_ADAPTER Adapter, unsigned short uiCmdId)
{
PHW_PACKET_HEADER pPktHdr;
UCHAR pTxPkt[CMD_MSG_TOTAL_LENGTH];
UINT uiBufOffset;
PWIMAX_MESSAGE_HEADER pWibroMsgHdr;
int status = 0;
UINT dwTxSize;
pPktHdr = (PHW_PACKET_HEADER)pTxPkt;
pPktHdr->Id0 = 'W';
pPktHdr->Id1 = 'C';
pPktHdr->Length = be16_to_cpu(CMD_MSG_TOTAL_LENGTH);
uiBufOffset = sizeof(HW_PACKET_HEADER);
pWibroMsgHdr = (PWIMAX_MESSAGE_HEADER)(pTxPkt + uiBufOffset);
pWibroMsgHdr->MsgType = be16_to_cpu(ETHERTYPE_DL);
pWibroMsgHdr->MsgID = be16_to_cpu(uiCmdId);
pWibroMsgHdr->MsgLength = be32_to_cpu(CMD_MSG_LENGTH);
dwTxSize = CMD_MSG_TOTAL_LENGTH;
status = sd_send(Adapter, pTxPkt, dwTxSize);
if(status != STATUS_SUCCESS) {
// crc error or data error - set PCWRT '1' & send current type A packet again
DumpDebug(FW_DNLD, "hwSdioWrite : crc error");
return status;//goto rewrite;
}
return status;
}
示例11: LoadWiMaxImage
int LoadWiMaxImage(void)
{
DWORD dwImgSize;
unsigned long buforder;
struct file *fp;
int read_size = 0;
if ( g_dwLineState == AUTH_MODE)
{
fp = klib_fopen(WIMAX_LOADER_PATH, O_RDONLY, 0); // download mode
}
else
{
fp = klib_fopen(WIMAX_IMAGE_PATH, O_RDONLY, 0); // wimax mode
}
if(fp)
{
if (g_stWiMAXImage.pImage == NULL) // check already allocated
{
g_stWiMAXImage.pImage = (char *) vmalloc(MAX_WIMAXFW_SIZE);
if(!g_stWiMAXImage.pImage)
{
DumpDebug(HARDWARE, "Error: Memory alloc failure");
klib_fclose(fp);
return STATUS_UNSUCCESSFUL;
}
}
memset(g_stWiMAXImage.pImage, 0, MAX_WIMAXFW_SIZE);
read_size = klib_flen_fcopy(g_stWiMAXImage.pImage, MAX_WIMAXFW_SIZE, fp);
g_stWiMAXImage.uiSize = read_size;
g_stWiMAXImage.uiWorkAddress = CMC730_WIBRO_ADDRESS;
g_stWiMAXImage.uiOffset = 0;
g_stWiMAXImage.buforder = buforder;
klib_fclose(fp);
}
else {
DumpDebug(HARDWARE, "Error: WiMAX image file open failed");
return STATUS_UNSUCCESSFUL;
}
return STATUS_SUCCESS;
}
示例12: hwStart
INT hwStart(MINIPORT_ADAPTER *Adapter)
{
ENTER;
if(LoadWiMaxImage())
return STATUS_UNSUCCESSFUL;
Adapter->WibroStatus = WIBRO_STATE_READY;
Adapter->IPRefreshing = FALSE;
Adapter->bFWDNEndFlag = FALSE;
if(Adapter->DownloadMode)
{
// wimax_download_start_time = jiffies;
sdio_claim_host(Adapter->func);
SendCmdPacket(Adapter, MSG_DRIVER_OK_REQ);
sdio_release_host(Adapter->func);
switch( wait_event_interruptible_timeout(Adapter->hFWDNEndEvent, (Adapter->bFWDNEndFlag == TRUE), msecs_to_jiffies(FWDOWNLOAD_TIMEOUT*wimax_timeout_multiplier) ) )
{
// timeout
case 0:
Adapter->bHaltPending = TRUE;
DumpDebug(HARDWARE, "Error hwStart : F/W Download timeout failed");
return STATUS_UNSUCCESSFUL;
// Interrupted by signal
case -ERESTARTSYS:
DumpDebug(HARDWARE, "Error hwStart : -ERESTARTSYS retry");
return STATUS_UNSUCCESSFUL;
// normal condition check
default:
if (Adapter->SurpriseRemoval == TRUE || Adapter->bHaltPending == TRUE)
{
DumpDebug(HARDWARE, "Error hwStart : F/W Download surprise removed");
return STATUS_UNSUCCESSFUL;
}
DumpDebug(HARDWARE, "hwStart : F/W Download Complete");
break;
}
Adapter->DownloadMode = FALSE;
}
LEAVE;
return STATUS_SUCCESS;
}
示例13: proc_read_dump
static int proc_read_dump(char *page, char **start, off_t off, int count, int *eof, void *data)
{
DumpDebug("CONTROL_IOCTL_WIMAX_CHECK_CAL");
gpio_wimax_poweroff();
//WIMAX_Check_Cal();
return 0;
}
示例14: DumpMemConfig
void DumpMemConfig(FRConfig * Config, const char * Conf)
{
FILE * ConfigFile = fopen(Conf,"w");
DumpDebug(&Config->Debug,ConfigFile);
DumpPreferences(&Config->Preferences,ConfigFile);
DumpSound(&Config->Sound,ConfigFile);
DumpSystem(&Config->System,ConfigFile);
fclose(ConfigFile);
}
示例15: WimaxMode
int WimaxMode(void)
{
struct file *fp;
int mode = -1;
fp = klib_fopen("/proc/wmxmode/mode", O_RDONLY, 0);
if(fp != NULL)
{
mode = klib_fgetc(fp);
DumpDebug(HARDWARE, "Mode = %d", mode);
klib_fclose(fp);
}
else
{
DumpDebug(HARDWARE, "Mode access failed!!!");
}
return mode;
}