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
spbro
OpenXG-RAN
Commits
ed84d40f
Commit
ed84d40f
authored
Oct 01, 2021
by
mjoang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add mutex to protect ul_config_pdu against race condition.
parent
1b742fbe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
1 deletion
+10
-1
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
+2
-0
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
+2
-0
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
+3
-0
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+3
-1
No files found.
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
View file @
ed84d40f
...
...
@@ -16,6 +16,7 @@
#ifndef _FAPI_NR_UE_INTERFACE_H_
#define _FAPI_NR_UE_INTERFACE_H_
#include <pthread.h>
#include "stddef.h"
#include "platform_types.h"
...
...
@@ -349,6 +350,7 @@ typedef struct {
uint16_t
slot
;
uint8_t
number_pdus
;
fapi_nr_ul_config_request_pdu_t
ul_config_list
[
FAPI_NR_UL_CONFIG_LIST_NUM
];
pthread_mutex_t
mutex_ul_config
;
}
fapi_nr_ul_config_request_t
;
...
...
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
View file @
ed84d40f
...
...
@@ -153,6 +153,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
fapi_nr_ul_config_request_t
*
ul_config
=
scheduled_response
->
ul_config
;
pthread_mutex_lock
(
&
ul_config
->
mutex_ul_config
);
for
(
i
=
0
;
i
<
ul_config
->
number_pdus
;
++
i
){
AssertFatal
(
ul_config
->
ul_config_list
[
i
].
pdu_type
<=
FAPI_NR_UL_CONFIG_TYPES
,
"pdu_type %d out of bounds
\n
"
,
ul_config
->
ul_config_list
[
i
].
pdu_type
);
...
...
@@ -229,6 +230,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
}
}
memset
(
ul_config
,
0
,
sizeof
(
fapi_nr_ul_config_request_t
));
pthread_mutex_unlock
(
&
ul_config
->
mutex_ul_config
);
}
}
return
0
;
...
...
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
View file @
ed84d40f
...
...
@@ -40,6 +40,7 @@
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h"
#include "executables/softmodem-common.h"
#include "openair2/LAYER2/nr_pdcp/nr_pdcp.h"
#include <pthread.h>
static
NR_UE_MAC_INST_t
*
nr_ue_mac_inst
;
...
...
@@ -74,6 +75,8 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(NR_UE_RRC_INST_t* rrc_inst) {
num_slots_ul
++
;
LOG_D
(
MAC
,
"Initializing ul_config_request. num_slots_ul = %d
\n
"
,
num_slots_ul
);
nr_ue_mac_inst
->
ul_config_request
=
(
fapi_nr_ul_config_request_t
*
)
calloc
(
num_slots_ul
,
sizeof
(
fapi_nr_ul_config_request_t
));
for
(
int
i
=
0
;
i
<
num_slots_ul
;
i
++
)
pthread_mutex_init
(
&
(
nr_ue_mac_inst
->
ul_config_request
[
i
].
mutex_ul_config
),
NULL
);
}
}
else
{
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
ed84d40f
...
...
@@ -30,6 +30,7 @@
#include <stdio.h>
#include <math.h>
#include <pthread.h>
/* exe */
#include <common/utils/nr/nr_common.h>
...
...
@@ -59,11 +60,12 @@ static prach_association_pattern_t prach_assoc_pattern;
static
ssb_list_info_t
ssb_list
;
void
fill_ul_config
(
fapi_nr_ul_config_request_t
*
ul_config
,
frame_t
frame_tx
,
int
slot_tx
,
uint8_t
pdu_type
){
pthread_mutex_lock
(
&
ul_config
->
mutex_ul_config
);
ul_config
->
ul_config_list
[
ul_config
->
number_pdus
].
pdu_type
=
pdu_type
;
ul_config
->
slot
=
slot_tx
;
ul_config
->
sfn
=
frame_tx
;
ul_config
->
number_pdus
++
;
pthread_mutex_unlock
(
&
ul_config
->
mutex_ul_config
);
LOG_D
(
NR_MAC
,
"In %s: Set config request for UL transmission in [%d.%d], number of UL PDUs: %d
\n
"
,
__FUNCTION__
,
ul_config
->
sfn
,
ul_config
->
slot
,
ul_config
->
number_pdus
);
...
...
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