Ignore:
Timestamp:
Jan 13, 2021, 12:36:17 AM (4 years 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_timeofday.c

    r637 r683  
    22 * sys_timeofday.c - Get current time
    33 *
    4  * Author    Alain Greiner (2016,2017,2018,2019)
     4 * Author    Alain Greiner      (2016,2017,2018,2019,2020)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    3232#include <core.h>
    3333#include <shared_syscalls.h>
    34 
    3534#include <syscalls.h>
    3635
     
    5049        process_t *    process = this->process;
    5150
    52 #if (DEBUG_SYS_TIMEOFDAY || CONFIG_INSTRUMENTATION_SYSCALLS)
     51#if DEBUG_SYS_TIMEOFDAY || DEBUG_SYSCALLS_ERROR || CONFIG_INSTRUMENTATION_SYSCALLS
    5352uint64_t     tm_start = hal_get_cycles();
    5453#endif
    5554
    5655#if DEBUG_SYS_TIMEOFDAY
    57 if( DEBUG_SYS_TIMEOFDAY < tm_start )
     56if( DEBUG_SYS_TIMEOFDAY < (uint32_t)tm_start )
    5857printk("\n[%s] thread[%x,%x] enter / cycle %d\n",
    5958__FUNCTION__, process->pid, this->trdid, (uint32_t)tm_start );
     
    6564
    6665#if DEBUG_SYSCALLS_ERROR
    67 printk("\n[ERROR] in %s for thread %x in process %x : tz argument must be NULL\n",
     66if( DEBUG_SYSCALLS_ERROR < (uint32_t)tm_start )
     67printk("\n[ERROR] in %s : thread[%x,%x] / tz argument must be NULL\n",
    6868__FUNCTION__ , this->trdid , process->pid );
    6969#endif
     
    7979
    8080#if DEBUG_SYSCALLS_ERROR
    81 printk("\n[ERROR] in %s : user buffer tz unmapped / thread %x / process %x\n",
    82 __FUNCTION__ , (intptr_t)tz , this->trdid , process->pid );
     81if( DEBUG_SYSCALLS_ERROR < (uint32_t)tm_start )
     82printk("\n[ERROR] in %s : thread[%x,%x] / user buffer tv unmapped\n",
     83__FUNCTION__ , this->trdid , process->pid , (intptr_t)tz );
    8384#endif
    8485        this->errno = EINVAL;
Note: See TracChangeset for help on using the changeset viewer.