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 ( ...@@ -185,7 +185,12 @@ time_LoopWait (
#endif #endif
} }
#elif defined(OS_LYNX) || defined(OS_LINUX) #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 #endif
ls->PreviousTime = t; ls->PreviousTime = t;
return 1; return 1;
......
...@@ -53,6 +53,7 @@ qos_WaitQueOld ( ...@@ -53,6 +53,7 @@ qos_WaitQueOld (
) )
{ {
pwr_tDeltaTime dtime; pwr_tDeltaTime dtime;
struct timespec dtime_ts;
sigset_t newset; sigset_t newset;
siginfo_t info; siginfo_t info;
int ok; int ok;
...@@ -76,7 +77,11 @@ qos_WaitQueOld ( ...@@ -76,7 +77,11 @@ qos_WaitQueOld (
qdb_Unlock; qdb_Unlock;
if (tmo != qcom_cTmoEternal) { 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 { } else {
for (;;) { for (;;) {
ok = sigwaitinfo(&newset, &info); ok = sigwaitinfo(&newset, &info);
...@@ -114,6 +119,7 @@ qos_WaitQue ( ...@@ -114,6 +119,7 @@ qos_WaitQue (
{ {
pwr_tDeltaTime dtime; pwr_tDeltaTime dtime;
pwr_tTime atime; pwr_tTime atime;
struct timespec atime_ts;
int ok; int ok;
pwr_tBoolean signal = FALSE; pwr_tBoolean signal = FALSE;
pwr_dStatus (sts, status, QCOM__SUCCESS); pwr_dStatus (sts, status, QCOM__SUCCESS);
...@@ -134,7 +140,10 @@ qos_WaitQue ( ...@@ -134,7 +140,10 @@ qos_WaitQue (
time_GetTime(&atime); time_GetTime(&atime);
time_MsToD(&dtime, tmo); time_MsToD(&dtime, tmo);
time_Aadd(&atime, &atime, &dtime); 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 { } else {
ok = pthread_cond_wait(&qp->lock.cond, &qp->lock.mutex); ok = pthread_cond_wait(&qp->lock.cond, &qp->lock.mutex);
} }
......
...@@ -50,6 +50,7 @@ qos_WaitQue ( ...@@ -50,6 +50,7 @@ qos_WaitQue (
) )
{ {
pwr_tDeltaTime dtime; pwr_tDeltaTime dtime;
struct timespec dtime_ts;
sigset_t newset; sigset_t newset;
sigset_t oldset; sigset_t oldset;
siginfo_t info; siginfo_t info;
...@@ -73,7 +74,10 @@ qos_WaitQue ( ...@@ -73,7 +74,10 @@ qos_WaitQue (
qdb_Unlock; qdb_Unlock;
if (tmo != qcom_cTmoEternal) { 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 { } else {
ok = sigwaitinfo(&newset, &info); 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