Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OAI-RAN-5G-sheduler_MaxTBS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MAQ5G-PFC
OAI-RAN-5G-sheduler_MaxTBS
Commits
6bba411e
Commit
6bba411e
authored
8 years ago
by
Cedric Roux
Browse files
Options
Downloads
Plain Diff
Merge branch '148-bugfix-Expressmimo2-driver' into develop_integration_wk01
parents
6f9ba77b
18c3a323
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c
+18
-6
18 additions, 6 deletions
targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c
with
18 additions
and
6 deletions
targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c
+
18
−
6
View file @
6bba411e
...
...
@@ -298,6 +298,8 @@ static void *watchdog_thread(void *arg) {
int
first_acquisition
;
struct
timespec
sleep_time
,
wait
;
int
ret
;
wait
.
tv_sec
=
0
;
wait
.
tv_nsec
=
50000000L
;
...
...
@@ -405,10 +407,10 @@ static void *watchdog_thread(void *arg) {
first_acquisition
=
1
;
printf
(
"Locking watchdog for first acquisition
\n
"
);
pthread_mutex_timedlock
(
&
exm
->
watchdog_mutex
,
&
wait
);
ret
=
pthread_mutex_timedlock
(
&
exm
->
watchdog_mutex
,
&
wait
);
// main loop to keep up with DMA transfers from exmimo2
int
cnt_diff0
=
0
;
unsigned
long
long
cnt_diff0
=
0
;
while
((
!
oai_exit
)
&&
(
!
exm
->
watchdog_exit
))
{
if
(
exm
->
daq_state
==
running
)
{
...
...
@@ -425,7 +427,15 @@ static void *watchdog_thread(void *arg) {
exm
->
last_mbox
=
mbox
;
if
(
first_acquisition
==
0
)
pthread_mutex_timedlock
(
&
exm
->
watchdog_mutex
,
&
wait
);
{
ret
=
pthread_mutex_timedlock
(
&
exm
->
watchdog_mutex
,
&
wait
);
if
(
ret
)
{
// exm->watchdog_exit = 1;
printf
(
"watchdog_thread pthread_mutex_timedlock error = %d
\n
"
,
ret
);
continue
;
}
}
exm
->
ts
+=
(
diff
*
exm
->
samples_per_frame
/
150
)
;
...
...
@@ -434,7 +444,7 @@ static void *watchdog_thread(void *arg) {
(
diff
>
16
)
&&
(
first_acquisition
==
0
))
{
// we're too late so exit
exm
->
watchdog_exit
=
1
;
printf
(
"exiting, too late to keep up
\n
"
);
printf
(
"exiting, too late to keep up
- diff = %d
\n
"
,
diff
);
}
first_acquisition
=
0
;
...
...
@@ -443,7 +453,7 @@ static void *watchdog_thread(void *arg) {
cnt_diff0
++
;
if
(
cnt_diff0
==
10
)
{
exm
->
watchdog_exit
=
1
;
printf
(
"exiting, HW stopped
\n
"
);
printf
(
"exiting, HW stopped
%llu
\n
"
,
cnt_diff0
);
}
}
else
...
...
@@ -454,9 +464,11 @@ static void *watchdog_thread(void *arg) {
(
exm
->
ts
-
exm
->
last_ts_rx
>
exm
->
samples_per_frame
))
{
exm
->
watchdog_exit
=
1
;
printf
(
"RX Overflow, exiting (TS %llu, TS last read %llu)
\n
"
,
exm
->
ts
,
exm
->
last_ts_rx
);
(
long
long
unsigned
int
)
exm
->
ts
,(
long
long
unsigned
int
)
exm
->
last_ts_rx
);
}
// printf("ts %lu, last_ts_rx %lu, mbox %d, diff %d\n",exm->ts, exm->last_ts_rx,mbox,diff);
if
(
!
ret
)
pthread_mutex_unlock
(
&
exm
->
watchdog_mutex
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment