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_sem.c

    r635 r637  
    5858    process_t      * process = this->process;
    5959
     60#if (DEBUG_SYS_SEM || CONFIG_INSTRUMENTATION_SYSCALLS)
     61uint64_t     tm_start = hal_get_cycles();
     62#endif
     63
    6064#if DEBUG_SYS_SEM
    61 uint64_t    tm_start;
    62 uint64_t    tm_end;
    63 tm_start = hal_get_cycles();
    6465if( DEBUG_SYS_SEM < tm_start )
    6566printk("\n[DBG] %s : thread %x in process %x enter for %s / cycle %d\n",
     
    137138 
    138139            // return value to user
    139             hal_copy_to_uspace( local_cxy,
    140                                 &current,
    141                                 current_value,
     140            hal_copy_to_uspace( current_value,
     141                                XPTR( local_cxy , &current ),
    142142                                sizeof(uint32_t) );
    143143        }
     
    224224    hal_fence();
    225225
     226#if (DEBUG_SYS_SEM || CONFIG_INSTRUMENTATION_SYSCALLS)
     227uint64_t     tm_end = hal_get_cycles();
     228#endif
     229
    226230#if DEBUG_SYS_SEM
    227 tm_end = hal_get_cycles();
    228231if( DEBUG_SYS_SEM < tm_end )
    229232printk("\n[DBG] %s : thread %x in process %x exit for %s / cost = %d / cycle %d\n",
     
    232235#endif
    233236
     237#if CONFIG_INSTRUMENTATION_SYSCALLS
     238hal_atomic_add( &syscalls_cumul_cost[SYS_SEM] , tm_end - tm_start );
     239hal_atomic_add( &syscalls_occurences[SYS_SEM] , 1 );
     240#endif
     241
    234242    return 0;
    235243
Note: See TracChangeset for help on using the changeset viewer.