diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-03-01 21:05:55 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-03-01 21:05:55 +0000 |
commit | 08680a039b6ffc922731d9a1cfdff20ef204dbba (patch) | |
tree | 25bb704377c624f2d63c4bb5ad1df332d44aa78a /nuttx/sched/task_create.c | |
parent | 129dd27cc4deb042d2f88c65927adc49c338756d (diff) | |
download | px4-nuttx-08680a039b6ffc922731d9a1cfdff20ef204dbba.tar.gz px4-nuttx-08680a039b6ffc922731d9a1cfdff20ef204dbba.tar.bz2 px4-nuttx-08680a039b6ffc922731d9a1cfdff20ef204dbba.zip |
This creates a 8051 build that can run in 24Kb of RAM
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@26 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched/task_create.c')
-rw-r--r-- | nuttx/sched/task_create.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/nuttx/sched/task_create.c b/nuttx/sched/task_create.c index daf42af2f..399bba20c 100644 --- a/nuttx/sched/task_create.c +++ b/nuttx/sched/task_create.c @@ -62,6 +62,10 @@ * Private Variables ************************************************************/ +/* This is the name for un-named tasks */ + +static FAR char g_noname[] = "no name"; + /************************************************************ * Private Function Prototypes ************************************************************/ @@ -141,7 +145,7 @@ static STATUS task_assignpid(FAR _TCB *tcb) /* We'll try every allowable pid */ - for (tries = 0; tries < MAX_TASKS_ALLOWED; tries++) + for (tries = 0; tries < CONFIG_MAX_TASKS; tries++) { /* Get the next process ID candidate */ @@ -244,7 +248,7 @@ STATUS _task_init(FAR _TCB *tcb, const char *name, int priority, if (!name) { - name = "no name"; + name = g_noname; } /* copy the name into the TCB */ @@ -257,7 +261,7 @@ STATUS _task_init(FAR _TCB *tcb, const char *name, int priority, #if CONFIG_TASK_NAME_SIZE > 0 tcb->argv[0] = tcb->name; #else - tcb->argv[0] = "no name"; + tcb->argv[0] = g_noname; #endif /* For pthreads, args are strictly pass-by-value; the char* |