Ignore:
Timestamp:
May 3, 2018, 5:51:22 PM (7 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_stat.c

    r407 r440  
    22 * sys_stat.c - Return statistics on a file or directory.
    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;         // for user space checking
    4040    struct stat   k_stat;       // kernel space
    4141    xptr_t        file_xp;
     
    4646
    4747    // check stat structure in user space
    48     error = vmm_v2p_translate( false , u_stat , &paddr );
     48    error = vmm_get_vseg( process , (intptr_t)u_stat , &vseg );
    4949
    5050        if( error )
    5151        {
    52         printk("\n[ERROR] in %s : stat structure unmapped  for thread %x in process %x\n",
    53                __FUNCTION__ , this->trdid , process->pid );
     52
     53#if DEBUG_SYCALL_ERROR
     54printk("\n[ERROR] in %s : stat structure unmapped %x / thread %x / process %x\n",
     55__FUNCTION__ , (intptr_t)u_stat , this->trdid , process->pid );
     56vmm_display( process , false );
     57#endif
    5458                this->errno = EINVAL;
    5559                return -1;
Note: See TracChangeset for help on using the changeset viewer.