Changeset 133 in flair-src for trunk/lib/FlairCore/src/Thread.cpp


Ignore:
Timestamp:
Feb 9, 2017, 11:08:31 AM (5 years ago)
Author:
Sanahuja Guillaume
Message:

modif sterror

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/Thread.cpp

    r15 r133  
    8787#ifdef __XENO__
    8888  int status = rt_task_sleep_until(time);
    89   if (status != 0)
     89  if (status != 0) {
     90                char errorMsg[256];
    9091    Err("%s, error rt_task_sleep_until (%s), resume time: %lld, actual time: "
    91         "%lld\n",
    92         ObjectName().c_str(), strerror(-status), time, GetTime());
     92        "%lld\n", ObjectName().c_str(), strerror_r(-status, errorMsg, sizeof(errorMsg)), time, GetTime());
     93        }
    9394// Printf("rt_task_sleep_until, resume time: %lld, actual time:
    9495// %lld\n",time,GetTime());
     
    104105#ifdef __XENO__
    105106  int status = rt_task_sleep(time * 1000 * 1000);
    106   if (status != 0)
    107     Err("erreur rt_task_sleep (%s)\n", strerror(-status));
     107  if (status != 0) {
     108                char errorMsg[256];
     109    Err("erreur rt_task_sleep (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
     110        }
    108111#else
    109112  usleep(time * 1000);
     
    114117#ifdef __XENO__
    115118  int status = rt_task_sleep(time * 1000);
    116   if (status != 0)
    117     Err("erreur rt_task_sleep (%s)\n", strerror(-status));
     119  if (status != 0) {
     120                char errorMsg[256];
     121    Err("erreur rt_task_sleep (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
     122        }
    118123#else
    119124  usleep(time);
Note: See TracChangeset for help on using the changeset viewer.