Commit e2217441 authored by Claes Sjofors's avatar Claes Sjofors

Conversion of pwr_tTime to stuct timesped was missing

parent a034befd
......@@ -185,7 +185,12 @@ time_LoopWait (
#endif
}
#elif defined(OS_LYNX) || defined(OS_LINUX)
nanosleep( (struct timespec *) &wait_time, NULL);
{
struct timespec wait_time_ts;
wait_time_ts.tv_sec = wait_time.tv_sec;
wait_time_ts.tv_nsec = wait_time.tv_nsec;
nanosleep( &wait_time_ts, NULL);
}
#endif
ls->PreviousTime = t;
return 1;
......
......@@ -53,6 +53,7 @@ qos_WaitQueOld (
)
{
pwr_tDeltaTime dtime;
struct timespec dtime_ts;
sigset_t newset;
siginfo_t info;
int ok;
......@@ -76,7 +77,11 @@ qos_WaitQueOld (
qdb_Unlock;
if (tmo != qcom_cTmoEternal) {
ok = sigtimedwait(&newset, &info, (struct timespec *)time_MsToD(&dtime, tmo));
time_MsToD(&dtime, tmo);
dtime_ts.tv_sec = dtime.tv_sec;
dtime_ts.tv_nsec = dtime.tv_nsec;
ok = sigtimedwait(&newset, &info, &dtime_ts);
} else {
for (;;) {
ok = sigwaitinfo(&newset, &info);
......@@ -114,6 +119,7 @@ qos_WaitQue (
{
pwr_tDeltaTime dtime;
pwr_tTime atime;
struct timespec atime_ts;
int ok;
pwr_tBoolean signal = FALSE;
pwr_dStatus (sts, status, QCOM__SUCCESS);
......@@ -134,7 +140,10 @@ qos_WaitQue (
time_GetTime(&atime);
time_MsToD(&dtime, tmo);
time_Aadd(&atime, &atime, &dtime);
ok = pthread_cond_timedwait(&qp->lock.cond, &qp->lock.mutex, (struct timespec *) &atime);
atime_ts.tv_sec = atime.tv_sec;
atime_ts.tv_nsec = atime.tv_nsec;
ok = pthread_cond_timedwait(&qp->lock.cond, &qp->lock.mutex, &atime_ts);
} else {
ok = pthread_cond_wait(&qp->lock.cond, &qp->lock.mutex);
}
......
......@@ -50,6 +50,7 @@ qos_WaitQue (
)
{
pwr_tDeltaTime dtime;
struct timespec dtime_ts;
sigset_t newset;
sigset_t oldset;
siginfo_t info;
......@@ -73,7 +74,10 @@ qos_WaitQue (
qdb_Unlock;
if (tmo != qcom_cTmoEternal) {
ok = sigtimedwait(&newset, &info, (struct timespec *)time_MsToD(&dtime, tmo));
time_MsToD(&dtime, tmo);
dtime_ts.tv_sec = dtime.tv_sec;
dtime_ts.tv_nsec = dtime.tv_nsec;
ok = sigtimedwait(&newset, &info, &dtime_ts);
} else {
ok = sigwaitinfo(&newset, &info);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment