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
61ead59d
Commit
61ead59d
authored
May 18, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check oai_exit in wait_on_condition() and friends, no volatile
parent
fffb2d14
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
24 additions
and
23 deletions
+24
-23
common/utils/LOG/log.c
common/utils/LOG/log.c
+1
-1
executables/main-ocp.c
executables/main-ocp.c
+1
-1
executables/main_ru.c
executables/main_ru.c
+1
-1
executables/nr-ru.c
executables/nr-ru.c
+1
-1
executables/nr-softmodem-common.h
executables/nr-softmodem-common.h
+1
-1
executables/nr-softmodem.c
executables/nr-softmodem.c
+1
-1
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+1
-1
executables/softmodem-common.h
executables/softmodem-common.h
+1
-1
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
+1
-1
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
+1
-1
openair1/PHY/defs_common.h
openair1/PHY/defs_common.h
+6
-5
openair1/SIMULATION/LTE_PHY/unitary_defs.h
openair1/SIMULATION/LTE_PHY/unitary_defs.h
+1
-1
openair1/SIMULATION/NR_PHY/nr_unitary_defs.h
openair1/SIMULATION/NR_PHY/nr_unitary_defs.h
+1
-1
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+1
-1
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+1
-1
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+1
-1
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+1
-1
targets/RT/USER/lte-softmodem.h
targets/RT/USER/lte-softmodem.h
+1
-1
targets/RT/USER/lte-uesoftmodem.c
targets/RT/USER/lte-uesoftmodem.c
+1
-1
No files found.
common/utils/LOG/log.c
View file @
61ead59d
...
...
@@ -808,7 +808,7 @@ void logClean (void)
}
}
extern
volatile
int
oai_exit
;
//extern
int oai_exit;
extern
int
oai_exit
;
void
flush_mem_to_file
(
void
)
{
int
fp
;
...
...
executables/main-ocp.c
View file @
61ead59d
...
...
@@ -71,7 +71,7 @@ pthread_cond_t sync_cond;
pthread_mutex_t
sync_mutex
;
int
sync_var
=-
1
;
//!< protected by mutex \ref sync_mutex.
int
config_sync_var
=-
1
;
volatile
int
oai_exit
=
0
;
int
oai_exit
=
0
;
double
cpuf
;
THREAD_STRUCT
thread_struct
;
...
...
executables/main_ru.c
View file @
61ead59d
...
...
@@ -73,7 +73,7 @@ pthread_mutex_t sync_mutex;
int
sync_var
=-
1
;
//!< protected by mutex \ref sync_mutex.
int
config_sync_var
=-
1
;
volatile
int
oai_exit
=
0
;
int
oai_exit
=
0
;
uint16_t
sf_ahead
=
4
;
RU_t
ru_m
;
...
...
executables/nr-ru.c
View file @
61ead59d
...
...
@@ -80,7 +80,7 @@ static int DEFBFW[] = {0x00007fff};
#include "nfapi_interface.h"
#include <nfapi/oai_integration/vendor_ext.h>
extern
volatile
int
oai_exit
;
extern
int
oai_exit
;
extern
struct
timespec
timespec_sub
(
struct
timespec
lhs
,
struct
timespec
rhs
);
extern
struct
timespec
timespec_add
(
struct
timespec
lhs
,
struct
timespec
rhs
);
...
...
executables/nr-softmodem-common.h
View file @
61ead59d
...
...
@@ -138,7 +138,7 @@ extern int rx_input_level_dBm;
extern
uint64_t
num_missed_slots
;
// counter for the number of missed slots
extern
int
oaisim_flag
;
extern
volatile
int
oai_exit
;
extern
int
oai_exit
;
extern
openair0_config_t
openair0_cfg
[
MAX_CARDS
];
extern
pthread_cond_t
sync_cond
;
...
...
executables/nr-softmodem.c
View file @
61ead59d
...
...
@@ -93,7 +93,7 @@ int sync_var=-1; //!< protected by mutex \ref sync_mutex.
int
config_sync_var
=-
1
;
volatile
int
start_gNB
=
0
;
volatile
int
oai_exit
=
0
;
int
oai_exit
=
0
;
static
int
wait_for_sync
=
0
;
...
...
executables/nr-uesoftmodem.c
View file @
61ead59d
...
...
@@ -105,7 +105,7 @@ instance_t CUuniqInstance=0;
instance_t
DUuniqInstance
=
0
;
RAN_CONTEXT_t
RC
;
volatile
int
oai_exit
=
0
;
int
oai_exit
=
0
;
extern
int16_t
nr_dlsch_demod_shift
;
...
...
executables/softmodem-common.h
View file @
61ead59d
...
...
@@ -283,7 +283,7 @@ extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
extern
int
usrp_tx_thread
;
extern
uint16_t
sl_ahead
;
extern
uint16_t
sf_ahead
;
extern
volatile
int
oai_exit
;
extern
int
oai_exit
;
void
tx_func
(
void
*
param
);
void
rx_func
(
void
*
param
);
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
View file @
61ead59d
...
...
@@ -59,7 +59,7 @@
uint64_t deadline,
uint64_t period);*/
extern
volatile
int
oai_exit
;
extern
int
oai_exit
;
void
free_eNB_dlsch
(
LTE_eNB_DLSCH_t
*
dlsch
)
{
int
i
,
r
,
aa
,
layer
;
...
...
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
View file @
61ead59d
...
...
@@ -44,7 +44,7 @@
#include <executables/split_headers.h>
extern
WORKER_CONF_t
get_thread_worker_conf
(
void
);
extern
volatile
int
oai_exit
;
extern
int
oai_exit
;
...
...
openair1/PHY/defs_common.h
View file @
61ead59d
...
...
@@ -982,13 +982,14 @@ typedef uint8_t(encoder_if_t)(uint8_t *input,
uint8_t
*
output
,
uint8_t
F
);
extern
int
oai_exit
;
static
inline
void
wait_sync
(
char
*
thread_name
)
{
int
rc
;
printf
(
"waiting for sync (%s,%d/%p,%p,%p)
\n
"
,
thread_name
,
sync_var
,
&
sync_var
,
&
sync_cond
,
&
sync_mutex
);
AssertFatal
((
rc
=
pthread_mutex_lock
(
&
sync_mutex
))
==
0
,
"sync mutex lock error"
);
while
(
sync_var
<
0
)
while
(
sync_var
<
0
&&
!
oai_exit
)
pthread_cond_wait
(
&
sync_cond
,
&
sync_mutex
);
AssertFatal
((
rc
=
pthread_mutex_unlock
(
&
sync_mutex
))
==
0
,
"sync mutex unlock error"
);
...
...
@@ -1011,7 +1012,7 @@ static inline int wakeup_thread(pthread_mutex_t *mutex,
int
sleep_cnt
=
0
;
AssertFatal
((
rc
=
pthread_mutex_lock
(
mutex
))
==
0
,
"wakeup_thread(): error locking mutex for %s (%d %s, %p)
\n
"
,
name
,
rc
,
strerror
(
rc
),
(
void
*
)
mutex
);
while
(
*
instance_cnt
==
0
)
{
while
(
*
instance_cnt
==
0
&&
!
oai_exit
)
{
AssertFatal
((
rc
=
pthread_mutex_unlock
(
mutex
))
==
0
,
"wakeup_thread(): error unlocking mutex for %s (%d %s, %p)
\n
"
,
name
,
rc
,
strerror
(
rc
),
(
void
*
)
mutex
);
sleep_cnt
++
;
...
...
@@ -1046,7 +1047,7 @@ static inline int timedwait_on_condition(pthread_mutex_t *mutex,
struct
timespec
now
,
abstime
;
AssertFatal
((
rc
=
pthread_mutex_lock
(
mutex
))
==
0
,
"[SCHED][eNB] timedwait_on_condition(): error locking mutex for %s (%d %s, %p)
\n
"
,
name
,
rc
,
strerror
(
rc
),
(
void
*
)
mutex
);
while
(
*
instance_cnt
<
0
)
{
while
(
*
instance_cnt
<
0
&&
!
oai_exit
)
{
clock_gettime
(
CLOCK_REALTIME
,
&
now
);
// most of the time the thread is waiting here
// proc->instance_cnt_rxtx is -1
...
...
@@ -1073,7 +1074,7 @@ static inline int wait_on_condition(pthread_mutex_t *mutex,
int
rc
;
AssertFatal
((
rc
=
pthread_mutex_lock
(
mutex
))
==
0
,
"[SCHED][eNB] wait_on_condition(): error locking mutex for %s (%d %s, %p)
\n
"
,
name
,
rc
,
strerror
(
rc
),
(
void
*
)
mutex
);
while
(
*
instance_cnt
<
0
)
{
while
(
*
instance_cnt
<
0
&&
!
oai_exit
)
{
// most of the time the thread is waiting here
// proc->instance_cnt_rxtx is -1
pthread_cond_wait
(
cond
,
mutex
);
// this unlocks mutex_rxtx while waiting and then locks it again
...
...
@@ -1091,7 +1092,7 @@ static inline int wait_on_busy_condition(pthread_mutex_t *mutex,
int
rc
;
AssertFatal
((
rc
=
pthread_mutex_lock
(
mutex
))
==
0
,
"[SCHED][eNB] wait_on_busy_condition(): error locking mutex for %s (%d %s, %p)
\n
"
,
name
,
rc
,
strerror
(
rc
),
(
void
*
)
mutex
);
while
(
*
instance_cnt
==
0
)
{
while
(
*
instance_cnt
==
0
&&
!
oai_exit
)
{
// most of the time the thread will skip this
// waits only if proc->instance_cnt_rxtx is 0
pthread_cond_wait
(
cond
,
mutex
);
// this unlocks mutex_rxtx while waiting and then locks it again
...
...
openair1/SIMULATION/LTE_PHY/unitary_defs.h
View file @
61ead59d
...
...
@@ -20,7 +20,7 @@
*/
openair0_device
openair0
;
volatile
int
oai_exit
=
0
;
int
oai_exit
=
0
;
void
exit_function
(
const
char
*
file
,
const
char
*
function
,
const
int
line
,
const
char
*
s
)
{
const
char
*
msg
=
s
==
NULL
?
"no comment"
:
s
;
...
...
openair1/SIMULATION/NR_PHY/nr_unitary_defs.h
View file @
61ead59d
...
...
@@ -33,7 +33,7 @@
#ifndef __NR_UNITARY_DEFS__H__
#define __NR_UNITARY_DEFS__H__
volatile
int
oai_exit
=
0
;
int
oai_exit
=
0
;
void
exit_function
(
const
char
*
file
,
const
char
*
function
,
const
int
line
,
const
char
*
s
)
{
const
char
*
msg
=
s
==
NULL
?
"no comment"
:
s
;
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
View file @
61ead59d
...
...
@@ -134,7 +134,7 @@ notifiedFIFO_t pdcp_sdu_list;
pdcp_enb_t
pdcp_enb
[
MAX_NUM_CCs
];
extern
volatile
int
oai_exit
;
extern
int
oai_exit
;
pthread_t
pdcp_stats_thread_desc
;
...
...
targets/RT/USER/lte-enb.c
View file @
61ead59d
...
...
@@ -106,7 +106,7 @@ struct timing_info_t {
// Fix per CC openair rf/if device update
// extern openair0_device openair0;
extern
volatile
int
oai_exit
;
extern
int
oai_exit
;
extern
int
transmission_mode
;
...
...
targets/RT/USER/lte-ru.c
View file @
61ead59d
...
...
@@ -78,7 +78,7 @@ static int DEFBFW[] = {0x00007fff};
#define MBMS_EXPERIMENTAL
extern
volatile
int
oai_exit
;
extern
int
oai_exit
;
extern
clock_source_t
clock_source
;
#include "executables/thread-common.h"
//extern PARALLEL_CONF_t get_thread_parallel_conf(void);
...
...
targets/RT/USER/lte-softmodem.c
View file @
61ead59d
...
...
@@ -106,7 +106,7 @@ uint16_t runtime_phy_rx[29][6]; // SISO [MCS 0-28][RBs 0-5 : 6, 15, 25, 50, 75,
uint16_t
runtime_phy_tx
[
29
][
6
];
// SISO [MCS 0-28][RBs 0-5 : 6, 15, 25, 50, 75, 100]
volatile
int
oai_exit
=
0
;
int
oai_exit
=
0
;
uint64_t
downlink_frequency
[
MAX_NUM_CCs
][
4
];
int32_t
uplink_frequency_offset
[
MAX_NUM_CCs
][
4
];
...
...
targets/RT/USER/lte-softmodem.h
View file @
61ead59d
...
...
@@ -146,7 +146,7 @@ extern int rx_input_level_dBm;
extern
uint64_t
num_missed_slots
;
// counter for the number of missed slots
extern
int
oaisim_flag
;
extern
volatile
int
oai_exit
;
extern
int
oai_exit
;
extern
openair0_config_t
openair0_cfg
[
MAX_CARDS
];
extern
pthread_cond_t
sync_cond
;
...
...
targets/RT/USER/lte-uesoftmodem.c
View file @
61ead59d
...
...
@@ -99,7 +99,7 @@ int config_sync_var=-1;
uint16_t
runtime_phy_rx
[
29
][
6
];
// SISO [MCS 0-28][RBs 0-5 : 6, 15, 25, 50, 75, 100]
uint16_t
runtime_phy_tx
[
29
][
6
];
// SISO [MCS 0-28][RBs 0-5 : 6, 15, 25, 50, 75, 100]
volatile
int
oai_exit
=
0
;
int
oai_exit
=
0
;
unsigned
int
mmapped_dma
=
0
;
...
...
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