Remove most references to LITE symbol

Most kernel code that depends on the state of the LITE symbol
has this dependency removed, since the symbol was used for an
incomplete feature that could not be enabled. This change has
no operational impact, as the LITE symbol was never defined
by the build system.

In a handful of timer-related references to LITE are not removed,
as they will be useful in adding a tickless kernel capability.

Change-Id: I4ae37f484e3ab08093b732d45aca87d2e8678adf
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This commit is contained in:
Allan Stephens 2015-04-13 16:07:10 -04:00 committed by Anas Nashif
commit 3a7c6f32fc
10 changed files with 11 additions and 54 deletions

View file

@ -36,14 +36,11 @@
#define task_fifo_put(q, p) _task_fifo_put(q, p, TICKS_NONE)
#define task_fifo_put_wait(q, p) _task_fifo_put(q, p, TICKS_UNLIMITED)
#ifndef LITE
#define task_fifo_put_wait_timeout(q, p, t) _task_fifo_put(q, p, t)
#endif
#define task_fifo_get(q, p) _task_fifo_get(q, p, TICKS_NONE)
#define task_fifo_get_wait(q, p) _task_fifo_get(q, p, TICKS_UNLIMITED)
#ifndef LITE
#define task_fifo_put_wait_timeout(q, p, t) _task_fifo_put(q, p, t)
#define task_fifo_get_wait_timeout(q, p, t) _task_fifo_get(q, p, t)
#endif

View file

@ -272,22 +272,16 @@ typedef union {
struct k_args *args;
} K_CREF;
#ifndef LITE
struct _a1arg {
kmemory_map_t mmap;
void **mptr;
};
#endif
struct _c1arg {
int64_t time1;
int32_t time2;
#ifndef LITE
K_TIMER *timer;
#endif
#ifndef LITE
ksem_t sema;
#endif
ktask_t task;
};
@ -389,9 +383,7 @@ struct _z4arg {
};
union k_args_args {
#ifndef LITE
struct _a1arg a1;
#endif
struct _c1arg c1;
struct moved_req MovedReq;
struct _e1arg e1;
@ -419,9 +411,7 @@ struct k_args {
K_CREF Ctxt;
union {
int32_t ticks;
#ifndef LITE
K_TIMER *timer;
#endif
int rcode;
} Time;
K_ARGS_ARGS Args;

View file

@ -37,8 +37,6 @@
extern "C" {
#endif
#ifndef LITE
extern void _mem_map_init(void);
extern int task_mem_map_used_get(kmemory_map_t map);
@ -47,9 +45,10 @@ extern void _task_mem_map_free(kmemory_map_t mmap, void **mptr);
#define task_mem_map_alloc(m, p) _task_mem_map_alloc(m, p, TICKS_NONE)
#define task_mem_map_alloc_wait(m, p) _task_mem_map_alloc(m, p, TICKS_UNLIMITED)
#define task_mem_map_alloc_wait_timeout(m, p, t) _task_mem_map_alloc(m, p, t)
#define task_mem_map_free(m, p) _task_mem_map_free(m, p)
#ifndef LITE
#define task_mem_map_alloc_wait_timeout(m, p, t) _task_mem_map_alloc(m, p, t)
#endif /* !LITE */
#ifdef __cplusplus

View file

@ -35,10 +35,10 @@
#define task_sem_take(s) _task_sem_take(s, TICKS_NONE)
#define task_sem_take_wait(s) _task_sem_take(s, TICKS_UNLIMITED)
#define task_sem_group_take_wait(g) _task_sem_group_take(g, TICKS_UNLIMITED)
#ifndef LITE
#define task_sem_take_wait_timeout(s, t) _task_sem_take(s, t)
#define task_sem_group_take_wait(g) _task_sem_group_take(g, TICKS_UNLIMITED)
#define task_sem_group_take_wait_timeout(g, t) _task_sem_group_take(g, t)
#endif

View file

@ -59,14 +59,10 @@ extern void _task_ioctl(ktask_t, int);
extern void _task_group_ioctl(ktask_group_t, int);
extern void task_yield(void);
#ifndef LITE
extern void task_priority_set(ktask_t task, kpriority_t prio);
#endif
#ifndef LITE
extern void task_entry_set(ktask_t task, void (*func)(void));
extern void task_abort_handler_set(void (*func)(void));
#endif
/*
* The following task/group operations may only be performed with

View file

@ -43,14 +43,12 @@
#define GROUP_TASK_SUSPEND 2
#define GROUP_TASK_RESUME 3
#ifndef LITE
#define task_abort(t) _task_ioctl(t, TASK_ABORT)
#define task_suspend(t) _task_ioctl(t, TASK_SUSPEND)
#define task_resume(t) _task_ioctl(t, TASK_RESUME)
#define task_group_abort(g) _task_group_ioctl(g, GROUP_TASK_ABORT)
#define task_group_suspend(g) _task_group_ioctl(g, GROUP_TASK_SUSPEND)
#define task_group_resume(g) _task_group_ioctl(g, GROUP_TASK_RESUME)
#endif
#define task_abort(t) _task_ioctl(t, TASK_ABORT)
#define task_suspend(t) _task_ioctl(t, TASK_SUSPEND)
#define task_resume(t) _task_ioctl(t, TASK_RESUME)
#define task_group_abort(g) _task_group_ioctl(g, GROUP_TASK_ABORT)
#define task_group_suspend(g) _task_group_ioctl(g, GROUP_TASK_SUSPEND)
#define task_group_resume(g) _task_group_ioctl(g, GROUP_TASK_RESUME)
#define task_start(t) _task_ioctl(t, TASK_START)
#define task_group_start(g) _task_group_ioctl(g, GROUP_TASK_START)

View file

@ -44,9 +44,7 @@ extern struct k_tqhd _k_task_priority_list[];
extern int _k_task_count;
#ifndef LITE
extern struct map_struct _k_mem_map_list[];
#endif
extern struct mbx_struct _k_mbox_list[];
extern struct mutex_struct _k_mutex_list[];
extern struct sem_struct _k_sem_list[];
@ -54,26 +52,20 @@ extern struct que_struct _k_fifo_list[];
extern struct pool_struct _k_mem_pool_list[];
extern struct pipe_struct _k_pipe_list[];
#ifndef LITE
extern int _k_mem_map_count;
#endif
extern int _k_mem_pool_count;
extern int _k_pipe_count;
extern struct k_proc *_k_current_task;
extern uint32_t _k_task_priority_bitmap[];
#ifndef LITE
extern K_TIMER *_k_timer_list_head;
extern K_TIMER *_k_timer_list_tail;
#endif
extern int64_t _k_sys_clock_tick_count;
extern struct nano_stack _k_command_stack;
extern struct nano_lifo _k_server_command_packet_free;
#ifndef LITE
extern struct nano_lifo _k_timer_free;
#endif
extern void _Cput(struct nano_lifo *, void *);
extern void _Cpsh(struct nano_stack *, uint32_t);
@ -83,11 +75,9 @@ extern void set_state_bit(struct k_proc *, uint32_t);
extern void reset_state_bit(struct k_proc *, uint32_t);
extern void K_taskcall(struct k_args *);
#ifndef LITE
extern void delist_timeout(K_TIMER *T);
extern void enlist_timeout(struct k_args *A);
extern void force_timeout(struct k_args *A);
#endif
extern void init_drivers(void);
@ -143,9 +133,7 @@ extern void init_drivers(void);
extern int _k_debug_halt;
extern char *K_NodeNames[];
extern char **K_TaskNames[];
#ifndef LITE
extern char **K_MapNames[];
#endif
extern char **K_MbxNames[];
extern char **K_MutexNames[];
extern char **K_SemNames[];
@ -227,17 +215,13 @@ extern void workload_monitor_calibrate(void);
do { \
(A) = _Cget(&_k_server_command_packet_free); \
} while (0)
#ifndef LITE
#define GETTIMER(T) \
do { \
(T) = _Cget(&_k_timer_free); \
} while (0)
#endif
#define FREEARGS(A) _Cput(&_k_server_command_packet_free, (A))
#ifndef LITE
#define FREETIMER(T) _Cput(&_k_timer_free, (T))
#endif
#define TO_ALIST(L, A) _Cpsh((L), (uint32_t)(A))

View file

@ -228,7 +228,7 @@ void _k_mutex_lock_request(struct k_args *A /* pointer to mutex lock
A->Comm = LOCK_TMO;
enlist_timeout(A);
}
#endif
if (A->Prio < Mutex->OwnerCurrentPrio) {
/*
* The priority level of the owning task is less
@ -254,7 +254,6 @@ void _k_mutex_lock_request(struct k_args *A /* pointer to mutex lock
Mutex->OwnerCurrentPrio = BoostedPrio;
}
}
#endif
} else {
/*
* ERROR. The mutex is locked by another task and

View file

@ -84,7 +84,6 @@ static void signal_semaphore(int n, struct sem_struct *S)
}
#endif
}
#ifndef LITE
else if (A->Comm == WAITMREQ) {
S->Level--;
A->Comm = WAITMRDY;
@ -93,7 +92,6 @@ static void signal_semaphore(int n, struct sem_struct *S)
SENDARGS(Y);
Y = A;
}
#endif
else
Y = A;
A = X;

View file

@ -72,11 +72,7 @@ void reset_state_bit(struct k_proc *X, /* ptr to task */
* be added to the list of schedulable tasks.
*/
#ifndef LITE
struct k_tqhd *H = _k_task_priority_list + X->Prio;
#else
struct k_tqhd *H = _k_task_priority_list;
#endif
X->Forw = NULL;
H->Tail->Forw = X;