您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DTRACE函数代码示例

51自学网 2021-06-01 20:24:16
  C++
这篇教程C++ DTRACE函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中DTRACE函数的典型用法代码示例。如果您正苦于以下问题:C++ DTRACE函数的具体用法?C++ DTRACE怎么用?C++ DTRACE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了DTRACE函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: _vrpc_server_thread

    static int_vrpc_server_thread (void* data){    vrpc_t* vrpc = (vrpc_t*) data;    DTRACE("VLINK %d (%d -> %d) [%s] server thread started/n",	   vrpc->vlink->link, vrpc->vlink->c_id, vrpc->vlink->s_id,	   (vrpc->my.info ? vrpc->my.info : ""));    for (;;) {	if (wait_event_interruptible(vrpc->wait,				     _vrpc_server_thread_wakeup(vrpc))) {	    break;	}	if (_aborted || !vrpc->open) {	    break;	}	_vrpc_direct_call(vrpc);    }    DTRACE("VLINK %d (%d -> %d) [%s] server thread stopped/n",	   vrpc->vlink->link, vrpc->vlink->c_id, vrpc->vlink->s_id,	   (vrpc->my.info ? vrpc->my.info : ""));    while (!kthread_should_stop()) {	set_current_state(TASK_INTERRUPTIBLE);        schedule_timeout(1);    }    return 0;}
开发者ID:ItsAnilSingh,项目名称:android_kernel_samsung_logan2g,代码行数:32,


示例2: DTRACE

struct  thread_read *new_thread_read(const char *url, const char *headers, int flags) {    pthread_t       tid;    pthread_attr_t pthread_attr;    struct  thread_read *thread;    int ret;    DTRACE();    thread = malloc(sizeof(struct  thread_read));    if (!thread) {        return NULL;    }    memset(thread, 0, sizeof(*thread));    DTRACE();    thread->streambuf = streambuf_alloc(0);    if (!thread->streambuf) {        free(thread);        return NULL;    }    DTRACE();    pthread_attr_init(&pthread_attr);    pthread_attr_setstacksize(&pthread_attr, 409600);   //default joinable    pthread_mutex_init(&thread->pthread_mutex, NULL);    pthread_cond_init(&thread->pthread_cond, NULL);    thread->url = url;    thread->flags = flags;    thread->headers = headers;    thread->max_read_seek_len = MAX_READ_SEEK;    thread->toreadblocksize=32*1024;    thread->readtotalsize=0;    thread->readcnt=0;    ret = pthread_create(&tid, &pthread_attr, (void*)&thread_read_thread_run, (void*)thread);    thread->pthread_id = tid;    return thread;}
开发者ID:bywayboy,项目名称:amlogic-libplayer,代码行数:33,


示例3: DTRACE

AST_Pipeline_t *AST_ParseExpressionOrAssignment(Parser_t *parser){    AST_Pipeline_t *pipeline;    Token_t         *cmd_or_var;    DTRACE("%s: Start/n", __func__);    if ((pipeline = calloc(1, sizeof(*pipeline))) == NULL) {        return NULL;    }    cmd_or_var = parser->t;    Scanner_TokenAccept(parser);    if (parser->t->type == TOKEN_EQUALS) {        pipeline->assignment = AST_ParseAssignment(parser, cmd_or_var);    } else {        pipeline->expression = AST_ParseExpression(parser, cmd_or_var);    }    if (parser->t->type == TOKEN_SEMICOLON) {        Scanner_TokenConsume(parser);    }    DTRACE("%s: End/n", __func__);    return pipeline;}
开发者ID:ptarcher,项目名称:shell,代码行数:28,


示例4: vaudio_send_data

    static intvaudio_send_data (struct vaudio_stream* s){    NkDevRing*        ring  = s->ring;    const nku32_f     oreq = ring->ireq;    const nku32_f     nreq = oreq + 1;    const nku32_f     mask = ring->imask;    NkRingDesc*       desc = s->rbase + (oreq & mask);    bool              xirq_trigger = 0;    struct snd_pcm_runtime* runtime = s->stream->runtime;    if ((ring->iresp & mask) == (ring->ireq & mask)) {	DTRACE ("ring empty/n");	xirq_trigger = 1;    }    if ((nreq & mask) == (ring->iresp & mask)) {	DTRACE ("ring full/n");	return -ENOMEM;    }    ring->ireq = nreq;    desc->status  = NK_VAUDIO_STATUS_OK;    desc->bufsize = frames_to_bytes(runtime, runtime->period_size);#ifdef VAUDIO_CONFIG_NK_PMEM    desc->bufaddr = s->stream->dma_buffer.addr + desc->bufsize * s->period;#else    desc->bufaddr =	nkops.nk_vtop(runtime->dma_area + desc->bufsize * s->period);#endif    DTRACE ("%x %x/n", desc->bufaddr, desc->bufsize);    s->period++;    s->period %= runtime->periods;    return xirq_trigger;}
开发者ID:LinkLunk,项目名称:android_kernel_samsung_mint,代码行数:34,


示例5: rsa_test_code

static void rsa_test_code() {  DTRACE("/n/n== rsa_test_code ==/n");  DTRACE("encrypt public, decrypt private /n");  char *cipher = encrypt_publickey_fromcode(gTestData0);   if (cipher != NULL) {    char *plaintext = decrypt_privatekey_fromcode(cipher);    if (plaintext != NULL) {      DEBUG("The plaintext = %s /n", plaintext);      free(plaintext);      plaintext = NULL;    }    free(cipher);    cipher = NULL;  }    DTRACE("/n/n  encrypt private, decrypt public/n");  cipher = encrypt_privatekey_fromcode(gTestData0);   if (cipher != NULL) {    char *plaintext = decrypt_publickey_fromcode(cipher);    if (plaintext != NULL) {      DEBUG("The plaintext = %s /n", plaintext);      free(plaintext);      plaintext = NULL;    }    free(cipher);    cipher = NULL;  }}
开发者ID:daolong,项目名称:cencrypt,代码行数:29,


示例6: rsa_test_file

static void rsa_test_file() {  DEBUG("/n/n== rsa_test_file ==/n");  DTRACE("encrypt public, decrypt private /n");  char *cipher = encrypt_publickey_fromfile(gTestData0, PUBLIC_KEY_FILE);  if (cipher != NULL) {     char *plaintext = decrypt_privatekey_fromfile(cipher, PRIVATE_KEY_FILE);      if (plaintext != NULL) {      DEBUG("The plaintext = %s /n", plaintext);      free(plaintext);     }     free(cipher);  }      DTRACE("/n/n  encrypt private, decrypt public/n");  cipher = encrypt_privatekey_fromfile(gTestData0, PRIVATE_KEY_FILE);   if (cipher != NULL) {    char *plaintext = decrypt_publickey_fromfile(cipher, PUBLIC_KEY_FILE);    if (plaintext != NULL) {      DEBUG("The plaintext = %s /n", plaintext);      free(plaintext);      plaintext = NULL;    }    free(cipher);    cipher = NULL;  }}
开发者ID:daolong,项目名称:cencrypt,代码行数:27,


示例7: get_bsm

/******************************************************************************* * Name:    get_bsm * * Desc:    Searches through the BS table and returns a free BS id.  * * Params: *  avail   - pointer to store the free BS id * * Returns: SYSCALL *  OK      - on success *  SYSERR  - on error or if no free BS is available ******************************************************************************/SYSCALL get_bsm(int* avail){    uint8_t bs_id = 0;    bs_map_t *bsptr = NULL;    STATWORD ps;    disable(ps);    DTRACE_START;    if (NULL == avail) {        DTRACE("DBG$ %d %s> null pointer: avail/n", currpid, __func__);        goto RESTORE_AND_RETURN_ERROR;    }    for (bs_id = 0; bs_id < BS_NUM; ++bs_id) {        if BS_IS_FREE(bs_id) {            DTRACE("DBG$ %d %s> bs id %d is free/n", currpid, __func__, bs_id);            *avail = bs_id;            bsptr = BS_GET_PTR(bs_id);            bsptr->bsm_status = BS_INUSE;            restore(ps);            DTRACE_END;            return OK;        }    }    DTRACE("DBG$ %d %s> no free bs id is available/n", currpid, __func__);    *avail = EMPTY;RESTORE_AND_RETURN_ERROR:    DTRACE("DBG$ %d %s> returning SYSERR/n", currpid, __func__);    restore(ps);    DTRACE_END;    return SYSERR;}
开发者ID:acads,项目名称:csc501-xinu-mmu,代码行数:47,


示例8: l_is_lid_stale_for_pid

/* Name: l_is_lid_stale_for_pid * * Desc: Checks whether the lid is stale for the given pid. This happens when *       a process hasn't acquired a lock after create/release for a long time *       and the lock Id has been overflown in the system. * * Params:  *  lid     - lock ID (as known by the old proc) *  pid     - proc ID of the old proc * * Returns: int *  TRUE    - if the lid has been overflown for the given pid *  FALSE   - if the lid is still valid for the given pid */intl_is_lid_stale_for_pid(lid, pid){    STATWORD ps;    disable(ps);    DTRACE_START;    /* Check the pid in the lid's delpidmap. If present, our guy still thinks     * that he owns the lid. Well, he doesn't. Return TRUE.     */    if (TRUE == l_pidmap_oper(lid, pid, L_MAP_DELETE, L_MAP_CHK)) {        DTRACE("DBG$ %d %s> lid %d is stale for pid %d/n",  /                currpid, __func__, lid, pid);;        DTRACE_END;        restore(ps);        return TRUE;    }    DTRACE("DBG$ %d %s> lid %d is not stale for pid %d/n",  /            currpid, __func__, lid, pid);;    DTRACE_END;    restore(ps);    return FALSE;}
开发者ID:acads,项目名称:csc501-xinu-rw-locks,代码行数:39,


示例9: l_new_lid

/* Name: l_new_lid *  * Desc: Scans the lock table and returns the next available free lock.  * * Params:  *  None * * Returns: int *      Next available lock ID on success  *      SYSERR on failure. */intl_new_lid (void){    int i = 0;    int ret_lid = 0;    DTRACE_START;    for (i = 0; i < NLOCKS; ++i) {        /* Run thru all available lock IDs until we find one which we can         * use, i.e., a lock whose state is either LS_UNINIT or LS_DELETED.         */        ret_lid = next_lock--;        if (next_lock < 0) {            DTRACE("DBG$ %d %s> next_lock overflowed.. resetting next_lock"/                   " to %d/n", currpid, __func__, (NLOCKS - 1));            next_lock = (NLOCKS - 1);        }        if (LS_UNINIT == L_GET_LSTATE(ret_lid) ||                 (LS_DELETED == L_GET_LSTATE(ret_lid))) {            DTRACE("DBG$ %d %s> lid %d state changed from %s to Free %d/n",  /                    currpid, __func__, ret_lid, L_GET_LSTATESTR(ret_lid));            L_SET_LSTATE(ret_lid, LS_FREE);            DTRACE("DBG$ %d %s> returning lock %d/n",  /                    currpid, __func__, ret_lid);            DTRACE_END;            return ret_lid;        }    }    DTRACE("DBG$ %d %s> no more free locks/n", currpid, __func__);    DTRACE_END;    return SYSERR;}
开发者ID:acads,项目名称:csc501-xinu-rw-locks,代码行数:44,


示例10: AST_PrintList

void AST_PrintList(AST_List_t *pipeline_list){    int i;    DTRACE("=======================================/n");    for (i = 0; i < pipeline_list->npipelines; i++) {        AST_PrintPipeline(pipeline_list->pipelines[i]);    }    DTRACE("=======================================/n");}
开发者ID:ptarcher,项目名称:shell,代码行数:10,


示例11: pgt_update_all

/******************************************************************************* * Name:    pgt_update_all * * Desc:    Called when a frame is freed. This routine updates the page tables *          of all the active procs that uses the given frame. It usually clears *          the page table entry for the given frame and records the dirty bit *          value. * * Params:   *  fr_id   - frame id of the frame being paged out/removed * * Returns: int *  TRUE    - if the dirty bit is set for at least one proc *  FALSE   - if the dirty bit is not set for any of the procs *  EMPTY   - oops! something went wrong.. ******************************************************************************/intpgt_update_all(int fr_id){    int rc = FALSE;    int pid = 0;    STATWORD ps;    disable(ps);    DTRACE_START;    if (FALSE == FR_IS_ID_VALID(fr_id)) {        DTRACE("DBG$ %d %s> bad fr id %d/n", currpid, __func__, fr_id);        rc = EMPTY;        goto RESTORE_AND_RETURN;    }    /* If the given frame is free, the required pgt's would have been updated     * earlier. Just return.     */    if (FR_FREE == FR_GET_STATUS(fr_id)) {        DTRACE("DBG$ %d %s> fr id %d is free/n",    /                currpid, __func__, fr_id, FR_GET_STATUS(fr_id));        rc = FALSE;        goto RESTORE_AND_RETURN;    }    /* This routine is only to update the page tables when a frame is removed     * or a proc unmaps the frame. So, we only have to bother about data pages.     */    if (FR_PAGE != FR_GET_TYPE(fr_id)) {        DTRACE("DBG$ %d %s> fr id %d isn't a data frame.. type %d/n",   /                currpid, __func__, fr_id, FR_GET_TYPE(fr_id));        rc = FALSE;        goto RESTORE_AND_RETURN;    }    for (pid = 0; pid < NPROC; ++pid) {        if (PRFREE == P_GET_PSTATE(pid)) {            /* Don't bother if a proc isn't present. */            continue;        }        if (TRUE == frm_pidmap_oper(fr_id, pid, FR_OP_PMAP_CHK)) {            DTRACE("DBG$ %d %s> fr id %d is used by pid %d/n",                    currpid, __func__, fr_id, pid);            rc |= pgt_update_for_pid(fr_id, pid);        }    }RESTORE_AND_RETURN:    DTRACE_END;    restore(ps);    return rc;}
开发者ID:acads,项目名称:csc501-xinu-mmu,代码行数:70,


示例12: vpmem_module_init

    intvpmem_module_init (int is_client, vpmem_dev_init_t dev_init){    NkPhAddr       plink;    NkDevVlink*    vlink;    int 	   err = 0;    NkOsId         my_id = nkops.nk_id_get();    NkOsId         vlink_id;    vpmem_dev_t*   vpmem;    int            count = 0;    DTRACE("initializing module, my_id %ld/n", (unsigned long)my_id);    plink = 0;    while ((plink = nkops.nk_vlink_lookup(VPMEM_VLINK_NAME, plink)) != 0) {	vlink = nkops.nk_ptov(plink);	vlink_id = is_client ? vlink->c_id : vlink->s_id;	DTRACE("comparing my_id %d to vlink_id %d (c_id %d, s_id %d)/n",		my_id, vlink_id, vlink->c_id, vlink->s_id);	if (vlink_id == my_id) {	    vpmem = vpmem_dev_alloc();	    if (!vpmem) {		err = -ENOMEM;		break;	    }	    vpmem->plink = plink;	    vpmem->vlink = vlink;	    err = dev_init(vpmem);	    if (err) {		vpmem_dev_free(vpmem);		break;	    }	    count++;	    DTRACE("device %s is created for OS#%d<-OS#%d link=%d/n",		   vpmem->name, vlink->s_id, vlink->c_id, vlink->link);	}    }    DTRACE("module initialized, %u vpmem devices created, err %d/n",	    count, err);    return err;}
开发者ID:ItsAnilSingh,项目名称:android_kernel_samsung_logan2g,代码行数:52,


示例13: hw_shm_init_data

static voidhw_shm_init_data(device *me){  hw_shm_device *shm = (hw_shm_device*)device_data(me);  const device_unit *d;  reg_property_spec reg;  int i;  /* Obtain the Key Value */  if (device_find_property(me, "key") == NULL)    error("shm_init_data() required key property is missing/n");  shm->key = (key_t) device_find_integer_property(me, "key");  DTRACE(shm, ("shm key (0x%08x)/n", shm->key) );    /* Figure out where this memory is in address space and how long it is */  if ( !device_find_reg_array_property(me, "reg", 0, &reg) )    error("hw_shm_init_data() no address registered/n");  /* Determine the address and length being as paranoid as possible */  shm->physical_address = 0xffffffff;  shm->sizeof_memory = 0xffffffff;  for ( i=0 ; i<reg.address.nr_cells; i++ ) {    if (reg.address.cells[0] == 0 && reg.size.cells[0] == 0)      continue;    if ( shm->physical_address != 0xffffffff )      device_error(me, "Only single celled address ranges supported/n");    shm->physical_address = reg.address.cells[i];    DTRACE(shm, ("shm physical_address=0x%x/n", shm->physical_address));    shm->sizeof_memory = reg.size.cells[i];    DTRACE(shm, ("shm length=0x%x/n", shm->sizeof_memory));  }  if ( shm->physical_address == 0xffffffff )    device_error(me, "Address not specified/n" );  if ( shm->sizeof_memory == 0xffffffff )    device_error(me, "Length not specified/n" );  /* Now actually attach to or create the shared memory area */  shm->id = shmget(shm->key, shm->sizeof_memory, IPC_CREAT | 0660);  if (shm->id == -1)    error("hw_shm_init_data() shmget failed/n");  shm->shm_address = shmat(shm->id, (char *)0, SHM_RND);  if (shm->shm_address == (void *)-1)    error("hw_shm_init_data() shmat failed/n");}
开发者ID:5kg,项目名称:gdb,代码行数:52,


示例14: l_get_next_writer

/* Name: l_get_next_writer * * Desc: Gets the next writer to whom the write lock should be awarded. It goes *       through the list and makes the proc ready, if any and returns TRUE. If *       eligible writers are not available, it just returns FALSE. * * Params: *  lid     - read lock ID *  * Returns: int *  TRUE    - if eligible writer is available *  FLASE   - otherwise */intl_get_next_writer(int lid){    int next_pid = EMPTY;;    int nextrw = L_GET_NEXTRW(lid);    DTRACE_START;    /* Set the lstate based on the next available waiter. */    if (LT_WRITE == nextrw) {        DTRACE("DBG$ %d %s> lid %d state changed from %s to Write/n",   /                currpid, __func__, currpid, L_GET_LSTATESTR(lid));        L_SET_LSTATE(lid, LS_WRITE);    } else if (EMPTY == nextrw) {        DTRACE("DBG$ %d %s> lid %d state changed from %s to Free/n",    /                currpid, __func__, currpid, L_GET_LSTATESTR(lid));        L_SET_LSTATE(lid, LS_FREE);    } else {        DTRACE("DBG$ %d %s> bad nextrw %d for lid %d - should have been "   /                " WRITE or EMPTY/n",                                        /                currpid, __func__, currpid, lid, next_pid);        ASSERT(0);        goto RETURN_FALSE;    }    if (EMPTY == (next_pid = getlast(L_GET_LWTAIL(lid)))) {#ifdef DBG_ON        l_print_lock_details(lid);#endif /* DBG_ON */        DTRACE("DBG$ %d %s> bad pid %d in nextq tail %d for lid %d/n",  /                currpid, __func__, next_pid, L_GET_NEXTQ(lid), lid);        ASSERT(0);        goto RETURN_FALSE;    }    L_DEC_NWWRITE(lid);    L_INC_NAWRITE(lid);    /* Enqueue the waiting writer in ready queue. */    ready(next_pid, RESCHNO);    l_pidmap_oper(lid, next_pid, L_MAP_RELEASE, L_MAP_SET);    DTRACE("DBG$ %d %s> lid %d next writer lock for pid %d/n",  /            currpid, __func__, lid, next_pid);    l_recal_next(lid);    DTRACE_END;    return TRUE;RETURN_FALSE:    DTRACE_END;    return FALSE;}
开发者ID:acads,项目名称:csc501-xinu-rw-locks,代码行数:64,


示例15: hw_sem_init_data

static voidhw_sem_init_data(device *me){  hw_sem_device *sem = (hw_sem_device*)device_data(me);  const device_unit *d;  int status;  union semun help;  /* initialize the properties of the sem */  if (device_find_property(me, "key") == NULL)    error("sem_init_data() required key property is missing/n");  if (device_find_property(me, "value") == NULL)    error("sem_init_data() required value property is missing/n");  sem->key = (key_t) device_find_integer_property(me, "key");  DTRACE(sem, ("semaphore key (%d)/n", sem->key) );  sem->initial = (int) device_find_integer_property(me, "value");  DTRACE(sem, ("semaphore initial value (%d)/n", sem->initial) );  d = device_unit_address(me);  sem->physical_address = d->cells[ d->nr_cells-1 ];  DTRACE(sem, ("semaphore physical_address=0x%x/n", sem->physical_address));  /* Now to initialize the semaphore */  if ( sem->initial != -1 ) {    sem->id = semget(sem->key, 1, IPC_CREAT | 0660);    if (sem->id == -1)      error("hw_sem_init_data() semget failed/n");    help.val = sem->initial;    status = semctl( sem->id, 0, SETVAL, help );    if (status == -1)      error("hw_sem_init_data() semctl -- set value failed/n");  } else {    sem->id = semget(sem->key, 1, 0660);    if (sem->id == -1)      error("hw_sem_init_data() semget failed/n");  }  sem->count = semctl( sem->id, 0, GETVAL, help );  if (sem->count == -1)    error("hw_sem_init_data() semctl -- get value failed/n");  DTRACE(sem, ("semaphore OS value (%d)/n", sem->count) );}
开发者ID:5kg,项目名称:gdb,代码行数:50,


示例16: DTRACE

QObject* QCastPluginFactory::create (const QString &mimeType, const QUrl& url,      const QStringList& argumentNames, const QStringList& argumentValues) const{   try {      DTRACE("QCastPluginFactory::create " << mimeType.toStdString());      if (mimeType == "application/cast-displayview") {         QViewContainer* pPlug = new QViewContainer();         DMESSAGE("QViewContainer created");         if (m_pModel) {            QString viewName = url.path().mid(1); // "cogxdisp://view/<path>"            DMESSAGE("View to show " << viewName.toStdString());            auto it = m_pModel->m_Views.find(viewName.toStdString());            if (! (it == m_pModel->m_Views.end())) {               pPlug->setView(m_pModel, it->second);               DMESSAGE("setView applied: " << it->second->m_id);            }         }         return pPlug;      }   }   catch (...) {      DMESSAGE("MISERABLY FAILED");   }   return NULL;}
开发者ID:mmahnic,项目名称:cogx-display-server,代码行数:26,


示例17: RETURN_FALSE_IF_NOT_INIT

bool OverlayPlaneBase::assignToDevice(int disp){    uint32_t pipeConfig = 0;    RETURN_FALSE_IF_NOT_INIT();    VTRACE("overlay %d assigned to disp %d", mIndex, disp);    switch (disp) {    case IDisplayDevice::DEVICE_EXTERNAL:        pipeConfig = (0x2 << 6);        break;    case IDisplayDevice::DEVICE_PRIMARY:    default:        pipeConfig = 0;        break;    }    // if pipe switching happened, then disable overlay first    if (mPipeConfig != pipeConfig) {        DTRACE("overlay %d switched from %d to %d", mIndex, mDevice, disp);        disable();    }    mPipeConfig = pipeConfig;    DisplayPlane::assignToDevice(disp);    enable();    return true;}
开发者ID:OMNI-Zenfone-2,项目名称:hwcomposer,代码行数:30,


示例18: vrpc_server_open

    intvrpc_server_open (vrpc_t* vrpc, vrpc_call_t call, void* cookie, int direct){    vrpc->call    = call;    vrpc->cookie  = cookie;    if (direct) {	vrpc->wrapper = _vrpc_direct_call;	vrpc->thread  = 0;    } else {	vrpc->open = 1;		/* Thread will terminate otherwise */        vrpc->wrapper = _vrpc_indirect_call;        vrpc->thread  = kthread_run(_vrpc_server_thread, vrpc, "vrpc-server");        if (!vrpc->thread) {	    return -EFAULT;	}    }    vrpc->open = 1;    _vrpc_handshake(vrpc);    DTRACE("VLINK %d (%d -> %d) [%s] server open/n",	   vrpc->vlink->link, vrpc->vlink->c_id, vrpc->vlink->s_id,	   (vrpc->my.info ? vrpc->my.info : ""));    return 0;}
开发者ID:ItsAnilSingh,项目名称:android_kernel_samsung_logan2g,代码行数:28,


示例19: l_clear_pidmaps

/* Name: l_clear_pidmaps * * Desc: Clears all the entries corresponding to the pid in all available *       lid's pidmaps. This is usually called when a process is killed. * * Params:  *  pid     - process ID of the process whose pid-bit is to be cleared * * Returns: int *  OK      - on success *  SYSERR  - on error */ intl_clear_pidmaps(int pid){    int lid = EMPTY;    STATWORD ps;    disable(ps);    DTRACE_START;    if (isbadpid(pid)) {        DTRACE("DBG$ %d %s> bad pid %d/n", currpid, __func__, pid);        goto RETURN_ERROR;    }    /* Go thru all the locks and clear the pid-bit on all the pidmaps. */    for (lid = 0; lid < NLOCKS; ++lid) {        l_pidmap_oper(lid, pid, L_MAP_DELETE, L_MAP_CLR);        l_pidmap_oper(lid, pid, L_MAP_RELEASE, L_MAP_CLR);        l_pidmap_oper(lid, pid, L_MAP_LOG, L_MAP_CLR);    }    DTRACE_END;    restore(ps);    return OK;RETURN_ERROR:    DTRACE_END;    restore(ps);    return SYSERR;}
开发者ID:acads,项目名称:csc501-xinu-rw-locks,代码行数:41,


示例20: vrpc_client_open

    intvrpc_client_open (vrpc_t* vrpc, vrpc_ready_t ready, void* cookie){    vrpc->ready   = ready;    vrpc->cookie  = cookie;    vrpc->wrapper = _vrpc_wakeup;    if (ready) {	if (!kthread_run(_vrpc_client_thread, vrpc, "vrpc-client")) {	    return -EFAULT;	}    } else {	if (!_vrpc_wait_for_peer(vrpc)) {	    return -EFAULT;	}    }    vrpc->open = 1;    DTRACE("VLINK %d (%d -> %d) [%s] client open/n",	   vrpc->vlink->link, vrpc->vlink->c_id, vrpc->vlink->s_id,	   (vrpc->my.info ? vrpc->my.info : ""));    return 0;}
开发者ID:ItsAnilSingh,项目名称:android_kernel_samsung_logan2g,代码行数:25,


示例21: hw_disk_io_read_buffer

static unsignedhw_disk_io_read_buffer(device *me,		       void *dest,		       int space,		       unsigned_word addr,		       unsigned nr_bytes,		       cpu *processor,		       unsigned_word cia){  hw_disk_device *disk = device_data(me);  unsigned nr_bytes_read;  if (space != 0)    device_error(me, "read - extended disk addressing unimplemented");  if (nr_bytes == 0)    nr_bytes_read = 0;  else if (fseek(disk->image, addr, SEEK_SET) < 0)    nr_bytes_read = 0;  else if (fread(dest, nr_bytes, 1, disk->image) != 1)    nr_bytes_read = 0;  else    nr_bytes_read = nr_bytes;  DTRACE(disk, ("io-read - address 0x%lx, nr-bytes-read %d, requested %d/n",                (unsigned long) addr, (int)nr_bytes_read, (int)nr_bytes));  return nr_bytes_read;}
开发者ID:5kg,项目名称:gdb,代码行数:25,


示例22: remove_pgd

/******************************************************************************* * Name:    remove_pgd * * Desc:    Removes the pgd of a proc and frees the frame.  * * Params:   *  pid     - pid whose pgd has to be removed * * Returns: Nothing.  ******************************************************************************/voidremove_pgd(int pid){    int pgd_fr_id = EMPTY;    STATWORD ps;    disable(ps);    DTRACE_START;    if (isbadpid(pid) || (PRFREE == P_GET_PSTATE(pid))) {        DTRACE("DBG$ %d %s> bad pid %d or bad state %d/n",  /                currpid, __func__, pid, P_GET_PSTATE(pid));        goto RESTORE_AND_RETURN;    }    /* Each process has a pdir whose base addr is stored in pgdir field of      * the PCB. This is hosted on a frame and we need to free that frame as the     * process is being killed.     */    pgd_fr_id = FR_PA_TO_ID(P_GET_PDIR(pid));    free_frm(pgd_fr_id);RESTORE_AND_RETURN:    DTRACE_END;    restore(ps);    return;}
开发者ID:acads,项目名称:csc501-xinu-mmu,代码行数:36,


示例23: strlen

void UeventObserver::onUevent(){    char *msg = mUeventMessage;    const char *envelope = DrmConfig::getUeventEnvelope();    if (strncmp(msg, envelope, strlen(envelope)) != 0)        return;    msg += strlen(msg) + 1;    UeventListener *listener;    String8 key;    while (*msg) {        key = String8(msg);        if (mListeners.indexOfKey(key) >= 0) {            DTRACE("received Uevent: %s", msg);            listener = mListeners.valueFor(key);            if (listener) {                listener->func(listener->data);            } else {                ETRACE("no listener for uevent %s", msg);            }        }        msg += strlen(msg) + 1;    }}
开发者ID:MIPS,项目名称:hardware-intel-img-hwcomposer,代码行数:25,


示例24: hw_disk_io_write_buffer

static unsignedhw_disk_io_write_buffer(device *me,			const void *source,			int space,			unsigned_word addr,			unsigned nr_bytes,			cpu *processor,			unsigned_word cia){  hw_disk_device *disk = device_data(me);  unsigned nr_bytes_written;  if (space != 0)    device_error(me, "write - extended disk addressing unimplemented");  if (disk->read_only)    nr_bytes_written = 0;  else if (nr_bytes == 0)    nr_bytes_written = 0;  else if (fseek(disk->image, addr, SEEK_SET) < 0)    nr_bytes_written = 0;  else if (fwrite(source, nr_bytes, 1, disk->image) != 1)    nr_bytes_written = 0;  else    nr_bytes_written = nr_bytes;  DTRACE(disk, ("io-write - address 0x%lx, nr-bytes-written %d, requested %d/n",                (unsigned long) addr, (int)nr_bytes_written, (int)nr_bytes));  return nr_bytes_written;}
开发者ID:5kg,项目名称:gdb,代码行数:27,


示例25: start_programming_byte

static voidstart_programming_byte(device *me,		       hw_eeprom_device *eeprom,		       unsigned_word address,		       unsigned8 new_byte){  unsigned8 old_byte = eeprom->memory[address];  DTRACE(eeprom, ("start-programing-byte - address 0x%lx, new 0x%lx, old 0x%lx/n",		  (unsigned long)address,		  (unsigned long)new_byte,		  (unsigned long)old_byte));  eeprom->byte_program_address = address;  /* : old new : ~old : new&~old     :  0   0  :   1  :    0     :  0   1  :   1  :    1     -- can not set a bit     :  1   0  :   0  :    0     :  1   1  :   0  :    0 */  if (~old_byte & new_byte)    invalid_write(me, eeprom->state, address, new_byte, "setting cleared bit");  /* : old new : old&new     :  0   0  :    0     :  0   1  :    0     :  1   0  :    0     :  1   1  :    1 */  eeprom->byte_program_byte = new_byte & old_byte;  eeprom->memory[address] = ~new_byte & ~0x24; /* LE-bits 5:3 zero */  eeprom->program_start_time = device_event_queue_time(me);  eeprom->program_finish_time = (eeprom->program_start_time				 + eeprom->byte_write_delay);}
开发者ID:5kg,项目名称:gdb,代码行数:30,


示例26: new_pgd

/******************************************************************************* * Name:    new_pgd * * Desc:    Allocates and intializes a new page directory. Usually called during *          process creation. * * Params:  None. * * Returns: Pointer to the newly allocated pgd. NULL on error. ******************************************************************************/pd_t *new_pgd(void){    int pd_id = 0;    pd_t *new_pd = NULL;    frm_map_t *new_frame = NULL;    STATWORD ps;    disable(ps);    DTRACE_START;    new_frame = get_frm(FR_PDIR);    if (NULL == new_frame) {        DTRACE("DBG$ %d %s> get_frm() failed/n", currpid, __func__);        goto RESTORE_AND_RETURN_NULL;    }    new_frame->fr_type = FR_PDIR;    /* The PD would start at the PA of the frame that we just got. */    new_pd = (pd_t *) FR_ID_TO_PA(new_frame->fr_id);    /* Same as page tables, each pd entry is 4 bytes long. Thus, a frame which      * is 4 KB, can hold (NBPG / 4 = 1024) entries. Intially all the fields      * are set to zero. Also, every process will share the global page tables.     */    bzero(new_pd, sizeof(pd_t));    for (pd_id = 0; pd_id < PT_NGPT; ++pd_id) {        new_pd[pd_id].pd_pres = 1;        new_pd[pd_id].pd_write = 1;        new_pd[pd_id].pd_avail = 1;        /* The base should contain vpage of the frame containing the global         * page tables.         */        new_pd[pd_id].pd_base = VADDR_TO_VPAGE((unsigned) g_pt[pd_id]);    }    DTRACE("DBG$ %d %s> pgd at 0x%08x is being returned/n",  /            currpid, __func__, new_pd);    DTRACE_END;    restore(ps);    return new_pd;RESTORE_AND_RETURN_NULL:    DTRACE_END;    restore(ps);    return NULL;}
开发者ID:acads,项目名称:csc501-xinu-mmu,代码行数:57,


示例27: vaudio_sysconf_trigger

    static voidvaudio_sysconf_trigger (NkVaudio dev){    DTRACE ("Sending sysconf OS#%d(%d)->OS#%d(%d)/n",	    dev->vlink->c_id, dev->vlink->c_state,	    dev->vlink->s_id, dev->vlink->s_state);    nkops.nk_xirq_trigger(NK_XIRQ_SYSCONF, dev->vlink->s_id);}
开发者ID:LinkLunk,项目名称:android_kernel_samsung_mint,代码行数:8,


示例28: AST_PrintCommand

void AST_PrintCommand(AST_Command_t *command){    int i;    for (i = 0; i < command->argc; i++) {        DTRACE("%s ", command->argv[i]->str);    }    if (command->in) {        DTRACE("< %s ", command->in->file->str);    }    if (command->out) {        DTRACE("> %s ", command->out->file->str);    }    if (command->background) {        DTRACE("&");    }}
开发者ID:ptarcher,项目名称:shell,代码行数:17,


示例29: finish_erasing_chip

static voidfinish_erasing_chip(device *me,		    hw_eeprom_device *eeprom){  DTRACE(eeprom, ("finish-erasing-chip/n"));  memset(eeprom->memory, 0xff, eeprom->sizeof_memory);  dump_eeprom(me, eeprom);}
开发者ID:5kg,项目名称:gdb,代码行数:8,


示例30: vpmem_dev_lookup_by_name

    static vpmem_dev_t*vpmem_dev_lookup_by_name (char* name){    vpmem_dev_t* vpmem = vpmem_dev_head;    while (vpmem && strcmp(vpmem->name, name)) {	vpmem = vpmem->next;    }    if (vpmem) {	DTRACE("vpmem %s: [0x%x..0x%x]/n",	       name, vpmem->pmem_phys, vpmem->pmem_phys + vpmem->pmem_size);    } else {	DTRACE("vpmem %s not found/n", name);    }    return vpmem;}
开发者ID:ItsAnilSingh,项目名称:android_kernel_samsung_logan2g,代码行数:17,



注:本文中的DTRACE函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ DT_CTL_GET_GLOBAL函数代码示例
C++ DT函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。