Ignore:
Timestamp:
Jan 13, 2021, 12:36:17 AM (12 months ago)
Author:
alain
Message:

All modifications required to support the <tcp_chat> application
including error recovery in case of packet loss.A

File:
1 edited

Legend:

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

    r670 r683  
    22 * sys_thread_exit.c - terminates the execution of calling thread
    33 *
    4  * Authors   Alain Greiner (2016,2017,2018,2019)
     4 * Authors   Alain Greiner (2016,2017,2018,2019,2020)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    4444    pid_t       pid       = process->pid;
    4545   
     46#if DEBUG_SYS_THREAD_EXIT || DEBUG_SYSCALLS_ERROR
     47uint64_t     tm_start = hal_get_cycles();
     48#endif
     49
    4650    // check exit_value pointer in user space if required
    4751    if( exit_status != NULL )
     
    5357
    5458#if DEBUG_SYSCALLS_ERROR
    55 printk("\n[ERROR] in %s : exit_status buffer %x unmapped / thread[%x,%x]\n",
    56 __FUNCTION__, (intptr_t)exit_status, process->pid, this->trdid );
     59if( DEBUG_SYSCALLS_ERROR < (uint32_t)tm_start )
     60printk("\n[WARNING] in %s : exit_status buffer %x unmapped / thread[%x,%x]\n",
     61__FUNCTION__, (intptr_t)exit_status, pid, trdid );
    5762#endif
    5863            this->errno = EINVAL;
     
    6772
    6873#if DEBUG_SYSCALLS_ERROR
    69 printk("\n[ERROR] in %s : busylocks count = %d  / thread[%x,%x]\n",
    70 __FUNCTION__ , count, process->pid, this->trdid );
     74if( DEBUG_SYSCALLS_ERROR < (uint32_t)tm_start )
     75printk("\n[WARNING] in %s : busylocks count = %d  / thread[%x,%x]\n",
     76__FUNCTION__ , count, pid, trdid );
    7177#endif
    7278            this->errno = EINVAL;
     
    8490
    8591#if DEBUG_SYS_THREAD_EXIT
    86 uint64_t     tm_start = hal_get_cycles();
    87 if( DEBUG_SYS_THREAD_EXIT < tm_start )
     92if( DEBUG_SYS_THREAD_EXIT < (uint32_t)tm_start )
    8893printk("\n[%s] thread[%x,%x] is main => delete process / cycle %d\n",
    8994__FUNCTION__ , pid , trdid , (uint32_t)tm_start );
     
    96101
    97102#if DEBUG_SYS_THREAD_EXIT
    98 uint64_t     tm_start = hal_get_cycles();
    99 if( DEBUG_SYS_THREAD_EXIT < tm_start )
     103if( DEBUG_SYS_THREAD_EXIT < (uint32_t)tm_start )
    100104printk("\n[%s] thread[%x,%x] is not main => delete thread / cycle %d\n",
    101105__FUNCTION__ , pid , trdid , (uint32_t)tm_start );
Note: See TracChangeset for help on using the changeset viewer.