Ignore:
Timestamp:
Jul 18, 2019, 2:06:55 PM (5 years ago)
Author:
alain
Message:

Introduce the non-standard pthread_parallel_create() system call
and re-write the <fft> and <sort> applications to improve the
intrinsic paralelism in applications.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/syscalls/sys_get_cycle.c

    r635 r637  
    4545    process_t * process = this->process;
    4646
     47#if (DEBUG_SYS_GET_CYCLE || CONFIG_INSTRUMENTATION_SYSCALLS)
     48uint64_t     tm_start = hal_get_cycles();
     49#endif
     50
    4751    // check buffer in user space
    4852    error = vmm_get_vseg( process , (intptr_t)cycle , &vseg );
     
    6367
    6468    // copy to user space
    65         hal_copy_to_uspace( local_cxy, &k_cycle, cycle, sizeof(uint64_t) );
     69        hal_copy_to_uspace( cycle,
     70                        XPTR( local_cxy , &k_cycle ),
     71                        sizeof(uint64_t) );
     72
     73#if (DEBUG_SYS_GET_CYCLE || CONFIG_INSTRUMENTATION_SYSCALLS)
     74uint64_t     tm_end = hal_get_cycles();
     75#endif
     76
     77#if DEBUG_SYS_GET_CYCLE
     78if( DEBUG_SYS_GET_CYCLE < tm_end )
     79printk("\n[%s] thread[%x,%x] exit / cycle %d\n",
     80__FUNCTION__ , process->pid, this->trdid, (uint32_t)tm_end );
     81#endif
     82
     83#if CONFIG_INSTRUMENTATION_SYSCALLS
     84hal_atomic_add( &syscalls_cumul_cost[SYS_GET_CYCLE] , tm_end - tm_start );
     85hal_atomic_add( &syscalls_occurences[SYS_GET_CYCLE] , 1 );
     86#endif
    6687
    6788        return 0;
Note: See TracChangeset for help on using the changeset viewer.