Ignore:
Timestamp:
Jul 3, 2017, 2:17:20 PM (5 years ago)
Author:
alain
Message:

Fix bugs in hal_remote, hal uspace, hal_special

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/core/hal_special.c

    r101 r121  
    3333
    3434
    35 ///////////////////
    36 gid_t hal_get_gid()
     35//////////////////////////
     36inline gid_t hal_get_gid()
    3737{
    3838        uint32_t proc_id;
     
    4141
    4242        return (proc_id & 0x3FF);  // 4/4/2 format for TSAR
     43}
     44
     45////////////////////////////////
     46inline cycle_t hal_time_stamp()
     47{
     48    cycle_t count;
     49
     50        asm volatile ("mfc0   %0,  $9  " : "=&r" (count));
     51
     52    return count;
    4353}
    4454
     
    5767
    5868    // get current time stamp from hardware register
    59         asm volatile ("mfc0   %0,  $9  " : "=&r" (current_count));
     69        current_count = hal_time_stamp();
    6070
    6171        // compute number of elapsed cycles, taking into account 32 bits register wrap
     
    7585}
    7686
    77 //////////////////////////////////////////
    78 struct thread_s * hal_get_current_thread()
     87/////////////////////////////////////////////////
     88inline struct thread_s * hal_get_current_thread()
    7989{
    8090        void * thread_ptr;
Note: See TracChangeset for help on using the changeset viewer.