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

    r566 r637  
    11/*
    2  * sys_thread_wakeup.c - wakeup all indicated threads
     2 * sys_thread_wakeup.c - wakeup indicated thread
    33 *
    4  * Author    Alain Greiner (2016,2017)
     4 * Author    Alain Greiner (2016,2017,2018,2019)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    3636    process_t * process = this->process;
    3737
     38#if (DEBUG_SYS_THREAD_WAKEUP || CONFIG_INSTRUMENTATION_SYSCALLS)
     39uint64_t     tm_start = hal_get_cycles();
     40#endif
     41
    3842#if DEBUG_SYS_THREAD_WAKEUP
    39 uint64_t     tm_start;
    40 uint64_t     tm_end;
    41 tm_start = hal_get_cycles();
    4243if( DEBUG_SYS_THREAD_WAKEUP < tm_start )
    43 printk("\n[DBG] %s : thread %x in process enter to activate thread %x / cycle %d\n",
     44printk("\n[%s] thread %x in process enter to activate thread %x / cycle %d\n",
    4445__FUNCTION__, this->trdid, process->pid, trdid, (uint32_t)tm_start );
    4546#endif
     
    5051
    5152    // check trdid argument
    52         if( (target_ltid >= CONFIG_THREADS_MAX_PER_CLUSTER) || cluster_is_undefined( target_cxy ) ) 
     53        if( (target_ltid >= CONFIG_THREADS_MAX_PER_CLUSTER) ||
     54        (cluster_is_active( target_cxy ) == false) ) 
    5355        {
    5456
     
    7880    thread_unblock( thread_xp , THREAD_BLOCKED_GLOBAL );
    7981
     82#if (DEBUG_SYS_THREAD_WAKEUP || CONFIG_INSTRUMENTATION_SYSCALLS)
     83uint64_t     tm_end = hal_get_cycles();
     84#endif
     85
     86
    8087#if DEBUG_SYS_THREAD_WAKEUP
    81 tm_end = hal_get_cycles();
    8288if( DEBUG_SYS_THREAD_WAKEUP < tm_end )
    83 printk("\n[DBG] %s : thread %x in process %x exit / thread %x activated / cycle %d\n",
     89printk("\n[%s] thread %x in process %x exit / thread %x activated / cycle %d\n",
    8490__FUNCTION__ , this->trdid, process->pid, trdid, (uint32_t)tm_end );
     91#endif
     92
     93#if CONFIG_INSTRUMENTATION_SYSCALLS
     94hal_atomic_add( &syscalls_cumul_cost[SYS_THREAD_WAKEUP] , tm_end - tm_start );
     95hal_atomic_add( &syscalls_occurences[SYS_THREAD_WAKEUP] , 1 );
    8596#endif
    8697
Note: See TracChangeset for help on using the changeset viewer.