Ignore:
Timestamp:
May 3, 2018, 5:51:22 PM (6 years ago)
Author:
alain
Message:

1/ Fix a bug in the Multithreaded "sort" applicationr:
The pthread_create() arguments must be declared as global variables.
2/ The exit syscall can be called by any thread of a process..

File:
1 edited

Legend:

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

    r407 r440  
    22 * sys_timeofday.c - Get current time
    33 *
    4  * Author    Alain Greiner (2016,2017)
     4 * Author    Alain Greiner (2016,2017,2018)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    3737{
    3838        error_t        error;
    39     paddr_t        paddr;
     39    vseg_t       * vseg;
    4040
    4141        uint32_t       tm_s;
     
    5050    if( tz )
    5151    {
    52         printk("\n[ERROR] in %s for thread %x in process %x : tz argument must be NULL\n",
    53                __FUNCTION__ , this->trdid , process->pid );
     52
     53#if DEBUG_SYSCALLS_ERROR
     54printk("\n[ERROR] in %s for thread %x in process %x : tz argument must be NULL\n",
     55__FUNCTION__ , this->trdid , process->pid );
     56#endif
    5457        this->errno = EINVAL;
    5558        return -1;
     
    5760 
    5861    // check tv
    59     error = vmm_v2p_translate( false , tv , &paddr );
     62    error = vmm_get_vseg( process , (intptr_t)tv , &vseg );
    6063
    6164    if( error )
    6265    {
    63         printk("\n[ERROR] in %s for thread %x in process %x : tv argument unmapped\n",
    64         __FUNCTION__ , this->trdid , process->pid );
     66
     67#if DEBUG_SYSCALLS_ERROR
     68printk("\n[ERROR] in %s : user buffer tz unmapped / thread %x / process %x\n",
     69__FUNCTION__ , (intptr_t)tz , this->trdid , process->pid );
     70vmm_display( process , false );
     71#endif
    6572        this->errno = EINVAL;
    6673        return -1;
Note: See TracChangeset for help on using the changeset viewer.