Ignore:
Timestamp:
Mar 28, 2018, 2:40:29 PM (4 years ago)
Author:
alain
Message:

Fix various bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/devices/dev_mmc.c

    r407 r437  
    22 * dev_mmc.c - MMC (Memory Cache Controler) generic device API implementation.
    33 *
    4  * Author  Alain Greiner    (2016)
     4 * Author  Alain Greiner    (2016,2017,2018)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    9999    thread_t * this = CURRENT_THREAD;
    100100
    101     mmc_dmsg("\n[DBG] %s enters for thread %x in process %x / buf_xp = %l\n",
    102                  __FUNCTION__ , this->trdid , this->process->pid , buf_xp );
     101#if CONFIG_DEBUG_DEV_MMC
     102uint32_t cycle = (uint32_t)hal_get_cycles();
     103if( CONFIG_DEBUG_DEV_MMC < cycle )
     104printk("\n[DBG] %s : thread %x enters / process %x / buf_xp = %l\n",
     105__FUNCTION__, this, this->process->pid , buf_xp );
     106#endif
    103107
    104108    // get buffer cluster and local pointer
     
    124128    error = dev_mmc_access( this );
    125129
    126     mmc_dmsg("\n[DBG] %s completes for thread %x in process %x / error = %d\n",
    127              __FUNCTION__ , this->trdid , this->process->pid , error );
     130#if CONFIG_DEBUG_DEV_MMC
     131cycle = (uint32_t)hal_get_cycles();
     132if( CONFIG_DEBUG_DEV_MMC < cycle )
     133printk("\n[DBG] %s : thread %x exit / process %x / buf_xp = %l\n",
     134__FUNCTION__, this, this->process->pid , buf_xp );
     135#endif
    128136
    129137    return error;
     
    139147    thread_t * this = CURRENT_THREAD;
    140148
    141     mmc_dmsg("\n[DBG] %s enters for thread %x in process %x / buf_xp = %l\n",
    142                  __FUNCTION__ , this->trdid , this->process->pid , buf_xp );
     149#if CONFIG_DEBUG_DEV_MMC
     150uint32_t cycle = (uint32_t)hal_get_cycles();
     151if( CONFIG_DEBUG_DEV_MMC < cycle )
     152printk("\n[DBG] %s : thread %x enters / process %x / buf_xp = %l\n",
     153__FUNCTION__, this, this->process->pid , buf_xp );
     154#endif
    143155
    144156    // get buffer cluster and local pointer
     
    164176    error = dev_mmc_access( this );
    165177
    166     mmc_dmsg("\n[DBG] %s completes for thread %x in process %x / error = %d\n",
    167                  __FUNCTION__ , this->trdid , this->process->pid , error );
     178#if CONFIG_DEBUG_DEV_MMC
     179cycle = (uint32_t)hal_get_cycles();
     180if( CONFIG_DEBUG_DEV_MMC < cycle )
     181printk("\n[DBG] %s : thread %x exit / process %x / buf_xp = %l\n",
     182__FUNCTION__, this, this->process->pid , buf_xp );
     183#endif
    168184
    169185    return error;
Note: See TracChangeset for help on using the changeset viewer.