Skip to content

Commit b6ec497

Browse files
os/include: Remove conditional directives use from all enums.
Remove conditional directives use from all enums in os/include
1 parent 9670649 commit b6ec497

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

os/fs/procfs/fs_procfsproc.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,13 +313,9 @@ static const char *g_statenames[] = {
313313
"Inactive",
314314
"Semaphore wait",
315315
"To be unblocked wait"
316-
#ifndef CONFIG_DISABLE_MQUEUE
317316
"Signal wait",
318-
#endif
319-
#ifndef CONFIG_DISABLE_MQUEUE
320317
"MQ not empty wait",
321318
"MQ no full wait"
322-
#endif
323319
};
324320

325321
static const char *g_ttypenames[4] = {

os/include/tinyara/binfmt/binfmt.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,9 @@
7979
****************************************************************************/
8080
enum {
8181
BIN_TEXT,
82-
#ifdef CONFIG_BINFMT_CONSTRUCTORS
8382
BIN_CTOR,
8483
BIN_DTOR,
85-
#endif
86-
#ifdef CONFIG_OPTIMIZE_APP_RELOAD_TIME
8784
BIN_RO,
88-
#endif
8985
BIN_DATA,
9086
BIN_BSS,
9187
BIN_HEAP,

os/include/tinyara/sched.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,16 +225,10 @@ enum tstate_e {
225225
TSTATE_TASK_INACTIVE, /* BLOCKED - Initialized but not yet activated */
226226
TSTATE_WAIT_SEM, /* BLOCKED - Waiting for a semaphore */
227227
TSTATE_WAIT_FIN, /* BLOCKED - Waiting to be unblocked by fin */
228-
#ifndef CONFIG_DISABLE_SIGNALS
229228
TSTATE_WAIT_SIG, /* BLOCKED - Waiting for a signal */
230-
#endif
231-
#ifndef CONFIG_DISABLE_MQUEUE
232229
TSTATE_WAIT_MQNOTEMPTY, /* BLOCKED - Waiting for a MQ to become not empty. */
233230
TSTATE_WAIT_MQNOTFULL, /* BLOCKED - Waiting for a MQ to become not full. */
234-
#endif
235-
#ifdef CONFIG_PAGING
236231
TSTATE_WAIT_PAGEFILL, /* BLOCKED - Waiting for page fill */
237-
#endif
238232
NUM_TASK_STATES /* Must be last */
239233
};
240234
typedef enum tstate_e tstate_t;

os/kernel/init/os_start.c

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,9 @@ volatile dq_queue_t g_readytorun;
172172
* always the CPU's IDLE task.
173173
*/
174174

175+
#ifdef CONFIG_SMP
175176
volatile dq_queue_t g_assignedtasks[CONFIG_SMP_NCPUS];
177+
#endif
176178

177179
/* g_running_tasks[] holds a references to the running task for each cpu.
178180
* It is valid only when up_interrupt_context() returns true.
@@ -317,33 +319,45 @@ const struct tasklist_s g_tasklisttable[NUM_TASK_STATES] =
317319
&g_waitingforfin,
318320
TLIST_ATTR_PRIORITIZED
319321
},
322+
#ifndef CONFIG_DISABLE_SIGNALS
320323
{ /* TSTATE_WAIT_SIG */
321324
&g_waitingforsignal,
322325
0
323-
}
326+
},
327+
#else
328+
{
329+
NULL,
330+
0
331+
},
332+
#endif
324333
#ifndef CONFIG_DISABLE_MQUEUE
325-
,
326334
{ /* TSTATE_WAIT_MQNOTEMPTY */
327335
&g_waitingformqnotempty,
328336
TLIST_ATTR_PRIORITIZED
329337
},
330338
{ /* TSTATE_WAIT_MQNOTFULL */
331339
&g_waitingformqnotfull,
332340
TLIST_ATTR_PRIORITIZED
333-
}
341+
},
342+
#else
343+
{
344+
NULL,
345+
0
346+
},
347+
{
348+
NULL,
349+
0
350+
},
334351
#endif
335352
#ifdef CONFIG_PAGING
336-
,
337353
{ /* TSTATE_WAIT_PAGEFILL */
338354
&g_waitingforfill,
339355
TLIST_ATTR_PRIORITIZED
340-
}
341-
#endif
342-
#ifdef CONFIG_SIG_SIGSTOP_ACTION
343-
,
344-
{ /* TSTATE_TASK_STOPPED */
345-
&g_stoppedtasks,
346-
0 /* See tcb->prev_state */
356+
},
357+
#else
358+
{
359+
NULL,
360+
0
347361
},
348362
#endif
349363
};

0 commit comments

Comments
 (0)