Remove unused set_priority()/set_thread_priority()
This commit is contained in:
@@ -118,21 +118,6 @@ char *itoa(int i) {
|
||||
return strdup(buffer);
|
||||
}
|
||||
|
||||
|
||||
void set_priority(int priority)
|
||||
{
|
||||
struct sched_param param =
|
||||
{
|
||||
.sched_priority = priority,
|
||||
};
|
||||
fprintf(stderr, "Calling sched_setscheduler(%d)\n", priority);
|
||||
if (sched_setscheduler(0, SCHED_RR, ¶m) == -1)
|
||||
{
|
||||
fprintf(stderr, "sched_setscheduler: %s\n", strerror(errno));
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Convert a version string x.y.z into numbers.
|
||||
*
|
||||
|
||||
@@ -116,8 +116,6 @@ int hex_char_to_hex_value (char c);
|
||||
// Converts an hexadecimal ASCII coded string into its value.**
|
||||
int hex_string_to_hex_value (uint8_t *hex_value, const char *hex_string, int size);
|
||||
|
||||
void set_priority(int priority);
|
||||
|
||||
char *itoa(int i);
|
||||
|
||||
#define STRINGIFY(S) #S
|
||||
|
||||
@@ -40,23 +40,6 @@ typedef struct {
|
||||
|
||||
static nfapi_params_t nfapi_params = {0};
|
||||
|
||||
void set_thread_priority(int priority) {
|
||||
set_priority(priority);
|
||||
|
||||
pthread_attr_t ptAttr;
|
||||
if(pthread_attr_setschedpolicy(&ptAttr, SCHED_RR) != 0) {
|
||||
printf("Failed to set pthread sched policy SCHED_RR\n");
|
||||
}
|
||||
|
||||
pthread_attr_setinheritsched(&ptAttr, PTHREAD_EXPLICIT_SCHED);
|
||||
struct sched_param thread_params;
|
||||
thread_params.sched_priority = 20;
|
||||
|
||||
if(pthread_attr_setschedparam(&ptAttr, &thread_params) != 0) {
|
||||
printf("failed to set sched param\n");
|
||||
}
|
||||
}
|
||||
|
||||
const char *nfapi_get_strmode(void) {
|
||||
if (nfapi_params.nfapi_mode > NFAPI_MODE_UNKNOWN)
|
||||
return nfapi_str_mode[NFAPI_MODE_UNKNOWN];
|
||||
|
||||
@@ -137,25 +137,6 @@ extern "C"
|
||||
} fapi_internal_t;
|
||||
}
|
||||
|
||||
extern void set_thread_priority(int);
|
||||
/*
|
||||
{
|
||||
pthread_attr_t ptAttr;
|
||||
|
||||
struct sched_param schedParam;
|
||||
schedParam.__sched_priority = 79;
|
||||
sched_setscheduler(0, SCHED_RR, &schedParam);
|
||||
|
||||
pthread_attr_setschedpolicy(&ptAttr, SCHED_RR);
|
||||
|
||||
pthread_attr_setinheritsched(&ptAttr, PTHREAD_EXPLICIT_SCHED);
|
||||
|
||||
struct sched_param thread_params;
|
||||
thread_params.sched_priority = 20;
|
||||
pthread_attr_setschedparam(&ptAttr, &thread_params);
|
||||
}
|
||||
*/
|
||||
|
||||
void send_uplink_indications(fapi_internal_t *instance, uint16_t sfn_sf) {
|
||||
fapi_harq_ind_t harq_ind;
|
||||
(instance->callbacks.fapi_harq_ind)(&(instance->_public), &harq_ind);
|
||||
|
||||
Reference in New Issue
Block a user