Ignore:
Timestamp:
Jul 18, 2019, 2:06:55 PM (3 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_timeofday.c

    r635 r637  
    5050        process_t *    process = this->process;
    5151
     52#if (DEBUG_SYS_TIMEOFDAY || CONFIG_INSTRUMENTATION_SYSCALLS)
     53uint64_t     tm_start = hal_get_cycles();
     54#endif
     55
     56#if DEBUG_SYS_TIMEOFDAY
     57if( DEBUG_SYS_TIMEOFDAY < tm_start )
     58printk("\n[%s] thread[%x,%x] enter / cycle %d\n",
     59__FUNCTION__, process->pid, this->trdid, (uint32_t)tm_start );
     60#endif
     61 
    5262    // check tz (non supported / must be null)
    5363    if( tz )
     
    8292
    8393    // copy values to user space
    84         hal_copy_to_uspace( local_cxy,
    85                         &k_tv,
    86                         tv,
     94        hal_copy_to_uspace( tv,
     95                        XPTR( local_cxy , &k_tv ),
    8796                        sizeof(struct timeval) );
    8897
    8998    hal_fence();
    9099
     100#if (DEBUG_SYS_TIMEOFDAY || CONFIG_INSTRUMENTATION_SYSCALLS)
     101uint64_t     tm_end = hal_get_cycles();
     102#endif
     103
     104#if DEBUG_SYS_TIMEOFDAY
     105if( DEBUG_SYS_TIMEOFDAY < tm_end )
     106printk("\n[%s] thread[%x,%x] exit / cycle %d\n",
     107__FUNCTION__, process->pid, this->trdid, (uint32_t)tm_end );
     108#endif
     109 
     110#if CONFIG_INSTRUMENTATION_SYSCALLS
     111hal_atomic_add( &syscalls_cumul_cost[SYS_TIMEOFDAY] , tm_end - tm_start );
     112hal_atomic_add( &syscalls_occurences[SYS_TIMEOFDAY] , 1 );
     113#endif
     114
    91115        return 0;
    92116
Note: See TracChangeset for help on using the changeset viewer.