本文整理汇总了C++中DOUT函数的典型用法代码示例。如果您正苦于以下问题:C++ DOUT函数的具体用法?C++ DOUT怎么用?C++ DOUT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DOUT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PAGED_CODE
/*****************************************************************************
* AddDevice
*****************************************************************************
* This function is called by the operating system when the device is added.
* All adapter drivers can use this code without change.
*/
NTSTATUS AddDevice
(
IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT PhysicalDeviceObject
)
{
PAGED_CODE ();
DOUT (DBG_PRINT, ("[AddDevice]"));
// disable prefast warning 28152 because
// DO_DEVICE_INITIALIZING is cleared in PcAddAdapterDevice
#pragma warning(disable:28152)
#ifdef XEN
NTSTATUS ntStatus = XenInitialize(PhysicalDeviceObject);
if (!NT_SUCCESS (ntStatus))
return ntStatus;
#endif
//
// Tell portcls (the class driver) to add the device.
//
return PcAddAdapterDevice (DriverObject,
PhysicalDeviceObject,
(PCPFNSTARTDEVICE)StartDevice,
MAX_MINIPORTS,
0);
}
示例2: _logTree
void Layer::logTree()
{
u32 depth = 0;
_numLayers = 0;
_logTree(depth, this);
DOUT("num layers:"<<_numLayers);
}
示例3: assert
struct cos_cbuf_item *free_mem_in_local_cache(struct spd_tmem_info *sti)
{
spdid_t s_spdid;
struct cos_cbuf_item *cci = NULL, *list;
assert(sti);
s_spdid = sti->spdid;
DOUT("\n Check if in local cache!!!");
list = &spd_tmem_info_list[s_spdid].tmem_list;
/* Go through the allocated cbufs, and see if any are not in use... */
for (cci = FIRST_LIST(list, next, prev) ;
cci != list;
cci = FIRST_LIST(cci, next, prev)) {
union cbuf_meta cm;
cm.c_0.v = cci->entry->c_0.v;
if (!CBUF_IN_USE(cm.c.flags)) goto done;
}
if (cci == list) goto err;
done:
/* DOUT("\n hehe found one!!\n\n"); */
return cci;
err:
/* DOUT("\n can not found one!!\n"); */
cci = NULL;
return cci;
}
示例4: mgr_map_client_mem
// all cbufs that created for this component
void mgr_map_client_mem(struct cos_cbuf_item *cci, struct spd_tmem_info *sti)
{
char *l_addr, *d_addr;
spdid_t d_spdid;
// struct cb_desc *d;
assert(sti && cci);
assert(EMPTY_LIST(cci, next, prev));
d_spdid = sti->spdid;
/* TODO: multiple pages cbuf! */
d_addr = valloc_alloc(cos_spd_id(), sti->spdid, 1);
l_addr = cci->desc.addr; //initialized in cos_init()
assert(d_addr && l_addr);
/* ...map it into the requesting component */
if (unlikely(!mman_alias_page(cos_spd_id(), (vaddr_t)l_addr, d_spdid, (vaddr_t)d_addr)))
goto err;
/* DOUT("<<<MAPPED>>> mgr addr %p client addr %p\n ",l_addr, d_addr); */
cci->desc.owner.addr = (vaddr_t)d_addr;
cci->parent_spdid = d_spdid;
assert(cci->desc.cbid == 0);
// add the cbuf to shared vect here? now we do it in the client.
// and l_addr and d_addr has been assinged
done:
return;
err:
DOUT("Cbuf mgr: Cannot alias page to client!\n");
mman_release_page(cos_spd_id(), (vaddr_t)l_addr, 0);
/* valloc_free(cos_spd_id(), cos_spd_id(), l_addr, 1); */
valloc_free(cos_spd_id(), d_spdid, (void *)d_addr, 1);
goto done;
}
示例5: mgr_remove_client_mem
static void
mgr_remove_client_mem(struct spd_tmem_info *sti, struct cos_cbuf_item *cci)
{
__cbuf_c_delete(sti, cci->desc.cbid, &cci->desc);
/* DOUT("after buf del before map del\n"); */
cos_map_del(&cb_ids, cci->desc.cbid);
DOUT("fly..........cbid is %d\n", cci->desc.cbid);
cci->desc.cbid = 0;
cci->parent_spdid = 0;
// Clear our memory to prevent leakage
memset(cci->desc.addr, 0, PAGE_SIZE);
/* printc("Removing from local list\n"); */
REM_LIST(cci, next, prev);
/* TODO: move all of this into the tmem generic code just like the ++s */
sti->num_allocated--;
if (sti->num_allocated == 0) empty_comps++;
if (sti->num_allocated >= sti->num_desired) over_quota_total--;
assert(sti->num_allocated == tmem_num_alloc_tmems(sti->spdid));
}
示例6: kvar_print_vars
void kvar_print_vars(kvar_storage_ptr store)
{
DOUT("kvar_print_vars: dumping all variables\n");
int index,index2;
kvar_array_ptr arr;
for (index = 0; index < MAX_VARS; index++)
{
if (store->vars[index].content != NULL)
{
switch (store->vars[index].content->type)
{
case kvar_type_number:
{
printf("%s: %d\n", store->vars[index].name, store->vars[index].content->number);
} break;
case kvar_type_array:
{
printf("%s: [", store->vars[index].name);
arr = store->vars[index].content->array;
for (index2 = 0; index2 < arr->length-1; index2++)
{
printf("%d,", arr->array[index2]);
}
printf("%d]\n", arr->array[index2]);
} break;
}
}
}
}
示例7: shmalloc
stat_t
SelfHealingSessionServer::HandleConnect(const L4_ThreadId_t& tid, L4_Msg_t& msg)
{
ENTER;
L4_Word_t reg[2];
addr_t shm = shmalloc(Session::DEFAULT_SHM_PAGES);
DOUT("shm allocate @ %.8lX\n", shm);
if (shm == 0) {
return ERR_OUT_OF_MEMORY;
}
//TODO: Hack: Related to a problem in PersistentPageAllocator.cpp
for (UInt i = 0; i < Session::DEFAULT_SHM_PAGES; i++) {
Pager.Release(shm + i * PAGE_SIZE);
}
for (UInt i = 0; i < Session::DEFAULT_SHM_PAGES; i++) {
Pager.Reserve(shm + i * PAGE_SIZE, tid, L4_ReadWriteOnly);
}
reg[0] = shm;
reg[1] = Session::DEFAULT_SHM_PAGES;
L4_Put(&msg, 0, 2, reg, 0, 0);
Register(tid, reg[0], reg[1]);
EXIT;
return ERR_NONE;
}
示例8: GetOurParentWindow
/*!
* \return The HWND of the main application window, if it can be identified.
* Otherwise NULL is returned.
*/
HWND GetOurParentWindow(void)
{
//! Silly nested class so that we can define a local function.
class foo {
foo() {};
public:
static BOOL CALLBACK GOPWEnumWindowsProc(
HWND hwnd, //!< handle to parent window
LPARAM lParam //!< application-defined value
)
{
char szClassName[64];
if ( GetClassName(hwnd, szClassName, sizeof(szClassName)) &&
(strcmp(szClassName, "mIRC32") == 0 || strcmp(szClassName, "mIRC") == 0)
)
{
DWORD windowpid;
GetWindowThreadProcessId(hwnd, &windowpid);
if (windowpid == GetCurrentProcessId()) {
// Found the window that is from our process.
*reinterpret_cast<HWND*>(lParam) = hwnd;
return FALSE; // done enumerating.
}
}
return TRUE; // continue enumerating.
}
};
// Actually do the enumeration call.
HWND hWnd = NULL;
EnumWindows(foo::GOPWEnumWindowsProc, (LPARAM) &hWnd);
DOUT(("GetOurParentWindow: found hwnd %p\n", hWnd));
return hWnd;
}
示例9: DOUT
void EventSystem::logViewStack(const vector<View*>& vs)
{
for(auto v : vs)
{
DOUT("-> "<<v->name());
}
}
示例10: DOUT
// Cue
//
BOOL WaveFile::Cue (void)
{
BOOL fRtn = SUCCESS; // assume success
DOUT ("WaveFile::Cue\n\r");
// Seek to 'data' chunk from beginning of file
if (mmioSeek (m_hmmio, m_mmckiRiff.dwDataOffset + sizeof(FOURCC), SEEK_SET) != -1)
{
// Descend into 'data' chunk
m_mmckiData.ckid = mmioFOURCC('d', 'a', 't', 'a');
if ((m_mmr = mmioDescend (m_hmmio, &m_mmckiData, &m_mmckiRiff, MMIO_FINDCHUNK)) == MMSYSERR_NOERROR)
{
// Reset byte counter
m_nBytesPlayed = 0;
}
else
{
// UNDONE: set m_mmr
fRtn = FALSE;
}
}
else
{
// mmioSeek error
m_mmr = MMIOERR_CANNOTSEEK;
fRtn = FALSE;
}
return fRtn;
}
示例11: DOUT
//
// This method binds the parameter to a specified value, updating the worklist
// Binding a value updates any combination zeros it completes as a side effect
// Binding a value also adds items to work list as a side effect
//
bool Parameter::Bind(int value, WorkList& worklist)
{
DOUT(L"Binding " << m_name << L" to value " << value << L".\n");
assert(!m_bound);
assert(value < m_valueCount);
m_result.push_back(value);
m_currentValue = value;
m_bound = true;
for( auto & combination : m_combinations )
{
if( combination->AddBinding() == combination->GetParameterCount() - 1 )
{
// Add any parameter that completes a combination to work list
for( int n = 0; n < combination->GetParameterCount(); ++n )
{
if( !( (*combination)[ n ] ).GetBoundCount() )
{
worklist.AddItem( &( *combination )[ n ] );
}
}
}
}
worklist.Print();
return true;
}
示例12: _logTree
void View::logTree()
{
u32 depth = 0;
_numViews = 0;
_logTree(depth, this);
DOUT("num view:"<<_numViews);
}
示例13: DOUT
void Application::finalize()
{
DOUT("Application::finalize()");
XFree((void *) hiddenMembers->WM_WAKEUP);
XCloseDisplay(hiddenMembers->display);
delete hiddenMembers;
}
示例14: DOUT
void Device::initWithDeviceId(const string& inDeviceId)
{
DOUT("opening device: "<<inDeviceId);
device = alcOpenDevice(inDeviceId.c_str());ALDEBUG_THROW;
if(!device)
THROW_RTE("aclOpenDevice returned NULL for id: "+inDeviceId);
deviceId = inDeviceId;
}
示例15: __declspec
//! Method exported to mIRC that can be invoked to subclass a specified
//! window (by hwnd) and make its window frame blue.
extern "C" int __declspec(dllexport) __stdcall blue_window(
HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause)
{
DOUT(("mIRC callback for blue_window invoked\n"));
if (data != NULL) {
HWND hwnd = (HWND) LongToHandle(atoi(data));
bool bResult = BlueWindow::SubclassNewWindow(hwnd);
if (bResult) {
DOUT(("blue_window successfully subclassed new window %p\n", (void*) hwnd));
} else {
DOUT(("blue_window failed to subclass new window.\n"));
}
}
return 1; // mIRC should just continue executing.
}