mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
- all RAN code, CI code, configuration files, dockerfiles, in CSSL v1.0
- all deployment code (openshift, charts, ancillary files like shell
scripts), in MIT
- documentation in CC-BY-4.0
- exceptions might apply and are listed in NOTICE
- there is a new LICENSES folder with all licenses
- CONTRIBUTIONS.md has been updated accordingly
For automated changes based on OAI PL v1.1:
perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.{c,h,cpp}
perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.ts
perl -i~ -0pe 's/<!--.*Licensed to the OpenAirInterface.*openairinterface.org\n.*-->/<!-- SPDX-License-Identifier: LicenseRef-CSSL-1.0 -->/s' **/*.xml
The rest (cmake, files with missing license, cmake) manually.
47 lines
1.3 KiB
C
47 lines
1.3 KiB
C
/*
|
|
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
|
|
*/
|
|
|
|
#ifndef THREAD_COMMON_H
|
|
#define THREAD_COMMON_H
|
|
|
|
#include "PHY/defs_common.h"
|
|
|
|
extern THREAD_STRUCT thread_struct;
|
|
|
|
static inline void set_parallel_conf(char *parallel_conf) {
|
|
mapping config[]= {
|
|
FOREACH_PARALLEL(GENERATE_ENUMTXT)
|
|
{NULL,-1}
|
|
};
|
|
thread_struct.parallel_conf = (PARALLEL_CONF_t)map_str_to_int(config, parallel_conf);
|
|
if (thread_struct.parallel_conf == (unsigned int)-1) {
|
|
LOG_E(ENB_APP,"Impossible value: %s\n", parallel_conf);
|
|
thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD;
|
|
}
|
|
printf("[CONFIG] parallel_conf is set to %d\n", thread_struct.parallel_conf);
|
|
}
|
|
|
|
static inline void set_worker_conf(char *worker_conf) {
|
|
mapping config[]={
|
|
FOREACH_WORKER(GENERATE_ENUMTXT)
|
|
{NULL, -1}
|
|
};
|
|
thread_struct.worker_conf = (WORKER_CONF_t)map_str_to_int(config, worker_conf);
|
|
if (thread_struct.worker_conf == (unsigned int)-1) {
|
|
LOG_E(ENB_APP,"Impossible value: %s\n", worker_conf);
|
|
thread_struct.worker_conf = WORKER_DISABLE ;
|
|
}
|
|
printf("[CONFIG] worker_conf is set to %d\n", thread_struct.worker_conf);
|
|
}
|
|
|
|
static inline PARALLEL_CONF_t get_thread_parallel_conf(void) {
|
|
return thread_struct.parallel_conf;
|
|
}
|
|
|
|
static inline WORKER_CONF_t get_thread_worker_conf(void) {
|
|
return thread_struct.worker_conf;
|
|
}
|
|
|
|
#endif
|