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
lizhongxiao
OpenXG-RAN
Commits
1085e562
Commit
1085e562
authored
Dec 10, 2019
by
Wang Tsu-Han
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
using structure pointer for dlsch thread's parameter
parent
203ff5a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
19 deletions
+18
-19
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+1
-1
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+17
-18
No files found.
openair1/PHY/defs_gNB.h
View file @
1085e562
...
...
@@ -663,7 +663,7 @@ typedef struct PHY_VARS_gNB_s {
// LTE_eNB_ULSCH_t *ulsch[NUMBER_OF_UE_MAX+1]; // Nusers + number of RA
NR_gNB_DLSCH_t
*
dlsch_SI
,
*
dlsch_ra
,
*
dlsch_p
;
NR_gNB_DLSCH_t
*
dlsch_PCH
;
NR_gNB_DLSCH_thread_t
dlsch_thread
;
//dlsch thread structure;
NR_gNB_DLSCH_thread_t
*
dlsch_thread
;
//dlsch thread structure;
/*
LTE_eNB_UE_stats UE_stats[NUMBER_OF_UE_MAX];
LTE_eNB_UE_stats *UE_stats_ptr[NUMBER_OF_UE_MAX];
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
1085e562
...
...
@@ -157,7 +157,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
uint8_t
num_dci
=
0
,
num_pdsch_rnti
;
NR_DL_FRAME_PARMS
*
fp
=&
gNB
->
frame_parms
;
nfapi_nr_config_request_t
*
cfg
=
&
gNB
->
gNB_config
;
NR_gNB_DLSCH_thread_t
*
dlsch_thread
=
&
gNB
->
dlsch_thread
;
NR_gNB_DLSCH_thread_t
*
dlsch_thread
=
gNB
->
dlsch_thread
;
int
offset
=
gNB
->
CC_id
;
uint8_t
ssb_frame_periodicity
;
// every how many frames SSB are generated
int
txdataF_offset
=
(
slot
%
2
)
*
fp
->
samples_per_slot_wCP
;
...
...
@@ -166,7 +166,6 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
num_dci
=
gNB
->
pdcch_vars
.
num_dci
;
num_pdsch_rnti
=
gNB
->
pdcch_vars
.
num_pdsch_rnti
;
if
(
cfg
->
sch_config
.
ssb_periodicity
.
value
<
20
)
ssb_frame_periodicity
=
1
;
else
...
...
@@ -250,7 +249,7 @@ static void *nr_pdsch_thread(void *param) {
while
(
!
oai_exit
)
{
dlsch
=
&
gNB
->
dlsch_thread
;
dlsch
=
gNB
->
dlsch_thread
;
fp
=
&
gNB
->
frame_parms
;
cfg
=
&
gNB
->
gNB_config
;
frame
=
dlsch
->
frame
;
...
...
@@ -283,31 +282,31 @@ static void *nr_pdsch_thread(void *param) {
void
nr_init_pdsch_thread
(
PHY_VARS_gNB
*
gNB
)
{
printf
(
"init pdsch thread start
\n
"
);
NR_gNB_DLSCH_thread_t
*
dlsch
=
&
gNB
->
dlsch_thread
;
gNB
->
dlsch_thread
=
(
NR_gNB_DLSCH_thread_t
*
)
malloc16
(
sizeof
(
NR_gNB_DLSCH_thread_t
));
dlsch
->
instance_cnt_dlsch
=
-
1
;
gNB
->
dlsch_thread
->
instance_cnt_dlsch
=
-
1
;
gNB
->
dlsch_thread
->
frame
=
0
;
gNB
->
dlsch_thread
->
slot
=
0
;
pthread_mutex_init
(
&
dlsch
->
mutex_dlsch
,
NULL
);
pthread_cond_init
(
&
dlsch
->
cond_dlsch
,
NULL
);
pthread_mutex_init
(
&
gNB
->
dlsch_thread
->
mutex_dlsch
,
NULL
);
pthread_cond_init
(
&
gNB
->
dlsch_thread
->
cond_dlsch
,
NULL
);
printf
(
"create pdsch thread start
\n
"
);
threadCreate
(
&
dlsch
->
pthread_dlsch
,
nr_pdsch_thread
,
(
void
*
)
gNB
,
"pdsch"
,
-
1
,
OAI_PRIORITY_RT
);
threadCreate
(
&
gNB
->
dlsch_thread
->
pthread_dlsch
,
nr_pdsch_thread
,
(
void
*
)
gNB
,
"pdsch"
,
-
1
,
OAI_PRIORITY_RT
);
LOG_I
(
PHY
,
"init pdsch thread
\n
"
);
}
void
nr_kill_pdsch_thread
(
PHY_VARS_gNB
*
gNB
)
{
NR_gNB_DLSCH_thread_t
*
dlsch
=
&
gNB
->
dlsch_thread
;
pthread_mutex_lock
(
&
dlsch
->
mutex_dlsch
);
dlsch
->
instance_cnt_dlsch
=
0
;
pthread_cond_signal
(
&
dlsch
->
cond_dlsch
);
pthread_mutex_unlock
(
&
dlsch
->
mutex_dlsch
);
pthread_mutex_lock
(
&
gNB
->
dlsch_thread
->
mutex_dlsch
);
gNB
->
dlsch_thread
->
instance_cnt_dlsch
=
0
;
pthread_cond_signal
(
&
gNB
->
dlsch_thread
->
cond_dlsch
);
pthread_mutex_unlock
(
&
gNB
->
dlsch_thread
->
mutex_dlsch
);
pthread_mutex_destroy
(
&
gNB
->
dlsch_thread
->
mutex_dlsch
);
pthread_cond_destroy
(
&
gNB
->
dlsch_thread
->
cond_dlsch
);
pthread_mutex_destroy
(
&
dlsch
->
mutex_dlsch
);
pthread_cond_destroy
(
&
dlsch
->
cond_dlsch
);
free16
(
gNB
->
dlsch_thread
,
sizeof
(
NR_gNB_DLSCH_t
));
LOG_I
(
PHY
,
"Destroying dlsch mutex/cond
\n
"
);
}
...
...
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