本文整理汇总了C++中dbgmsg函数的典型用法代码示例。如果您正苦于以下问题:C++ dbgmsg函数的具体用法?C++ dbgmsg怎么用?C++ dbgmsg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dbgmsg函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: tr_peerIoUnrefImpl
void
tr_peerIoUnrefImpl( const char * file, int line, tr_peerIo * io )
{
assert( tr_isPeerIo( io ) );
dbgmsg( io, "%s:%d is decrementing the IO's refcount from %d to %d",
file, line, io->refCount, io->refCount-1 );
if( !--io->refCount )
tr_peerIoFree( io );
}
开发者ID:miracle2k,项目名称:transmission,代码行数:11,代码来源:peer-io.c
示例2: tr_peerIoFree
static void
tr_peerIoFree( tr_peerIo * io )
{
if( io )
{
dbgmsg( io, "in tr_peerIoFree" );
io->canRead = NULL;
io->didWrite = NULL;
io->gotError = NULL;
tr_runInEventThread( io->session, io_dtor, io );
}
}
开发者ID:miracle2k,项目名称:transmission,代码行数:12,代码来源:peer-io.c
示例3: readPayloadStream
static int
readPayloadStream( tr_handshake * handshake,
struct evbuffer * inbuf )
{
int i;
const size_t needlen = HANDSHAKE_SIZE;
dbgmsg( handshake, "reading payload stream... have %zu, need %zu",
evbuffer_get_length( inbuf ), needlen );
if( evbuffer_get_length( inbuf ) < needlen )
return READ_LATER;
/* parse the handshake ... */
i = parseHandshake( handshake, inbuf );
dbgmsg( handshake, "parseHandshake returned %d", i );
if( i != HANDSHAKE_OK )
return tr_handshakeDone( handshake, FALSE );
/* we've completed the BT handshake... pass the work on to peer-msgs */
return tr_handshakeDone( handshake, TRUE );
}
开发者ID:dreamcat4,项目名称:transmission,代码行数:21,代码来源:handshake.c
示例4: preallocate_file_full
static bool
preallocate_file_full (tr_sys_file_t fd, uint64_t length, tr_error ** error)
{
tr_error * my_error = NULL;
if (length == 0)
return true;
if (tr_sys_file_preallocate (fd, length, 0, &my_error))
return true;
dbgmsg ("Preallocating (full, normal) failed (%d): %s", my_error->code, my_error->message);
if (!TR_ERROR_IS_ENOSPC (my_error->code))
{
uint8_t buf[4096];
bool success = true;
memset (buf, 0, sizeof (buf));
tr_error_clear (&my_error);
/* fallback: the old-fashioned way */
while (success && length > 0)
{
const uint64_t thisPass = MIN (length, sizeof (buf));
uint64_t bytes_written;
success = tr_sys_file_write (fd, buf, thisPass, &bytes_written, &my_error);
length -= bytes_written;
}
if (success)
return true;
dbgmsg ("Preallocating (full, fallback) failed (%d): %s", my_error->code, my_error->message);
}
tr_error_propagate (error, &my_error);
return false;
}
开发者ID:keefo,项目名称:transmission,代码行数:39,代码来源:fdlimit.c
示例5: task_finish
static void
task_finish( struct tr_web_task * task, long response_code )
{
dbgmsg( "finished web task %lu; got %ld", task->tag, response_code );
if( task->done_func != NULL )
task->done_func( task->session,
response_code,
EVBUFFER_DATA( task->response ),
EVBUFFER_LENGTH( task->response ),
task->done_func_user_data );
task_free( task );
}
开发者ID:ndmsystems,项目名称:transmission,代码行数:13,代码来源:web.c
示例6: dbgmsg
/*-----------------------------------------------------------------------------
* memcpy:
*
* CAUTION: do not use with overleaping buffers like:
char tab[] = "qwertyuiopasdfghjklzxcvbnm";
char* ptr_src = tab;
char* ptr_dst = tab + 1;
uint32 sz = 5;
*-----------------------------------------------------------------------------*/
void *fmf_memcpy( void *dest, const void *src, uint32 count )
{
#ifdef LIBSTR_memcpy_linuxkernel_nasm
/*-----------------------------------------------------------------------------
* 32bit nasm implementation of linux kernel memcpy, it compiles on windows as well
*-----------------------------------------------------------------------------*/
#ifdef LIBSTR_DEBUG
dbgmsg( "memcpy_linuxkernel_nasm" );
#endif
//if( count < 4 )
// only small for now
return nasm_memcpy_s( dest, src, count );
//else
// return nasm_memcpy_b( dest, src, count );
#elif LIBSTR_memcpy_prefetch
/*-----------------------------------------------------------------------------
* 32bit nasm implementation of memcpy prefetch
*-----------------------------------------------------------------------------*/
#ifdef LIBSTR_DEBUG
dbgmsg( "memcpy_prefetch" );
#endif
return nasm_memcpy_prefetch( dest, src, count );
#elif LIBSTR_memcpy_linuxkernel_att
/*-----------------------------------------------------------------------------
* inline AT&T linux kernel memcpy
*-----------------------------------------------------------------------------*/
#ifdef LIBSTR_DEBUG
dbgmsg( "memcpy_linuxkernel_att" );
#endif
int32 d0, d1, d2;
if( count < 4 ) {
register uint32 dummy;
__asm__ __volatile__(
"rep; movsb"
:"=&D"(dest), "=&S"(src), "=&c"(dummy)
:"0" (dest), "1" (src),"2" (count)
: "memory");
} else
开发者ID:xorentor,项目名称:fmr,代码行数:47,代码来源:string.c
示例7: event_disable
static void
event_disable( struct tr_peerIo * io, short event )
{
assert( tr_amInEventThread( io->session ) );
assert( io->session != NULL );
assert( io->session->events != NULL );
assert( event_initialized( &io->event_read ) );
assert( event_initialized( &io->event_write ) );
if( ( event & EV_READ ) && ( io->pendingEvents & EV_READ ) )
{
dbgmsg( io, "disabling libevent ready-to-read polling" );
event_del( &io->event_read );
io->pendingEvents &= ~EV_READ;
}
if( ( event & EV_WRITE ) && ( io->pendingEvents & EV_WRITE ) )
{
dbgmsg( io, "disabling libevent ready-to-write polling" );
event_del( &io->event_write );
io->pendingEvents &= ~EV_WRITE;
}
}
开发者ID:miracle2k,项目名称:transmission,代码行数:23,代码来源:peer-io.c
示例8: wait_for_cpu_online
static int wait_for_cpu_online(void)
{
if (!decision_engine_stalled())
return 0;
pthread_mutex_lock(&hotplug_mutex);
dbgmsg("Waiting for cpu to be online\n");
while (stall_decision) {
pthread_cond_wait(&hotplug_condition, &hotplug_mutex);
}
pthread_mutex_unlock(&hotplug_mutex);
return 1;
}
开发者ID:GTurn,项目名称:Matrix_Force,代码行数:14,代码来源:decision.c
示例9: tr_handshakeDone
static int
tr_handshakeDone (tr_handshake * handshake, bool isOK)
{
bool success;
dbgmsg (handshake, "handshakeDone: %s", isOK ? "connected" : "aborting");
tr_peerIoSetIOFuncs (handshake->io, NULL, NULL, NULL, NULL);
success = fireDoneFunc (handshake, isOK);
tr_handshakeFree (handshake);
return success ? READ_LATER : READ_ERR;
}
开发者ID:RaoulDebaze,项目名称:TransmissionSync,代码行数:14,代码来源:handshake.c
示例10: amba_vtouch_release_abs_mt_sync
int amba_vtouch_release_abs_mt_sync(struct amba_vtouch_data *data)
{
if((amba_vtouch_dev==NULL) || (amba_vtouch_dev->input_dev==NULL)){
return -1;
}
dbgmsg("===> %s, %d,%d\n",__func__, data->finger[0].x, data->finger[0].y);
input_report_abs(amba_vtouch_dev->input_dev, ABS_MT_TOUCH_MAJOR, 0);
input_mt_sync(amba_vtouch_dev->input_dev);
input_sync(amba_vtouch_dev->input_dev);
return 0;
}
开发者ID:WayWingsDev,项目名称:gopro-linux,代码行数:14,代码来源:amba_vtouch.c
示例11: CheckNetFile
extern Bool
CheckNetFile(
NETFILE *fp)
{
Bool ret;
if ( fp && fp->fOK ) {
ret = TRUE;
} else {
dbgmsg("bad net file");
ret = FALSE;
}
return (ret);
}
开发者ID:authorNari,项目名称:panda,代码行数:14,代码来源:net.c
示例12: find_method_name
/* This method searches in the local constant pool for a method and returns the index
of the method in the MethodLookupTable. */
Method* find_method_name(Class *vmclass, const char *qualifiedName)
{
unsigned short n, nameIndex;
#ifdef DEBUG
printf("Link: finding method %s...", qualifiedName);
#endif
if (vmclass == NULL) {
return NULL;
}
for (n = 0; n < vmclass->MethodsNum; n++) {
nameIndex = vmclass->Methods[n].NameIndex - 1; /* Constant Pool index starts with 1, so we must subtract one */
if (strcmp(qualifiedName, ((struct CONSTANT_UTF8_INFO *)vmclass->ConstantPool[nameIndex].Data)->Text) == 0) {
dbgmsg("Found method.");
return &(vmclass->Methods[n]);
}
}
dbgmsg("Method not found!");
return NULL;
}
开发者ID:cli,项目名称:bean,代码行数:25,代码来源:linker.c
示例13: RecvStringData
extern PacketDataType
RecvStringData(
NETFILE *fp,
char *str,
size_t size)
{
PacketDataType type;
ENTER_FUNC;
type = GL_RecvDataType(fp);
switch (type) {
case GL_TYPE_INT:
dbgmsg("int");
sprintf(str,"%d",GL_RecvInt(fp));
break;
case GL_TYPE_CHAR:
case GL_TYPE_VARCHAR:
case GL_TYPE_DBCODE:
case GL_TYPE_TEXT:
GL_RecvString(fp, size, str);
break;
case GL_TYPE_BINARY:
case GL_TYPE_BYTE:
case GL_TYPE_OBJECT:
dbgmsg("LBS");
GL_RecvLBS(fp,LargeBuff);
if ( LBS_Size(LargeBuff) > 0 ) {
memcpy(str,LBS_Body(LargeBuff),LBS_Size(LargeBuff));
str[LBS_Size(LargeBuff)] = 0;
} else {
*str = 0;
}
break;
}
LEAVE_FUNC;
return type;
}
开发者ID:authorNari,项目名称:panda,代码行数:37,代码来源:protocol.c
示例14: restore_power_modes
static void restore_power_modes()
{
if(control_sleep_modes == 0)
return;
dbgmsg("Restoring power modes\n");
if(saved_sapc_idle_en_c0 != -1)
set_power_mode(0, "standalone_power_collapse", "idle_enabled", saved_sapc_idle_en_c0 );
if(saved_sapc_idle_en_c1 != -1)
set_power_mode(1, "standalone_power_collapse", "idle_enabled", saved_sapc_idle_en_c1 );
if(saved_pc_idle_en_c0 != -1)
set_power_mode(0, "power_collapse", "idle_enabled", saved_pc_idle_en_c0);
if(saved_pc_idle_en_c1 != -1)
set_power_mode(1, "power_collapse", "idle_enabled", saved_pc_idle_en_c1);
}
开发者ID:GTurn,项目名称:Matrix_Force,代码行数:15,代码来源:decision.c
示例15: task_finish_func
static void
task_finish_func( void * vtask )
{
struct tr_web_task * task = vtask;
dbgmsg( "finished web task %p; got %ld", task, task->code );
if( task->done_func != NULL )
task->done_func( task->session,
task->code,
evbuffer_pullup( task->response, -1 ),
evbuffer_get_length( task->response ),
task->done_func_user_data );
task_free( task );
}
开发者ID:marltu,项目名称:transmission,代码行数:15,代码来源:web.c
示例16: task_finish_func
static void
task_finish_func( void * vtask )
{
struct tr_web_task * task = vtask;
dbgmsg( "finished web task %p; got %ld", task, task->code );
if( task->done_func != NULL )
task->done_func( task->session,
task->code,
EVBUFFER_DATA( task->response ),
EVBUFFER_LENGTH( task->response ),
task->done_func_user_data );
task_free( task );
}
开发者ID:Longinus00,项目名称:transmission,代码行数:15,代码来源:web.c
示例17: sendBitfield
static void sendBitfield(tr_peerMsgs * msgs) {
void * bytes; size_t byte_count = 0; // bitfield e seu comprimento
struct evbuffer * out = msgs->outMessages; // buffer de saída
(...)
// Cria o bitfield conforme as partes que possui no momento.
bytes = tr_cpCreatePieceBitfield(&msgs->torrent->completion, &byte_count);
// <tamanho> = 1 + tamanho do bitfield
evbuffer_add_uint32(out, sizeof(uint8_t) + byte_count);
evbuffer_add_uint8(out, BT_BITFIELD); // <ID da mensagem> = 5
evbuffer_add(out, bytes, byte_count); // <dados=mapa de bits>
dbgmsg(msgs, "sending bitfield... outMessage size is now %zu", evbuffer_get_length(out));
(...)
}
开发者ID:paulochf,项目名称:tcc,代码行数:16,代码来源:033-bitfield.c
示例18: _npop_frame
// set _current_frame to its n+1'th tail (i.e. pop n+1 frames)
// Invariant: result is non-null
void _npop_frame(unsigned int n) {
struct _ThreadKey *t = tcb();
struct _RuntimeStack *current_frame = t->stack._current_frame;
unsigned int i;
for(i = n; i <= n; i--) {
if(current_frame == NULL)
errquit("internal error: empty frame stack\n");
dbgmsg("\nPOPING frame : %p code = %p" ,
current_frame, current_frame->cleanup);
if (current_frame->cleanup != NULL)
current_frame->cleanup(current_frame);
current_frame = current_frame->next;
}
t->stack._current_frame = current_frame;
}
开发者ID:pgerakios,项目名称:Concurrent-Cyclone-with-inference,代码行数:18,代码来源:runtime_stack.c
示例19: tr_peerIoWrite
void
tr_peerIoWrite( tr_peerIo * io,
const void * bytes,
size_t byteCount,
tr_bool isPieceData )
{
/* FIXME(libevent2): this implementation snould be moved to tr_peerIoWriteBuf. This function should be implemented as evbuffer_new() + evbuffer_add_reference() + a call to tr_peerIoWriteBuf() + evbuffer_free() */
struct tr_datatype * datatype;
assert( tr_amInEventThread( io->session ) );
dbgmsg( io, "adding %zu bytes into io->output", byteCount );
datatype = tr_new( struct tr_datatype, 1 );
datatype->isPieceData = isPieceData != 0;
datatype->length = byteCount;
tr_list_append( &io->outbuf_datatypes, datatype );
switch( io->encryptionMode )
{
case PEER_ENCRYPTION_RC4:
{
/* FIXME(libevent2): use evbuffer_reserve_space() and evbuffer_commit_space() instead of tmp */
void * tmp = tr_sessionGetBuffer( io->session );
const size_t tmplen = SESSION_BUFFER_SIZE;
const uint8_t * walk = bytes;
evbuffer_expand( io->outbuf, byteCount );
while( byteCount > 0 )
{
const size_t thisPass = MIN( byteCount, tmplen );
tr_cryptoEncrypt( io->crypto, thisPass, walk, tmp );
evbuffer_add( io->outbuf, tmp, thisPass );
walk += thisPass;
byteCount -= thisPass;
}
tr_sessionReleaseBuffer( io->session );
break;
}
case PEER_ENCRYPTION_NONE:
evbuffer_add( io->outbuf, bytes, byteCount );
break;
default:
assert( 0 );
break;
}
}
开发者ID:miracle2k,项目名称:transmission,代码行数:47,代码来源:peer-io.c
示例20: setsock
static void
setsock( curl_socket_t sockfd,
int action,
struct tr_web * g,
struct tr_web_sockinfo * f )
{
const int kind = EV_PERSIST
| (( action & CURL_POLL_IN ) ? EV_READ : 0 )
| (( action & CURL_POLL_OUT ) ? EV_WRITE : 0 );
dbgmsg( "setsock: fd is %d, curl action is %d, libevent action is %d",
sockfd, action, kind );
if( f->evset )
event_del( &f->ev );
event_set( &f->ev, sockfd, kind, event_cb, g );
f->evset = 1;
event_add( &f->ev, NULL );
}
开发者ID:fangang190,项目名称:canary,代码行数:17,代码来源:web.c
注:本文中的dbgmsg函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论