From 5c8ecfab83a62454fceaf0c8ff46d56cd893b9ca Mon Sep 17 00:00:00 2001 From: Sharvil Nanavati Date: Sat, 6 Sep 2014 16:53:25 -0700 Subject: [PATCH] Eliminate all attempts to set scheduling policy (all no-ops). --- gki/ulinux/gki_int.h | 15 --------------- gki/ulinux/gki_ulinux.c | 35 +++-------------------------------- 2 files changed, 3 insertions(+), 47 deletions(-) diff --git a/gki/ulinux/gki_int.h b/gki/ulinux/gki_int.h index edac20748..c996f327a 100644 --- a/gki/ulinux/gki_int.h +++ b/gki/ulinux/gki_int.h @@ -25,21 +25,6 @@ /********************************************************************** ** OS specific definitions */ -/* The base priority used for pthread based GKI task. below value is to keep it retro compatible. - * It is recommended to use (GKI_MAX_TASKS+3), this will assign real time priorities GKI_MAX_TASKS- - * task_id -2 to the thread */ -#ifndef GKI_LINUX_BASE_PRIORITY -#define GKI_LINUX_BASE_PRIORITY 30 -#endif - -/* The base policy used for pthread based GKI task. the sched defines are defined here to avoid undefined values due - * to missing header file, see pthread functions! Overall it is recommend however to use SCHED_NOMRAL */ -#define GKI_SCHED_NORMAL 0 -#define GKI_SCHED_FIFO 1 -#define GKI_SCHED_RR 2 -#ifndef GKI_LINUX_BASE_POLICY -#define GKI_LINUX_BASE_POLICY GKI_SCHED_NORMAL -#endif typedef struct { diff --git a/gki/ulinux/gki_ulinux.c b/gki/ulinux/gki_ulinux.c index 24ac8afd7..d481dad3a 100644 --- a/gki/ulinux/gki_ulinux.c +++ b/gki/ulinux/gki_ulinux.c @@ -43,15 +43,10 @@ ** Constants & Macros ******************************************************************************/ -#define SCHED_NORMAL 0 -#define SCHED_FIFO 1 -#define SCHED_RR 2 -#define SCHED_BATCH 3 - -#define NANOSEC_PER_MILLISEC 1000000 +#define NANOSEC_PER_MILLISEC (1000000) #define NSEC_PER_SEC (1000 * NANOSEC_PER_MILLISEC) -#define USEC_PER_SEC 1000000 -#define NSEC_PER_USEC 1000 +#define USEC_PER_SEC (1000000) +#define NSEC_PER_USEC (1000) #if GKI_DYNAMIC_MEMORY == FALSE tGKI_CB gki_cb; @@ -257,30 +252,6 @@ UINT8 GKI_create_task(TASKPTR task_entry, UINT8 task_id, const char *taskname) return GKI_FAILURE; } - if(pthread_getschedparam(gki_cb.os.thread_id[task_id], &policy, ¶m)==0) - { -#if (GKI_LINUX_BASE_POLICY!=GKI_SCHED_NORMAL) -#if defined(PBS_SQL_TASK) - if (task_id == PBS_SQL_TASK) - { - GKI_TRACE("PBS SQL lowest priority task"); - policy = SCHED_NORMAL; - } - else -#endif -#endif - { - /* check if define in gki_int.h is correct for this compile environment! */ - policy = GKI_LINUX_BASE_POLICY; -#if (GKI_LINUX_BASE_POLICY != GKI_SCHED_NORMAL) - param.sched_priority = GKI_LINUX_BASE_PRIORITY - task_id - 2; -#else - param.sched_priority = 0; -#endif - } - pthread_setschedparam(gki_cb.os.thread_id[task_id], policy, ¶m); - } - GKI_TRACE( "Leaving GKI_create_task %x %d %x %s\n", (int)task_entry, (int)task_id, -- 2.11.0