Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangjie
OpenXG-RAN
Commits
fb39c1e2
Commit
fb39c1e2
authored
Apr 11, 2019
by
laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE on same machine and simulated rf is too fast for implicit synchronization
parent
ee547c1d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
18 deletions
+33
-18
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-0
common/utils/threadPool/thread-pool.h
common/utils/threadPool/thread-pool.h
+30
-18
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+1
-0
targets/RT/USER/lte-uesoftmodem.c
targets/RT/USER/lte-uesoftmodem.c
+1
-0
No files found.
cmake_targets/CMakeLists.txt
View file @
fb39c1e2
...
...
@@ -2166,6 +2166,7 @@ target_link_libraries (lte-softmodem-nos1 ${T_LIB})
add_executable
(
lte-uesoftmodem
${
OPENAIR_TARGETS
}
/RT/USER/rt_wrapper.c
${
OPENAIR_DIR
}
/common/utils/threadPool/thread-pool.c
${
OPENAIR_TARGETS
}
/RT/USER/lte-ue.c
${
OPENAIR_TARGETS
}
/RT/USER/lte-uesoftmodem.c
${
OPENAIR_TARGETS
}
/RT/USER/lte-softmodem-common.c
...
...
common/utils/threadPool/thread-pool.h
View file @
fb39c1e2
...
...
@@ -77,41 +77,60 @@ static inline void delNotifiedFIFO_elt(notifiedFIFO_elt_t *elt) {
//LOG_W(UTIL,"delNotifiedFIFO on something not allocated by newNotifiedFIFO\n");
}
static
inline
void
initNotifiedFIFO_nothreadSafe
(
notifiedFIFO_t
*
nf
)
{
nf
->
inF
=
NULL
;
nf
->
outF
=
NULL
;
}
static
inline
void
initNotifiedFIFO
(
notifiedFIFO_t
*
nf
)
{
mutexinit
(
nf
->
lockF
);
condinit
(
nf
->
notifF
);
nf
->
inF
=
NULL
;
nf
->
outF
=
NULL
;
initNotifiedFIFO_nothreadSafe
(
nf
);
// No delete function: the creator has only to free the memory
}
static
inline
void
pushNotifiedFIFO
(
notifiedFIFO_t
*
nf
,
notifiedFIFO_elt_t
*
msg
)
{
mutexlock
(
nf
->
lockF
);
static
inline
void
pushNotifiedFIFO_nothreadSafe
(
notifiedFIFO_t
*
nf
,
notifiedFIFO_elt_t
*
msg
)
{
msg
->
next
=
NULL
;
if
(
nf
->
outF
==
NULL
)
nf
->
outF
=
msg
;
if
(
nf
->
inF
)
if
(
nf
->
inF
!=
NULL
)
nf
->
inF
->
next
=
msg
;
nf
->
inF
=
msg
;
condbroadcast
(
nf
->
notifF
);
mutexunlock
(
nf
->
lockF
);
}
static
inline
notifiedFIFO_elt_t
*
pullNotifiedFIFO
(
notifiedFIFO_t
*
nf
)
{
static
inline
void
pushNotifiedFIFO
(
notifiedFIFO_t
*
nf
,
notifiedFIFO_elt_t
*
msg
)
{
mutexlock
(
nf
->
lockF
);
pushNotifiedFIFO_nothreadSafe
(
nf
,
msg
);
condbroadcast
(
nf
->
notifF
);
mutexunlock
(
nf
->
lockF
);
}
while
(
!
nf
->
outF
)
condwait
(
nf
->
notifF
,
nf
->
lockF
);
static
inline
notifiedFIFO_elt_t
*
pullNotifiedFIFO_nothreadSafe
(
notifiedFIFO_t
*
nf
)
{
if
(
nf
->
outF
==
NULL
)
return
NULL
;
notifiedFIFO_elt_t
*
ret
=
nf
->
outF
;
if
(
nf
->
outF
==
nf
->
outF
->
next
)
LOG_E
(
TMR
,
"Circular list in thread pool: push several times the same buffer is forbidden
\n
"
);
nf
->
outF
=
nf
->
outF
->
next
;
if
(
nf
->
outF
==
NULL
)
nf
->
inF
=
NULL
;
return
ret
;
}
static
inline
notifiedFIFO_elt_t
*
pullNotifiedFIFO
(
notifiedFIFO_t
*
nf
)
{
mutexlock
(
nf
->
lockF
);
notifiedFIFO_elt_t
*
ret
;
while
((
ret
=
pullNotifiedFIFO_nothreadSafe
(
nf
))
==
NULL
)
condwait
(
nf
->
notifF
,
nf
->
lockF
);
mutexunlock
(
nf
->
lockF
);
return
ret
;
}
...
...
@@ -122,14 +141,7 @@ static inline notifiedFIFO_elt_t *pollNotifiedFIFO(notifiedFIFO_t *nf) {
if
(
tmp
!=
0
)
return
NULL
;
notifiedFIFO_elt_t
*
ret
=
nf
->
outF
;
if
(
ret
!=
NULL
)
nf
->
outF
=
nf
->
outF
->
next
;
if
(
nf
->
outF
==
NULL
)
nf
->
inF
=
NULL
;
notifiedFIFO_elt_t
*
ret
=
pullNotifiedFIFO_nothreadSafe
(
nf
);
mutexunlock
(
nf
->
lockF
);
return
ret
;
}
...
...
targets/RT/USER/lte-ue.c
View file @
fb39c1e2
...
...
@@ -1642,6 +1642,7 @@ void *UE_thread(void *arg) {
pthread_mutex_unlock
(
&
proc
->
mutex_rxtx
);
}
usleep
(
2000
);
}
LOG_D
(
PHY
,
"Process Subframe %d thread Idx %d
\n
"
,
sub_frame
,
UE
->
current_thread_id
[
sub_frame
]);
...
...
targets/RT/USER/lte-uesoftmodem.c
View file @
fb39c1e2
...
...
@@ -377,6 +377,7 @@ static void *scope_thread(void *arg) {
PHY_vars_UE_g
[
0
][
0
],
0
,
0
,
7
);
usleep
(
10
*
1000
);
// printf("%s",stats_buffer);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment