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

    r635 r637  
    3333#include <remote_barrier.h>
    3434
    35 #if DEBUG_SYS_BARRIER
    3635//////////////////////////////////////////////////////
    3736static char * sys_barrier_op_str( uint32_t operation )
     
    4241        else                                    return "undefined";
    4342}
    44 #endif
    4543
    4644//////////////////////////////////
     
    7472
    7573#if DEBUG_SYSCALLS_ERROR
    76 printk("\n[ERROR] in %s : unmapped barrier %x / thread %x / process %x\n",
    77 __FUNCTION__ , vaddr , this->trdid , process->pid );
     74printk("\n[ERROR] in %s for %s : unmapped barrier %x / thread[%x,%x]\n",
     75__FUNCTION__, sys_barrier_op_str(operation), vaddr, process->pid, this->trdid );
    7876#endif
    7977        this->errno = error;
     
    9492
    9593#if DEBUG_SYSCALLS_ERROR
    96 printk("\n[ERROR] in %s : unmapped barrier attributes %x / thread %x / process %x\n",
    97 __FUNCTION__ , attr , this->trdid , process->pid );
     94printk("\n[ERROR] in %s for INIT : unmapped barrier attributes %x / thread[%x,%x]\n",
     95__FUNCTION__ , attr , process->pid , this->trdid );
    9896#endif
    9997                    this->errno = EINVAL;
     
    102100 
    103101                // copy barrier attributes into kernel space
    104                 hal_copy_from_uspace( local_cxy,
    105                                       &k_attr,
    106                                       (void*)attr,
     102                hal_copy_from_uspace( XPTR( local_cxy , &k_attr ),
     103                                      (void *)attr,
    107104                                      sizeof(pthread_barrierattr_t) );
    108105
     
    111108
    112109#if DEBUG_SYSCALLS_ERROR
    113 printk("\n[ERROR] in %s : wrong arguments / count %d / x_size %d / y_size %d / nthreads %x\n",
     110printk("\n[ERROR] in %s for INIT : count (%d) != x_size (%d) * y_size (%d) * nthreads (%x)\n",
    114111__FUNCTION__, count, k_attr.x_size, k_attr.y_size, k_attr.nthreads );
    115112#endif
     
    131128
    132129#if DEBUG_SYSCALLS_ERROR
    133 printk("\n[ERROR] in %s : cannot create barrier %x / thread %x / process %x\n",
    134 __FUNCTION__ , vaddr , this->trdid , process->pid );
     130printk("\n[ERROR] in %s for INIT : cannot create barrier %x / thread[%x,%x]\n",
     131__FUNCTION__ , vaddr , process->pid , this->trdid );
    135132#endif
    136133                this->errno = ENOMEM;
     
    148145
    149146#if DEBUG_SYSCALLS_ERROR
    150 printk("\n[ERROR] in %s : barrier %x not registered / thread %x / process %x\n",
    151 __FUNCTION__ , (intptr_t)vaddr , this->trdid , process->pid );
     147printk("\n[ERROR] in %s for WAIT : barrier %x not registered / thread[%x,%x]\n",
     148__FUNCTION__ , (intptr_t)vaddr , process->pid, this->trdid );
    152149#endif
    153150                this->errno = EINVAL;
     
    169166
    170167#if DEBUG_SYSCALLS_ERROR
    171 printk("\n[ERROR] in %s : barrier %x not registered / thread %x / process %x\n",
    172 __FUNCTION__ , (intptr_t)vaddr , this->trdid , process->pid );
     168printk("\n[ERROR] in %s for DESTROY : barrier %x not registered / thread[%x,%x]\n",
     169__FUNCTION__ , (intptr_t)vaddr , process->pid, this->trdid );
    173170#endif
    174171                this->errno = EINVAL;
Note: See TracChangeset for help on using the changeset viewer.