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
wangwenhui
OpenXG-RAN
Commits
2b4e5290
Commit
2b4e5290
authored
Apr 12, 2020
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify add_ue_list(), remove_ue_list(); add init_ue_list()
parent
a74f4c12
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
24 deletions
+25
-24
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
+23
-20
openair2/LAYER2/MAC/mac_proto.h
openair2/LAYER2/MAC/mac_proto.h
+1
-0
openair2/LAYER2/MAC/main.c
openair2/LAYER2/MAC/main.c
+1
-4
No files found.
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
View file @
2b4e5290
...
...
@@ -2131,33 +2131,36 @@ dump_ue_list(UE_list_t *listP) {
* Add a UE to UE_list listP
*/
inline
void
add_ue_list
(
UE_list_t
*
listP
,
int
UE_id
)
{
if
(
listP
->
head
==
-
1
)
{
listP
->
head
=
UE_id
;
listP
->
next
[
UE_id
]
=
-
1
;
}
else
{
int
i
=
listP
->
head
;
while
(
listP
->
next
[
i
]
>=
0
)
i
=
listP
->
next
[
i
];
listP
->
next
[
i
]
=
UE_id
;
listP
->
next
[
UE_id
]
=
-
1
;
}
int
*
cur
=
&
listP
->
head
;
while
(
*
cur
>=
0
)
cur
=
&
listP
->
next
[
*
cur
];
*
cur
=
UE_id
;
}
//------------------------------------------------------------------------------
/*
* Remove a UE from the UE_list listP
, return the previous element
* Remove a UE from the UE_list listP
*/
inline
int
remove_ue_list
(
UE_list_t
*
listP
,
int
UE_id
)
{
listP
->
next
[
UE_id
]
=
-
1
;
if
(
listP
->
head
==
UE_id
)
{
listP
->
head
=
listP
->
next
[
UE_id
];
return
-
1
;
}
int
*
cur
=
&
listP
->
head
;
while
(
*
cur
!=
-
1
&&
*
cur
!=
UE_id
)
cur
=
&
listP
->
next
[
*
cur
];
if
(
*
cur
==
-
1
)
return
0
;
int
*
next
=
&
listP
->
next
[
*
cur
];
*
cur
=
listP
->
next
[
*
cur
];
*
next
=
-
1
;
return
1
;
}
int
previous
=
prev
(
listP
,
UE_id
);
if
(
previous
!=
-
1
)
listP
->
next
[
previous
]
=
listP
->
next
[
UE_id
];
return
previous
;
//------------------------------------------------------------------------------
/*
* Initialize the UE_list listP
*/
inline
void
init_ue_list
(
UE_list_t
*
listP
)
{
listP
->
head
=
-
1
;
for
(
int
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
++
i
)
listP
->
next
[
i
]
=
-
1
;
}
//------------------------------------------------------------------------------
...
...
openair2/LAYER2/MAC/mac_proto.h
View file @
2b4e5290
...
...
@@ -659,6 +659,7 @@ int prev(UE_list_t *listP, int nodeP);
void
add_ue_list
(
UE_list_t
*
listP
,
int
UE_id
);
int
remove_ue_list
(
UE_list_t
*
listP
,
int
UE_id
);
void
dump_ue_list
(
UE_list_t
*
listP
);
void
init_ue_list
(
UE_list_t
*
listP
);
int
UE_num_active_CC
(
UE_info_t
*
listP
,
int
ue_idP
);
int
UE_PCCID
(
module_id_t
mod_idP
,
int
ue_idP
);
rnti_t
UE_RNTI
(
module_id_t
mod_idP
,
int
ue_idP
);
...
...
openair2/LAYER2/MAC/main.c
View file @
2b4e5290
...
...
@@ -45,11 +45,8 @@ extern RAN_CONTEXT_t RC;
void
init_UE_info
(
UE_info_t
*
UE_info
)
{
int
list_el
;
UE_info
->
num_UEs
=
0
;
UE_info
->
list
.
head
=
-
1
;
for
(
list_el
=
0
;
list_el
<
MAX_MOBILES_PER_ENB
;
list_el
++
)
UE_info
->
list
.
next
[
list_el
]
=
-
1
;
init_ue_list
(
&
UE_info
->
list
);
memset
(
UE_info
->
DLSCH_pdu
,
0
,
sizeof
(
UE_info
->
DLSCH_pdu
));
memset
(
UE_info
->
UE_template
,
0
,
sizeof
(
UE_info
->
UE_template
));
memset
(
UE_info
->
eNB_UE_stats
,
0
,
sizeof
(
UE_info
->
eNB_UE_stats
));
...
...
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