本文整理汇总了C++中debug_event函数的典型用法代码示例。如果您正苦于以下问题:C++ debug_event函数的具体用法?C++ debug_event怎么用?C++ debug_event使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了debug_event函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: action_exec
void action_exec(keyevent_t event)
{
if (!IS_NOEVENT(event)) {
dprint("\n---- action_exec: start -----\n");
dprint("EVENT: "); debug_event(event); dprintln();
}
keyrecord_t record = { .event = event };
#ifndef NO_ACTION_TAPPING
action_tapping_process(record);
#else
process_action(&record);
if (!IS_NOEVENT(record.event)) {
dprint("processed: "); debug_record(record); dprintln();
}
#endif
}
开发者ID:GorillaDiapers,项目名称:tmk_keyboard,代码行数:18,代码来源:action.c
示例2: zfcp_hba_dbf_event_qdio
/**
* zfcp_hba_dbf_event_qdio - trace event for QDIO related failure
* @adapter: adapter affected by this QDIO related event
* @status: as passed by qdio module
* @qdio_error: as passed by qdio module
* @siga_error: as passed by qdio module
* @sbal_index: first buffer with error condition, as passed by qdio module
* @sbal_count: number of buffers affected, as passed by qdio module
*/
void zfcp_hba_dbf_event_qdio(struct zfcp_adapter *adapter, unsigned int status,
unsigned int qdio_error, unsigned int siga_error,
int sbal_index, int sbal_count)
{
struct zfcp_hba_dbf_record *r = &adapter->hba_dbf_buf;
unsigned long flags;
spin_lock_irqsave(&adapter->hba_dbf_lock, flags);
memset(r, 0, sizeof(*r));
strncpy(r->tag, "qdio", ZFCP_DBF_TAG_SIZE);
r->u.qdio.status = status;
r->u.qdio.qdio_error = qdio_error;
r->u.qdio.siga_error = siga_error;
r->u.qdio.sbal_index = sbal_index;
r->u.qdio.sbal_count = sbal_count;
debug_event(adapter->hba_dbf, 0, r, sizeof(*r));
spin_unlock_irqrestore(&adapter->hba_dbf_lock, flags);
}
开发者ID:maraz,项目名称:linux-2.6,代码行数:27,代码来源:zfcp_dbf.c
示例3: zfcp_dbf_hba_basic
/**
* zfcp_dbf_hba_basic - trace event for basic adapter events
* @adapter: pointer to struct zfcp_adapter
*/
void zfcp_dbf_hba_basic(char *tag, struct zfcp_adapter *adapter)
{
struct zfcp_dbf *dbf = adapter->dbf;
struct zfcp_dbf_hba *rec = &dbf->hba_buf;
static int const level = 1;
unsigned long flags;
if (unlikely(!debug_level_enabled(dbf->hba, level)))
return;
spin_lock_irqsave(&dbf->hba_lock, flags);
memset(rec, 0, sizeof(*rec));
memcpy(rec->tag, tag, ZFCP_DBF_TAG_LEN);
rec->id = ZFCP_DBF_HBA_BASIC;
debug_event(dbf->hba, level, rec, sizeof(*rec));
spin_unlock_irqrestore(&dbf->hba_lock, flags);
}
开发者ID:mkrufky,项目名称:linux,代码行数:23,代码来源:zfcp_dbf.c
示例4: _zfcp_san_dbf_event_common_els
static void
_zfcp_san_dbf_event_common_els(const char *tag, int level,
struct zfcp_fsf_req *fsf_req, u32 s_id,
u32 d_id, u8 ls_code, void *buffer, int buflen)
{
struct zfcp_adapter *adapter = fsf_req->adapter;
struct zfcp_san_dbf_record *rec = &adapter->san_dbf_buf;
struct zfcp_dbf_dump *dump = (struct zfcp_dbf_dump *)rec;
unsigned long flags;
int offset = 0;
spin_lock_irqsave(&adapter->san_dbf_lock, flags);
do {
memset(rec, 0, sizeof(struct zfcp_san_dbf_record));
if (offset == 0) {
strncpy(rec->tag, tag, ZFCP_DBF_TAG_SIZE);
rec->fsf_reqid = (unsigned long)fsf_req;
rec->fsf_seqno = fsf_req->seq_no;
rec->s_id = s_id;
rec->d_id = d_id;
rec->type.els.ls_code = ls_code;
buflen = min(buflen, ZFCP_DBF_ELS_MAX_PAYLOAD);
rec->type.els.payload_size = buflen;
memcpy(rec->type.els.payload,
buffer, min(buflen, ZFCP_DBF_ELS_PAYLOAD));
offset += min(buflen, ZFCP_DBF_ELS_PAYLOAD);
} else {
strncpy(dump->tag, "dump", ZFCP_DBF_TAG_SIZE);
dump->total_size = buflen;
dump->offset = offset;
dump->size = min(buflen - offset,
(int)sizeof(struct zfcp_san_dbf_record)
- (int)sizeof(struct zfcp_dbf_dump));
memcpy(dump->data, buffer + offset, dump->size);
offset += dump->size;
}
debug_event(adapter->san_dbf, level,
rec, sizeof(struct zfcp_san_dbf_record));
} while (offset < buflen);
spin_unlock_irqrestore(&adapter->san_dbf_lock, flags);
}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:41,代码来源:zfcp_dbf.c
示例5: zfcp_dbf_hba_fsf_uss
/**
* zfcp_dbf_hba_fsf_uss - trace event for an unsolicited status buffer
* @tag: tag indicating which kind of unsolicited status has been received
* @req: request providing the unsolicited status
*/
void zfcp_dbf_hba_fsf_uss(char *tag, struct zfcp_fsf_req *req)
{
struct zfcp_dbf *dbf = req->adapter->dbf;
struct fsf_status_read_buffer *srb = req->data;
struct zfcp_dbf_hba *rec = &dbf->hba_buf;
static int const level = 2;
unsigned long flags;
if (unlikely(!debug_level_enabled(dbf->hba, level)))
return;
spin_lock_irqsave(&dbf->hba_lock, flags);
memset(rec, 0, sizeof(*rec));
memcpy(rec->tag, tag, ZFCP_DBF_TAG_LEN);
rec->id = ZFCP_DBF_HBA_USS;
rec->fsf_req_id = req->req_id;
rec->fsf_req_status = req->status;
rec->fsf_cmd = req->fsf_command;
if (!srb)
goto log;
rec->u.uss.status_type = srb->status_type;
rec->u.uss.status_subtype = srb->status_subtype;
rec->u.uss.d_id = ntoh24(srb->d_id);
rec->u.uss.lun = srb->fcp_lun;
memcpy(&rec->u.uss.queue_designator, &srb->queue_designator,
sizeof(rec->u.uss.queue_designator));
/* status read buffer payload length */
rec->pl_len = (!srb->length) ? 0 : srb->length -
offsetof(struct fsf_status_read_buffer, payload);
if (rec->pl_len)
zfcp_dbf_pl_write(dbf, srb->payload.data, rec->pl_len,
"fsf_uss", req->req_id);
log:
debug_event(dbf->hba, level, rec, sizeof(*rec));
spin_unlock_irqrestore(&dbf->hba_lock, flags);
}
开发者ID:mkrufky,项目名称:linux,代码行数:46,代码来源:zfcp_dbf.c
示例6: action_exec
void action_exec(keyevent_t event)
{
if (!IS_NOEVENT(event)) {
dprint("\n---- action_exec: start -----\n");
dprint("EVENT: "); debug_event(event); dprintln();
}
#ifdef FAUXCLICKY_ENABLE
if (IS_PRESSED(event)) {
FAUXCLICKY_ACTION_PRESS;
}
if (IS_RELEASED(event)) {
FAUXCLICKY_ACTION_RELEASE;
}
fauxclicky_check();
#endif
#ifdef ONEHAND_ENABLE
if (!IS_NOEVENT(event)) {
process_hand_swap(&event);
}
#endif
keyrecord_t record = { .event = event };
#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
if (has_oneshot_layer_timed_out()) {
dprintf("Oneshot layer: timeout\n");
clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
}
#endif
#ifndef NO_ACTION_TAPPING
action_tapping_process(record);
#else
process_record(&record);
if (!IS_NOEVENT(record.event)) {
dprint("processed: "); debug_record(record); dprintln();
}
#endif
}
开发者ID:Ictinike,项目名称:qmk_firmware,代码行数:41,代码来源:action.c
示例7: zfcp_rec_dbf_event_target
static void zfcp_rec_dbf_event_target(u8 id2, void *ref,
struct zfcp_adapter *adapter,
atomic_t *status, atomic_t *erp_count,
u64 wwpn, u32 d_id, u64 fcp_lun)
{
struct zfcp_rec_dbf_record *r = &adapter->rec_dbf_buf;
unsigned long flags;
spin_lock_irqsave(&adapter->rec_dbf_lock, flags);
memset(r, 0, sizeof(*r));
r->id = ZFCP_REC_DBF_ID_TARGET;
r->id2 = id2;
r->u.target.ref = (unsigned long)ref;
r->u.target.status = atomic_read(status);
r->u.target.wwpn = wwpn;
r->u.target.d_id = d_id;
r->u.target.fcp_lun = fcp_lun;
r->u.target.erp_count = atomic_read(erp_count);
debug_event(adapter->rec_dbf, 3, r, sizeof(*r));
spin_unlock_irqrestore(&adapter->rec_dbf_lock, flags);
}
开发者ID:274914765,项目名称:C,代码行数:21,代码来源:zfcp_dbf.c
示例8: onEvent
void onEvent (ev_t ev) {
debug_event(ev);
switch(ev) {
// starting to join network
case EV_JOINING:
// start blinking
blinkfunc(&blinkjob);
break;
// network joined, session established
case EV_JOINED:
// cancel blink job
os_clearCallback(&blinkjob);
// switch on LED
debug_led(1);
// (don't schedule any new actions)
break;
}
}
开发者ID:kaaLabs15,项目名称:lmic_pi,代码行数:21,代码来源:main.c
示例9: zfcp_dbf_san
static inline
void zfcp_dbf_san(char *tag, struct zfcp_dbf *dbf, void *data, u8 id, u16 len,
u64 req_id, u32 d_id)
{
struct zfcp_dbf_san *rec = &dbf->san_buf;
u16 rec_len;
unsigned long flags;
spin_lock_irqsave(&dbf->san_lock, flags);
memset(rec, 0, sizeof(*rec));
rec->id = id;
rec->fsf_req_id = req_id;
rec->d_id = d_id;
rec_len = min(len, (u16)ZFCP_DBF_SAN_MAX_PAYLOAD);
memcpy(rec->payload, data, rec_len);
memcpy(rec->tag, tag, ZFCP_DBF_TAG_LEN);
debug_event(dbf->san, 1, rec, sizeof(*rec));
spin_unlock_irqrestore(&dbf->san_lock, flags);
}
开发者ID:mjduddin,项目名称:B14CKB1RD_kernel_m8,代码行数:21,代码来源:zfcp_dbf.c
示例10: zfcp_dbf_hba_bit_err
void zfcp_dbf_hba_bit_err(char *tag, struct zfcp_fsf_req *req)
{
struct zfcp_dbf *dbf = req->adapter->dbf;
struct zfcp_dbf_hba *rec = &dbf->hba_buf;
struct fsf_status_read_buffer *sr_buf = req->data;
unsigned long flags;
spin_lock_irqsave(&dbf->hba_lock, flags);
memset(rec, 0, sizeof(*rec));
memcpy(rec->tag, tag, ZFCP_DBF_TAG_LEN);
rec->id = ZFCP_DBF_HBA_BIT;
rec->fsf_req_id = req->req_id;
rec->fsf_req_status = req->status;
rec->fsf_cmd = req->fsf_command;
memcpy(&rec->u.be, &sr_buf->payload.bit_error,
sizeof(struct fsf_bit_error_payload));
debug_event(dbf->hba, 1, rec, sizeof(*rec));
spin_unlock_irqrestore(&dbf->hba_lock, flags);
}
开发者ID:mjduddin,项目名称:B14CKB1RD_kernel_m8,代码行数:21,代码来源:zfcp_dbf.c
示例11: _zfcp_san_dbf_event_common_ct
static void
_zfcp_san_dbf_event_common_ct(const char *tag, struct zfcp_fsf_req *fsf_req,
u32 s_id, u32 d_id, void *buffer, int buflen)
{
struct zfcp_send_ct *send_ct = (struct zfcp_send_ct *)fsf_req->data;
struct zfcp_port *port = send_ct->port;
struct zfcp_adapter *adapter = port->adapter;
struct ct_hdr *header = (struct ct_hdr *)buffer;
struct zfcp_san_dbf_record *rec = &adapter->san_dbf_buf;
struct zfcp_san_dbf_record_ct *ct = &rec->type.ct;
unsigned long flags;
spin_lock_irqsave(&adapter->san_dbf_lock, flags);
memset(rec, 0, sizeof(struct zfcp_san_dbf_record));
strncpy(rec->tag, tag, ZFCP_DBF_TAG_SIZE);
rec->fsf_reqid = (unsigned long)fsf_req;
rec->fsf_seqno = fsf_req->seq_no;
rec->s_id = s_id;
rec->d_id = d_id;
if (strncmp(tag, "octc", ZFCP_DBF_TAG_SIZE) == 0) {
ct->type.request.cmd_req_code = header->cmd_rsp_code;
ct->type.request.revision = header->revision;
ct->type.request.gs_type = header->gs_type;
ct->type.request.gs_subtype = header->gs_subtype;
ct->type.request.options = header->options;
ct->type.request.max_res_size = header->max_res_size;
} else if (strncmp(tag, "rctc", ZFCP_DBF_TAG_SIZE) == 0) {
ct->type.response.cmd_rsp_code = header->cmd_rsp_code;
ct->type.response.revision = header->revision;
ct->type.response.reason_code = header->reason_code;
ct->type.response.reason_code_expl = header->reason_code_expl;
ct->type.response.vendor_unique = header->vendor_unique;
}
ct->payload_size =
min(buflen - (int)sizeof(struct ct_hdr), ZFCP_DBF_CT_PAYLOAD);
memcpy(ct->payload, buffer + sizeof(struct ct_hdr), ct->payload_size);
debug_event(adapter->san_dbf, 3,
rec, sizeof(struct zfcp_san_dbf_record));
spin_unlock_irqrestore(&adapter->san_dbf_lock, flags);
}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:40,代码来源:zfcp_dbf.c
示例12: event_process_end
int event_process_end(struct event *evt) {
debug_event("Processing event end %s", evt->reg->info->name);
if (!(evt->flags & EVENT_FLAG_PROCESS_BEGAN)) {
pomlog(POMLOG_ERR "Internal error: event %s processing hasn't begun", evt->reg->info->name);
event_cleanup(evt);
return POM_ERR;
}
if (evt->flags & EVENT_FLAG_PROCESS_DONE) {
pomlog(POMLOG_ERR "Internal error: event %s has already been processed entirely", evt->reg->info->name);
event_cleanup(evt);
return POM_ERR;
}
struct event_listener *lst;
for (lst = evt->reg->listeners; lst; lst = lst->next) {
if (lst->process_end && lst->process_end(evt, lst->obj) != POM_OK) {
pomlog(POMLOG_WARN "An error occured while processing event %s", evt->reg->info->name);
}
}
for (lst = evt->tmp_listeners; lst; lst = lst->next) {
if (lst->process_end && lst->process_end(evt, lst->obj) != POM_OK) {
pomlog(POMLOG_WARN "An error occured while processing event %s", evt->reg->info->name);
}
registry_perf_dec(evt->reg->perf_listeners, 1);
}
evt->ce = NULL;
evt->flags |= EVENT_FLAG_PROCESS_DONE;
registry_perf_dec(evt->reg->perf_ongoing, 1);
registry_perf_inc(evt->reg->perf_processed, 1);
return event_refcount_dec(evt);
}
开发者ID:k0a1a,项目名称:pom-ng,代码行数:40,代码来源:event.c
示例13: zfcp_san_dbf_event_els
static void zfcp_san_dbf_event_els(const char *tag, int level,
struct zfcp_fsf_req *fsf_req, u32 s_id,
u32 d_id, u8 ls_code, void *buffer,
int buflen)
{
struct zfcp_adapter *adapter = fsf_req->adapter;
struct zfcp_san_dbf_record *rec = &adapter->san_dbf_buf;
unsigned long flags;
spin_lock_irqsave(&adapter->san_dbf_lock, flags);
memset(rec, 0, sizeof(*rec));
strncpy(rec->tag, tag, ZFCP_DBF_TAG_SIZE);
rec->fsf_reqid = (unsigned long)fsf_req;
rec->fsf_seqno = fsf_req->seq_no;
rec->s_id = s_id;
rec->d_id = d_id;
rec->u.els.ls_code = ls_code;
debug_event(adapter->san_dbf, level, rec, sizeof(*rec));
zfcp_dbf_hexdump(adapter->san_dbf, rec, sizeof(*rec), level,
buffer, min(buflen, ZFCP_DBF_SAN_MAX_PAYLOAD));
spin_unlock_irqrestore(&adapter->san_dbf_lock, flags);
}
开发者ID:ClarkChen633,项目名称:rtl819x-toolchain,代码行数:22,代码来源:zfcp_dbf.c
示例14: process_events_and_channel_data_from_plugin
//-----------------------------------------------------------------------------
static void process_events_and_channel_data_from_plugin(thread_param* param)
{
FRDP_EVENT* event;
param->th_count++;
while (param->th_to_finish == 0)
{
freerdp_chanman_check_fds(param->chan_man, param->instance);
event = freerdp_chanman_pop_event(param->chan_man);
if (event)
{
DEBUG_RAIL("UI receive %d event.", event->event_type);
debug_event(event);
// add to global event list
freerdp_event_free(event);
}
usleep(1000);
}
param->th_count--;
}
开发者ID:roman-bb,项目名称:FreeRDP-1.0,代码行数:23,代码来源:test_rail.c
示例15: malloc
struct event *event_alloc(struct event_reg *evt_reg) {
struct event *evt = malloc(sizeof(struct event));
if (!evt) {
pom_oom(sizeof(struct event));
return NULL;
}
memset(evt, 0, sizeof(struct event));
struct event_reg_info *info = evt_reg->info;
evt->reg = evt_reg;
evt->data = data_alloc_table(info->data_reg);
if (!evt->data) {
free(evt);
return NULL;
}
debug_event("Event %s allocated", evt_reg->info->name);
return evt;
}
开发者ID:k0a1a,项目名称:pom-ng,代码行数:22,代码来源:event.c
示例16: zfcp_rec_dbf_event_thread
/**
* zfcp_rec_dbf_event_thread - trace event related to recovery thread operation
* @id2: identifier for event
* @adapter: adapter
* This function assumes that the caller is holding erp_lock.
*/
void zfcp_rec_dbf_event_thread(char *id2, struct zfcp_adapter *adapter)
{
struct zfcp_rec_dbf_record *r = &adapter->rec_dbf_buf;
unsigned long flags = 0;
struct list_head *entry;
unsigned ready = 0, running = 0, total;
list_for_each(entry, &adapter->erp_ready_head)
ready++;
list_for_each(entry, &adapter->erp_running_head)
running++;
total = adapter->erp_total_count;
spin_lock_irqsave(&adapter->rec_dbf_lock, flags);
memset(r, 0, sizeof(*r));
r->id = ZFCP_REC_DBF_ID_THREAD;
memcpy(r->id2, id2, ZFCP_DBF_ID_SIZE);
r->u.thread.total = total;
r->u.thread.ready = ready;
r->u.thread.running = running;
debug_event(adapter->rec_dbf, 6, r, sizeof(*r));
spin_unlock_irqrestore(&adapter->rec_dbf_lock, flags);
}
开发者ID:ClarkChen633,项目名称:rtl819x-toolchain,代码行数:29,代码来源:zfcp_dbf.c
示例17: zfcp_dbf_hba_fsf_res
/**
* zfcp_dbf_hba_fsf_res - trace event for fsf responses
* @tag: tag indicating which kind of unsolicited status has been received
* @req: request for which a response was received
*/
void zfcp_dbf_hba_fsf_res(char *tag, int level, struct zfcp_fsf_req *req)
{
struct zfcp_dbf *dbf = req->adapter->dbf;
struct fsf_qtcb_prefix *q_pref = &req->qtcb->prefix;
struct fsf_qtcb_header *q_head = &req->qtcb->header;
struct zfcp_dbf_hba *rec = &dbf->hba_buf;
unsigned long flags;
spin_lock_irqsave(&dbf->hba_lock, flags);
memset(rec, 0, sizeof(*rec));
memcpy(rec->tag, tag, ZFCP_DBF_TAG_LEN);
rec->id = ZFCP_DBF_HBA_RES;
rec->fsf_req_id = req->req_id;
rec->fsf_req_status = req->status;
rec->fsf_cmd = req->fsf_command;
rec->fsf_seq_no = req->seq_no;
rec->u.res.req_issued = req->issued;
rec->u.res.prot_status = q_pref->prot_status;
rec->u.res.fsf_status = q_head->fsf_status;
rec->u.res.port_handle = q_head->port_handle;
rec->u.res.lun_handle = q_head->lun_handle;
memcpy(rec->u.res.prot_status_qual, &q_pref->prot_status_qual,
FSF_PROT_STATUS_QUAL_SIZE);
memcpy(rec->u.res.fsf_status_qual, &q_head->fsf_status_qual,
FSF_STATUS_QUALIFIER_SIZE);
if (req->fsf_command != FSF_QTCB_FCP_CMND) {
rec->pl_len = q_head->log_length;
zfcp_dbf_pl_write(dbf, (char *)q_pref + q_head->log_start,
rec->pl_len, "fsf_res", req->req_id);
}
debug_event(dbf->hba, level, rec, sizeof(*rec));
spin_unlock_irqrestore(&dbf->hba_lock, flags);
}
开发者ID:mkrufky,项目名称:linux,代码行数:42,代码来源:zfcp_dbf.c
示例18: zfcp_dbf_pl_write
static inline
void zfcp_dbf_pl_write(struct zfcp_dbf *dbf, void *data, u16 length, char *area,
u64 req_id)
{
struct zfcp_dbf_pay *pl = &dbf->pay_buf;
u16 offset = 0, rec_length;
spin_lock(&dbf->pay_lock);
memset(pl, 0, sizeof(*pl));
pl->fsf_req_id = req_id;
memcpy(pl->area, area, ZFCP_DBF_TAG_LEN);
while (offset < length) {
rec_length = min((u16) ZFCP_DBF_PAY_MAX_REC,
(u16) (length - offset));
memcpy(pl->data, data + offset, rec_length);
debug_event(dbf->pay, 1, pl, zfcp_dbf_plen(rec_length));
offset += rec_length;
pl->counter++;
}
spin_unlock(&dbf->pay_lock);
}
开发者ID:mkrufky,项目名称:linux,代码行数:24,代码来源:zfcp_dbf.c
示例19: debug_program_start
boolean debug_program_start()
{
return debug_event(DBG_PROGRAM_START, null, null, 0, 0, 0, 0);
}
开发者ID:eddywar,项目名称:lejos,代码行数:4,代码来源:debug.c
示例20: debug_program_exit
boolean debug_program_exit()
{
return debug_event(DBG_PROGRAM_EXIT, null, null, 0, 0, 0, 0);
}
开发者ID:eddywar,项目名称:lejos,代码行数:4,代码来源:debug.c
注:本文中的debug_event函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论