本文整理汇总了C++中TRACE_FUN函数的典型用法代码示例。如果您正苦于以下问题:C++ TRACE_FUN函数的具体用法?C++ TRACE_FUN怎么用?C++ TRACE_FUN使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TRACE_FUN函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TRACE_FUN
CIniImpl::CIniImpl()
{
TRACE_FUN( Routine, "CIniImpl::CIniImpl" );
_registryDriverInfo._name = "TextIni";
_registryDriverInfo._description = "Group settings into ini-format";
_registryDriverInfo._version = config::g_version;
_registryDriverInfo._fileName = "l2maxRegIniDrv";
}
示例2: mt_fsf
static int mt_fsf(int *arg)
{
int result;
TRACE_FUN(ft_t_flow);
result = zft_skip_volumes(*arg, &zft_pos);
zft_just_before_eof = 0;
TRACE_EXIT result;
}
示例3: ftape_in_error_state
int ftape_in_error_state(int status)
{
TRACE_FUN(ft_t_any);
if ((status & QIC_STATUS_READY) && (status & QIC_STATUS_ERROR)) {
TRACE_ABORT(1, ft_t_warn, "warning: error status set!");
}
TRACE_EXIT 0;
}
示例4: zft_verify_write_segments
int zft_verify_write_segments(unsigned int segment,
__u8 *data, size_t size,
__u8 *buffer)
{
int result;
__u8 *write_buf;
__u8 *src_buf;
int single;
int seg_pos;
int seg_sz;
int remaining;
ft_write_mode_t write_mode;
TRACE_FUN(ft_t_flow);
seg_pos = segment;
seg_sz = zft_get_seg_sz(seg_pos);
src_buf = data;
single = size <= seg_sz;
remaining = size;
do {
TRACE(ft_t_noise, "\n"
KERN_INFO "remaining: %d\n"
KERN_INFO "seg_sz : %d\n"
KERN_INFO "segment : %d",
remaining, seg_sz, seg_pos);
if (remaining == seg_sz) {
write_buf = src_buf;
write_mode = single ? FT_WR_SINGLE : FT_WR_MULTI;
remaining = 0;
} else if (remaining > seg_sz) {
write_buf = src_buf;
write_mode = FT_WR_ASYNC; /* don't start tape */
remaining -= seg_sz;
} else { /* remaining < seg_sz */
write_buf = buffer;
memcpy(write_buf, src_buf, remaining);
memset(&write_buf[remaining],'\0',seg_sz-remaining);
write_mode = single ? FT_WR_SINGLE : FT_WR_MULTI;
remaining = 0;
}
if ((result = ftape_write_segment(seg_pos,
write_buf,
write_mode)) != seg_sz) {
TRACE(ft_t_err, "Error: "
"Couldn't write segment %d", seg_pos);
TRACE_EXIT result < 0 ? result : -EIO; /* bail out */
}
zft_written_segments ++;
seg_sz = zft_get_seg_sz(++seg_pos);
src_buf += result;
} while (remaining > 0);
if (ftape_get_status()->fti_state == writing) {
TRACE_CATCH(ftape_loop_until_writes_done(),);
TRACE_CATCH(ftape_abort_operation(),);
zft_prevent_flush();
}
示例5: mt_bsf
static int mt_bsf(int *arg)
{
int result = 0;
TRACE_FUN(ft_t_flow);
if (*arg != 0) {
result = zft_skip_volumes(-*arg + 1, &zft_pos);
}
TRACE_EXIT result;
}
示例6: TRACE_FUN
bool CPixmap::load( const unsigned char* data, unsigned int len )
{
TRACE_FUN( Frequently, "CPixmap::load( const unsigned char*, unsigned int )" );
bool ret( false );
ret = load( CByteArray( data, len ) );
return ret;
}
示例7: update_header_segment
int update_header_segment(unsigned segment, byte * buffer)
{
TRACE_FUN(5, "update_header_segment");
int result = 0;
int status;
if (buffer == NULL) {
TRACE(5, "no input buffer specified");
buffer = deblock_buffer;
result = read_segment(used_header_segment, buffer, &status, 0);
if (bad_sector_map_changed) {
store_bad_sector_map(buffer);
}
if (failed_sector_log_changed) {
update_failed_sector_log(buffer);
}
}
if (result >= 0 && GET4(buffer, 0) != 0xaa55aa55) {
TRACE(1, "wrong header signature found, aborting");
result = -EIO;
}
if (result >= 0) {
result = _write_segment(segment, buffer, 0);
if (result >= 0 && runner_status == idle) {
/* Force flush for single segment instead of relying on
* flush in read_segment for multiple segments.
*/
result = start_writing(WRITE_SINGLE);
if (result >= 0 && ftape_state == writing) {
result = loop_until_writes_done();
prevent_flush();
}
}
#ifdef VERIFY_HEADERS
if (result >= 0) { /* read back and verify */
result = read_segment(segment, scratch_buffer, &status, 0);
/* Should retry if soft error during read !
* TO BE IMPLEMENTED
*/
if (result >= 0) {
if (memcmp(buffer, scratch_buffer, sizeof(buffer)) == 0) {
result = 0; /* verified */
TRACE(5, "verified");
} else {
result = -EIO; /* verify failed */
TRACE(5, "verify failed");
}
}
}
#endif
}
TRACE_EXIT;
return result;
}
示例8: ftape_detach_drive
void ftape_detach_drive(void)
{
TRACE_FUN(8, "ftape_detach_drive");
TRACE(5, "disabling tape drive and fdc");
ftape_put_drive_to_sleep(drive_type);
fdc_catch_stray_interrupts(1); /* one always comes */
fdc_disable();
fdc_release_irq_and_dma();
TRACE_EXIT;
}
示例9: cleanup_module
/* Called by modules package when removing the driver
*/
void cleanup_module(void)
{
TRACE_FUN(ft_t_flow);
#if defined(CONFIG_PROC_FS) && defined(CONFIG_FT_PROC_FS)
ftape_proc_destroy();
#endif
(void)ftape_set_nr_buffers(0);
printk(KERN_INFO "ftape: unloaded.\n");
TRACE_EXIT;
}
示例10: TRACE_FUN
CMeter2DGraphView::~CMeter2DGraphView()
{
TRACE_FUN( Routine, "CMeter2DGraphView::~CMeter2DGraphView" );
killTimer( _timerId );
glDeleteLists( _meshList, 1 );
gluDeleteNurbsRenderer( _nurbsRenderer );
deviceView().mainWindow().menuBarManager().CloseSession( _menuSessionId );
}
示例11: correct_and_copy_fraction
static int correct_and_copy_fraction(buffer_struct *buff, __u8 * destination,
int start, int size)
{
struct memory_segment mseg;
int result;
SectorMap read_bad;
TRACE_FUN(ft_t_any);
mseg.read_bad = convert_sector_map(buff);
mseg.marked_bad = 0; /* not used... */
mseg.blocks = buff->bytes / FT_SECTOR_SIZE;
mseg.data = buff->address;
/* If there are no data sectors we can skip this segment.
*/
if (mseg.blocks <= 3) {
TRACE_ABORT(0, ft_t_noise, "empty segment");
}
read_bad = mseg.read_bad;
ft_history.crc_errors += count_ones(read_bad);
result = ftape_ecc_correct_data(&mseg);
if (read_bad != 0 || mseg.corrected != 0) {
TRACE(ft_t_noise, "crc error map: 0x%08lx", (unsigned long)read_bad);
TRACE(ft_t_noise, "corrected map: 0x%08lx", (unsigned long)mseg.corrected);
ft_history.corrected += count_ones(mseg.corrected);
}
if (result == ECC_CORRECTED || result == ECC_OK) {
if (result == ECC_CORRECTED) {
TRACE(ft_t_info, "ecc corrected segment: %d", buff->segment_id);
}
if(start < 0) {
start= 0;
}
if((start+size) > ((mseg.blocks - 3) * FT_SECTOR_SIZE)) {
size = (mseg.blocks - 3) * FT_SECTOR_SIZE - start;
}
if (size < 0) {
size= 0;
}
if(size > 0) {
memcpy(destination + start, mseg.data + start, size);
}
if ((read_bad ^ mseg.corrected) & mseg.corrected) {
/* sectors corrected without crc errors set */
ft_history.crc_failures++;
}
TRACE_EXIT size; /* (mseg.blocks - 3) * FT_SECTOR_SIZE; */
} else {
ft_history.ecc_failures++;
TRACE_ABORT(-EAGAIN,
ft_t_err, "ecc failure on segment %d",
buff->segment_id);
}
TRACE_EXIT 0;
}
示例12: zft_cmpr_register
/* the compression module has to call this function to hook into the zftape
* code
*/
int zft_cmpr_register(struct zft_cmpr_ops *new_ops)
{
TRACE_FUN(ft_t_flow);
if (zft_cmpr_ops != NULL) {
TRACE_EXIT -EBUSY;
} else {
zft_cmpr_ops = new_ops;
TRACE_EXIT 0;
}
}
示例13: zft_memory_stats
void zft_memory_stats(void)
{
TRACE_FUN(ft_t_flow);
TRACE(ft_t_noise, "Memory usage (vmalloc allocations):\n"
KERN_INFO "total allocated: %d\n"
KERN_INFO "peak allocation: %d",
used_memory, peak_memory);
peak_memory = used_memory;
TRACE_EXIT;
}
示例14: TRACE_FUN
void CAbstractRegistryDriver::Clear()
{
TRACE_FUN( Routine, "CAbstractRegistryDriver::Clear" );
WaitForDriverStop();
CMutexLocker locker( synchronization().mutex() );
category()->Clear();
_isModified = false;
}
示例15: loop_until_writes_done
int loop_until_writes_done(void)
{
TRACE_FUN(5, "loop_until_writes_done");
int i;
int result = 0;
/*
* Wait until all data is actually written to tape.
*/
while (ftape_state == writing && buffer[head].status != done) {
TRACEx2(7, "tail: %d, head: %d", tail, head);
for (i = 0; i < NR_BUFFERS; ++i) {
TRACEx3(8, "buffer[ %d] segment_id: %d, status: %d",
i, buffer[i].segment_id, buffer[i].status);
}
result = fdc_interrupt_wait(5 * SECOND);
if (result < 0) {
TRACE(1, "fdc_interrupt_wait failed");
last_write_failed = 1;
break;
}
if (buffer[head].status == error) {
/* Allow escape from loop when signaled !
*/
if (current->signal & _DONT_BLOCK) {
TRACE(2, "interrupted by signal");
TRACE_EXIT;
result = -EINTR; /* is this the right return value ? */
break;
}
if (buffer[head].hard_error_map != 0) {
/* Implement hard write error recovery here
*/
}
buffer[head].status = waiting; /* retry this one */
if (runner_status == aborting) {
ftape_dumb_stop();
runner_status = idle;
}
if (runner_status != idle) {
TRACE(1, "unexpected state: runner_status != idle");
result = -EIO;
break;
}
start_writing(WRITE_MULTI);
}
TRACE(5, "looping until writes done");
result = 0; /* normal exit status */
}
TRACE_EXIT;
return result;
}