From 7071ca9d21d783827f93fcd25631aa2da8df8fe4 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Mon, 4 Feb 2013 18:46:28 +0000
Subject: Rename _TCB to struct tcb_s
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5610 42af7a65-404d-4744-a932-0658087f49c3
---
nuttx/ChangeLog | 3 ++
nuttx/Documentation/NuttXDemandPaging.html | 14 ++++----
nuttx/Documentation/NuttxPortingGuide.html | 24 ++++++-------
nuttx/Documentation/NuttxUserGuide.html | 8 ++---
nuttx/TODO | 4 +--
nuttx/arch/8051/src/up_assert.c | 6 ++--
nuttx/arch/8051/src/up_blocktask.c | 8 ++---
nuttx/arch/8051/src/up_exit.c | 4 +--
nuttx/arch/8051/src/up_initialize.c | 2 +-
nuttx/arch/8051/src/up_initialstate.c | 2 +-
nuttx/arch/8051/src/up_internal.h | 2 +-
nuttx/arch/8051/src/up_releasepending.c | 6 ++--
nuttx/arch/8051/src/up_reprioritizertr.c | 8 ++---
nuttx/arch/8051/src/up_unblocktask.c | 8 ++---
nuttx/arch/arm/src/arm/up_allocpage.c | 2 +-
nuttx/arch/arm/src/arm/up_assert.c | 8 ++---
nuttx/arch/arm/src/arm/up_blocktask.c | 8 ++---
nuttx/arch/arm/src/arm/up_checkmapping.c | 2 +-
nuttx/arch/arm/src/arm/up_dataabort.c | 4 +--
nuttx/arch/arm/src/arm/up_initialstate.c | 2 +-
nuttx/arch/arm/src/arm/up_prefetchabort.c | 2 +-
nuttx/arch/arm/src/arm/up_releasepending.c | 6 ++--
nuttx/arch/arm/src/arm/up_reprioritizertr.c | 8 ++---
nuttx/arch/arm/src/arm/up_schedulesigaction.c | 4 +--
nuttx/arch/arm/src/arm/up_sigdeliver.c | 2 +-
nuttx/arch/arm/src/arm/up_unblocktask.c | 8 ++---
nuttx/arch/arm/src/armv7-m/up_assert.c | 10 +++---
nuttx/arch/arm/src/armv7-m/up_blocktask.c | 8 ++---
nuttx/arch/arm/src/armv7-m/up_initialstate.c | 2 +-
nuttx/arch/arm/src/armv7-m/up_releasepending.c | 6 ++--
nuttx/arch/arm/src/armv7-m/up_reprioritizertr.c | 8 ++---
nuttx/arch/arm/src/armv7-m/up_schedulesigaction.c | 4 +--
nuttx/arch/arm/src/armv7-m/up_sigdeliver.c | 2 +-
nuttx/arch/arm/src/armv7-m/up_svcall.c | 6 ++--
nuttx/arch/arm/src/armv7-m/up_unblocktask.c | 8 ++---
nuttx/arch/arm/src/common/up_checkstack.c | 6 ++--
nuttx/arch/arm/src/common/up_createstack.c | 4 +--
nuttx/arch/arm/src/common/up_exit.c | 6 ++--
nuttx/arch/arm/src/common/up_internal.h | 4 +--
nuttx/arch/arm/src/common/up_releasestack.c | 2 +-
nuttx/arch/arm/src/common/up_usestack.c | 4 +--
nuttx/arch/arm/src/common/up_vfork.c | 4 +--
nuttx/arch/avr/src/avr/up_blocktask.c | 8 ++---
nuttx/arch/avr/src/avr/up_checkstack.c | 4 +--
nuttx/arch/avr/src/avr/up_createstack.c | 4 +--
nuttx/arch/avr/src/avr/up_dumpstate.c | 4 +--
nuttx/arch/avr/src/avr/up_initialstate.c | 2 +-
nuttx/arch/avr/src/avr/up_releasepending.c | 6 ++--
nuttx/arch/avr/src/avr/up_reprioritizertr.c | 8 ++---
nuttx/arch/avr/src/avr/up_schedulesigaction.c | 4 +--
nuttx/arch/avr/src/avr/up_sigdeliver.c | 2 +-
nuttx/arch/avr/src/avr/up_unblocktask.c | 8 ++---
nuttx/arch/avr/src/avr/up_usestack.c | 4 +--
nuttx/arch/avr/src/avr32/up_blocktask.c | 8 ++---
nuttx/arch/avr/src/avr32/up_createstack.c | 4 +--
nuttx/arch/avr/src/avr32/up_dumpstate.c | 4 +--
nuttx/arch/avr/src/avr32/up_initialstate.c | 2 +-
nuttx/arch/avr/src/avr32/up_releasepending.c | 6 ++--
nuttx/arch/avr/src/avr32/up_reprioritizertr.c | 8 ++---
nuttx/arch/avr/src/avr32/up_schedulesigaction.c | 4 +--
nuttx/arch/avr/src/avr32/up_sigdeliver.c | 2 +-
nuttx/arch/avr/src/avr32/up_unblocktask.c | 8 ++---
nuttx/arch/avr/src/avr32/up_usestack.c | 4 +--
nuttx/arch/avr/src/common/up_assert.c | 6 ++--
nuttx/arch/avr/src/common/up_exit.c | 6 ++--
nuttx/arch/avr/src/common/up_releasestack.c | 2 +-
nuttx/arch/hc/src/common/up_blocktask.c | 8 ++---
nuttx/arch/hc/src/common/up_createstack.c | 4 +--
nuttx/arch/hc/src/common/up_exit.c | 6 ++--
nuttx/arch/hc/src/common/up_releasepending.c | 6 ++--
nuttx/arch/hc/src/common/up_releasestack.c | 2 +-
nuttx/arch/hc/src/common/up_reprioritizertr.c | 8 ++---
nuttx/arch/hc/src/common/up_unblocktask.c | 8 ++---
nuttx/arch/hc/src/common/up_usestack.c | 4 +--
nuttx/arch/hc/src/m9s12/m9s12_assert.c | 10 +++---
nuttx/arch/hc/src/m9s12/m9s12_initialstate.c | 2 +-
nuttx/arch/mips/src/common/up_createstack.c | 4 +--
nuttx/arch/mips/src/common/up_exit.c | 6 ++--
nuttx/arch/mips/src/common/up_releasestack.c | 2 +-
nuttx/arch/mips/src/common/up_usestack.c | 4 +--
nuttx/arch/mips/src/mips32/up_assert.c | 6 ++--
nuttx/arch/mips/src/mips32/up_blocktask.c | 8 ++---
nuttx/arch/mips/src/mips32/up_dumpstate.c | 4 +--
nuttx/arch/mips/src/mips32/up_initialstate.c | 2 +-
nuttx/arch/mips/src/mips32/up_releasepending.c | 6 ++--
nuttx/arch/mips/src/mips32/up_reprioritizertr.c | 8 ++---
nuttx/arch/mips/src/mips32/up_schedulesigaction.c | 4 +--
nuttx/arch/mips/src/mips32/up_sigdeliver.c | 2 +-
nuttx/arch/mips/src/mips32/up_swint0.c | 6 ++--
nuttx/arch/mips/src/mips32/up_unblocktask.c | 8 ++---
nuttx/arch/mips/src/mips32/up_vfork.c | 4 +--
nuttx/arch/rgmp/include/arch.h | 4 +--
nuttx/arch/rgmp/src/arm/arch_nuttx.c | 2 +-
nuttx/arch/rgmp/src/nuttx.c | 42 +++++++++++------------
nuttx/arch/rgmp/src/rgmp.c | 6 ++--
nuttx/arch/rgmp/src/x86/arch_nuttx.c | 2 +-
nuttx/arch/sh/src/common/up_assert.c | 6 ++--
nuttx/arch/sh/src/common/up_blocktask.c | 8 ++---
nuttx/arch/sh/src/common/up_createstack.c | 4 +--
nuttx/arch/sh/src/common/up_exit.c | 6 ++--
nuttx/arch/sh/src/common/up_releasepending.c | 6 ++--
nuttx/arch/sh/src/common/up_releasestack.c | 2 +-
nuttx/arch/sh/src/common/up_reprioritizertr.c | 8 ++---
nuttx/arch/sh/src/common/up_unblocktask.c | 8 ++---
nuttx/arch/sh/src/common/up_usestack.c | 4 +--
nuttx/arch/sh/src/m16c/m16c_dumpstate.c | 4 +--
nuttx/arch/sh/src/m16c/m16c_initialstate.c | 2 +-
nuttx/arch/sh/src/m16c/m16c_schedulesigaction.c | 4 +--
nuttx/arch/sh/src/m16c/m16c_sigdeliver.c | 2 +-
nuttx/arch/sh/src/sh1/sh1_dumpstate.c | 2 +-
nuttx/arch/sh/src/sh1/sh1_initialstate.c | 2 +-
nuttx/arch/sh/src/sh1/sh1_schedulesigaction.c | 4 +--
nuttx/arch/sh/src/sh1/sh1_sigdeliver.c | 2 +-
nuttx/arch/sim/src/up_blocktask.c | 6 ++--
nuttx/arch/sim/src/up_createstack.c | 2 +-
nuttx/arch/sim/src/up_exit.c | 4 +--
nuttx/arch/sim/src/up_initialstate.c | 2 +-
nuttx/arch/sim/src/up_releasepending.c | 4 +--
nuttx/arch/sim/src/up_releasestack.c | 2 +-
nuttx/arch/sim/src/up_reprioritizertr.c | 6 ++--
nuttx/arch/sim/src/up_schedulesigaction.c | 4 +--
nuttx/arch/sim/src/up_unblocktask.c | 6 ++--
nuttx/arch/sim/src/up_usestack.c | 2 +-
nuttx/arch/x86/src/common/up_assert.c | 10 +++---
nuttx/arch/x86/src/common/up_blocktask.c | 8 ++---
nuttx/arch/x86/src/common/up_exit.c | 6 ++--
nuttx/arch/x86/src/common/up_releasepending.c | 6 ++--
nuttx/arch/x86/src/common/up_reprioritizertr.c | 8 ++---
nuttx/arch/x86/src/common/up_unblocktask.c | 8 ++---
nuttx/arch/x86/src/i486/up_createstack.c | 4 +--
nuttx/arch/x86/src/i486/up_initialstate.c | 2 +-
nuttx/arch/x86/src/i486/up_releasestack.c | 2 +-
nuttx/arch/x86/src/i486/up_schedulesigaction.c | 4 +--
nuttx/arch/x86/src/i486/up_sigdeliver.c | 2 +-
nuttx/arch/x86/src/i486/up_usestack.c | 4 +--
nuttx/arch/z16/src/common/up_assert.c | 6 ++--
nuttx/arch/z16/src/common/up_blocktask.c | 8 ++---
nuttx/arch/z16/src/common/up_createstack.c | 4 +--
nuttx/arch/z16/src/common/up_exit.c | 6 ++--
nuttx/arch/z16/src/common/up_initialstate.c | 2 +-
nuttx/arch/z16/src/common/up_releasepending.c | 6 ++--
nuttx/arch/z16/src/common/up_releasestack.c | 2 +-
nuttx/arch/z16/src/common/up_reprioritizertr.c | 8 ++---
nuttx/arch/z16/src/common/up_schedulesigaction.c | 4 +--
nuttx/arch/z16/src/common/up_sigdeliver.c | 2 +-
nuttx/arch/z16/src/common/up_stackdump.c | 4 +--
nuttx/arch/z16/src/common/up_unblocktask.c | 8 ++---
nuttx/arch/z16/src/common/up_usestack.c | 4 +--
nuttx/arch/z80/src/common/up_assert.c | 6 ++--
nuttx/arch/z80/src/common/up_blocktask.c | 8 ++---
nuttx/arch/z80/src/common/up_createstack.c | 4 +--
nuttx/arch/z80/src/common/up_exit.c | 6 ++--
nuttx/arch/z80/src/common/up_releasepending.c | 6 ++--
nuttx/arch/z80/src/common/up_releasestack.c | 2 +-
nuttx/arch/z80/src/common/up_reprioritizertr.c | 8 ++---
nuttx/arch/z80/src/common/up_stackdump.c | 4 +--
nuttx/arch/z80/src/common/up_unblocktask.c | 8 ++---
nuttx/arch/z80/src/common/up_usestack.c | 4 +--
nuttx/arch/z80/src/ez80/ez80_initialstate.c | 2 +-
nuttx/arch/z80/src/ez80/ez80_schedulesigaction.c | 6 ++--
nuttx/arch/z80/src/ez80/ez80_sigdeliver.c | 2 +-
nuttx/arch/z80/src/ez80/switch.h | 2 +-
nuttx/arch/z80/src/z180/switch.h | 2 +-
nuttx/arch/z80/src/z180/z180_initialstate.c | 2 +-
nuttx/arch/z80/src/z180/z180_mmu.c | 6 ++--
nuttx/arch/z80/src/z180/z180_schedulesigaction.c | 6 ++--
nuttx/arch/z80/src/z180/z180_sigdeliver.c | 2 +-
nuttx/arch/z80/src/z8/switch.h | 2 +-
nuttx/arch/z80/src/z8/z8_initialstate.c | 2 +-
nuttx/arch/z80/src/z8/z8_schedulesigaction.c | 6 ++--
nuttx/arch/z80/src/z8/z8_sigdeliver.c | 2 +-
nuttx/arch/z80/src/z80/switch.h | 2 +-
nuttx/arch/z80/src/z80/z80_initialstate.c | 2 +-
nuttx/arch/z80/src/z80/z80_schedulesigaction.c | 6 ++--
nuttx/arch/z80/src/z80/z80_sigdeliver.c | 2 +-
nuttx/binfmt/binfmt_execmodule.c | 10 +++---
nuttx/configs/ea3131/src/up_fillpage.c | 6 ++--
nuttx/configs/ea3152/src/up_fillpage.c | 6 ++--
nuttx/fs/fs_fdopen.c | 4 +--
nuttx/include/nuttx/arch.h | 24 ++++++-------
nuttx/include/nuttx/fs/fs.h | 9 ++---
nuttx/include/nuttx/page.h | 18 +++++-----
nuttx/include/nuttx/sched.h | 39 ++++++++-------------
nuttx/include/sched.h | 21 ++++++------
nuttx/include/semaphore.h | 3 +-
nuttx/sched/Kconfig | 6 ++--
nuttx/sched/atexit.c | 4 +--
nuttx/sched/env_clearenv.c | 2 +-
nuttx/sched/env_dup.c | 2 +-
nuttx/sched/env_getenv.c | 4 +--
nuttx/sched/env_getenvironptr.c | 2 +-
nuttx/sched/env_setenv.c | 4 +--
nuttx/sched/env_unsetenv.c | 2 +-
nuttx/sched/errno_getptr.c | 2 +-
nuttx/sched/exit.c | 2 +-
nuttx/sched/getpid.c | 2 +-
nuttx/sched/group_create.c | 4 +--
nuttx/sched/group_internal.h | 16 ++++-----
nuttx/sched/group_join.c | 6 ++--
nuttx/sched/group_leave.c | 4 +--
nuttx/sched/group_setupidlefiles.c | 2 +-
nuttx/sched/group_setupstreams.c | 2 +-
nuttx/sched/group_setuptaskfiles.c | 10 +++---
nuttx/sched/group_signal.c | 4 +--
nuttx/sched/mq_close.c | 2 +-
nuttx/sched/mq_descreate.c | 2 +-
nuttx/sched/mq_internal.h | 4 +--
nuttx/sched/mq_notify.c | 8 ++---
nuttx/sched/mq_open.c | 10 +++---
nuttx/sched/mq_rcvinternal.c | 14 ++++----
nuttx/sched/mq_sndinternal.c | 16 ++++-----
nuttx/sched/mq_timedreceive.c | 2 +-
nuttx/sched/mq_timedsend.c | 2 +-
nuttx/sched/mq_waitirq.c | 2 +-
nuttx/sched/on_exit.c | 4 +--
nuttx/sched/os_internal.h | 32 ++++++++---------
nuttx/sched/os_start.c | 4 +--
nuttx/sched/pg_internal.h | 2 +-
nuttx/sched/pg_miss.c | 4 +--
nuttx/sched/pg_worker.c | 14 ++++----
nuttx/sched/prctl.c | 8 ++---
nuttx/sched/pthread_cancel.c | 4 +--
nuttx/sched/pthread_create.c | 10 +++---
nuttx/sched/pthread_detach.c | 2 +-
nuttx/sched/pthread_getspecific.c | 2 +-
nuttx/sched/pthread_join.c | 4 +--
nuttx/sched/pthread_keycreate.c | 2 +-
nuttx/sched/pthread_setcancelstate.c | 2 +-
nuttx/sched/pthread_setspecific.c | 2 +-
nuttx/sched/sched_addblocked.c | 2 +-
nuttx/sched/sched_addprioritized.c | 12 +++----
nuttx/sched/sched_addreadytorun.c | 4 +--
nuttx/sched/sched_getfiles.c | 2 +-
nuttx/sched/sched_getparam.c | 6 ++--
nuttx/sched/sched_getscheduler.c | 4 +--
nuttx/sched/sched_getsockets.c | 2 +-
nuttx/sched/sched_getstreams.c | 2 +-
nuttx/sched/sched_gettcb.c | 4 +--
nuttx/sched/sched_lock.c | 2 +-
nuttx/sched/sched_lockcount.c | 2 +-
nuttx/sched/sched_mergepending.c | 12 +++----
nuttx/sched/sched_processtimer.c | 4 +--
nuttx/sched/sched_releasetcb.c | 2 +-
nuttx/sched/sched_removeblocked.c | 2 +-
nuttx/sched/sched_removereadytorun.c | 2 +-
nuttx/sched/sched_reprioritize.c | 2 +-
nuttx/sched/sched_rrgetinterval.c | 4 +--
nuttx/sched/sched_self.c | 4 +--
nuttx/sched/sched_setparam.c | 10 +++---
nuttx/sched/sched_setpriority.c | 8 ++---
nuttx/sched/sched_setscheduler.c | 2 +-
nuttx/sched/sched_unlock.c | 2 +-
nuttx/sched/sched_verifytcb.c | 2 +-
nuttx/sched/sched_waitid.c | 6 ++--
nuttx/sched/sched_waitpid.c | 6 ++--
nuttx/sched/sched_yield.c | 2 +-
nuttx/sched/sem_holder.c | 39 +++++++++++----------
nuttx/sched/sem_internal.h | 25 +++++++-------
nuttx/sched/sem_post.c | 8 ++---
nuttx/sched/sem_timedwait.c | 2 +-
nuttx/sched/sem_trywait.c | 4 +--
nuttx/sched/sem_wait.c | 6 ++--
nuttx/sched/sem_waitirq.c | 2 +-
nuttx/sched/sig_action.c | 2 +-
nuttx/sched/sig_cleanup.c | 2 +-
nuttx/sched/sig_deliver.c | 2 +-
nuttx/sched/sig_findaction.c | 2 +-
nuttx/sched/sig_internal.h | 12 +++----
nuttx/sched/sig_kill.c | 6 ++--
nuttx/sched/sig_mqnotempty.c | 8 ++---
nuttx/sched/sig_pending.c | 10 +++---
nuttx/sched/sig_procmask.c | 2 +-
nuttx/sched/sig_queue.c | 8 ++---
nuttx/sched/sig_received.c | 8 ++---
nuttx/sched/sig_removependingsignal.c | 2 +-
nuttx/sched/sig_suspend.c | 12 +++----
nuttx/sched/sig_timedwait.c | 20 +++++------
nuttx/sched/sig_unmaskpendingsignal.c | 8 ++---
nuttx/sched/task_activate.c | 2 +-
nuttx/sched/task_create.c | 4 +--
nuttx/sched/task_delete.c | 8 ++---
nuttx/sched/task_deletecurrent.c | 8 ++---
nuttx/sched/task_exithook.c | 16 ++++-----
nuttx/sched/task_getgroup.c | 2 +-
nuttx/sched/task_init.c | 4 +--
nuttx/sched/task_reparent.c | 8 ++---
nuttx/sched/task_restart.c | 8 ++---
nuttx/sched/task_setup.c | 16 ++++-----
nuttx/sched/task_start.c | 2 +-
nuttx/sched/task_starthook.c | 2 +-
nuttx/sched/task_vfork.c | 14 ++++----
nuttx/sched/timer_settime.c | 4 +--
nuttx/syscall/syscall.csv | 2 +-
293 files changed, 836 insertions(+), 839 deletions(-)
(limited to 'nuttx')
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 5b328f35b..1e90ee2de 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -4121,4 +4121,7 @@
the task group structures. Now all message queues opened by
members of the group are closed when the last member of the group
exits.
+ * includes/nuttx/sched.h and Lots of files: Change name of _TCB to
+ struct tcb_s so that (1) it is consitent with other NuttX naming and
+ so that (2) the naming can handle some upcoming changes.
diff --git a/nuttx/Documentation/NuttXDemandPaging.html b/nuttx/Documentation/NuttXDemandPaging.html
index 082edd21b..baa2626c2 100644
--- a/nuttx/Documentation/NuttXDemandPaging.html
+++ b/nuttx/Documentation/NuttXDemandPaging.html
@@ -8,7 +8,7 @@
On-Demand Paging
- Last Updated: August 12, 2010
+ Last Updated: February 4, 2010
|
@@ -306,7 +306,7 @@
- The page fill worker thread will maintain a static variable called _TCB *g_pftcb
.
+ The page fill worker thread will maintain a static variable called struct tcb_s *g_pftcb
.
If no fill is in progress, g_pftcb
will be NULL.
Otherwise, it will point to the TCB of the task which is receiving the fill that is in progess.
@@ -619,7 +619,7 @@
-
-
void up_block_task(FAR _TCB *tcb, tstate_t task_state);
+ void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state);
-
The currently executing task at the head of the ready to run list must be stopped.
@@ -628,7 +628,7 @@
page fill, and to
-
-
void up_unblock_task(FAR _TCB *tcb);
+ void up_unblock_task(FAR struct tcb_s *tcb);
-
A task is currently in an inactive task list but has been prepped to execute.
@@ -643,7 +643,7 @@
-
-
int up_checkmapping(FAR _TCB *tcb);
+ int up_checkmapping(FAR struct tcb_s *tcb);
-
The function
up_checkmapping()
returns an indication if the page fill still needs to performed or not.
@@ -651,7 +651,7 @@
This function will prevent the same page from be filled multiple times.
-
-
int up_allocpage(FAR _TCB *tcb, FAR void *vpage);
+ int up_allocpage(FAR struct tcb_s *tcb, FAR void *vpage);
-
This architecture-specific function will set aside page in memory and map to its correct virtual address.
@@ -661,7 +661,7 @@
NOTE: This function must always return a page allocation.
If all available pages are in-use (the typical case), then this function will select a page in-use, un-map it, and make it available.
- int up_fillpage(FAR _TCB *tcb, FAR const void *vpage, void (*pg_callback)(FAR _TCB *tcb, int result));
+ int up_fillpage(FAR struct tcb_s *tcb, FAR const void *vpage, void (*pg_callback)(FAR struct tcb_s *tcb, int result));
The actual filling of the page with data from the non-volatile, must be performed by a separate call to the architecture-specific function, up_fillpage()
.
This will start asynchronous page fill.
diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html
index f2f7ada02..9eb114fd2 100644
--- a/nuttx/Documentation/NuttxPortingGuide.html
+++ b/nuttx/Documentation/NuttxPortingGuide.html
@@ -12,7 +12,7 @@
NuttX RTOS Porting Guide
- Last Updated: January 23, 2013
+ Last Updated: February 4, 2013
@@ -1590,7 +1590,7 @@ The system can be re-made subsequently by just typing make
.
-Prototype: void up_initial_state(FAR _TCB *tcb);
+Prototype: void up_initial_state(FAR struct tcb_s *tcb);
Description.
A new thread is being started and a new TCB has been created.
@@ -1613,7 +1613,7 @@ The system can be re-made subsequently by just typing make
.
-Prototype: STATUS up_create_stack(FAR _TCB *tcb, size_t stack_size);
+Prototype: STATUS up_create_stack(FAR struct tcb_s *tcb, size_t stack_size);
Description.
Allocate a stack for a new thread and setup
@@ -1648,7 +1648,7 @@ The system can be re-made subsequently by just typing make
.
Prototype:
- STATUS up_use_stack(FAR _TCB *tcb, FAR void *stack, size_t stack_size);
+ STATUS up_use_stack(FAR struct tcb_s *tcb, FAR void *stack, size_t stack_size);
Description.
@@ -1682,7 +1682,7 @@ The system can be re-made subsequently by just typing make
.
-Prototype: void up_release_stack(FAR _TCB *dtcb);
+Prototype: void up_release_stack(FAR struct tcb_s *dtcb);
Description.
A task has been stopped. Free all stack
@@ -1694,7 +1694,7 @@ The system can be re-made subsequently by just typing make
.
-Prototype: void up_unblock_task(FAR _TCB *tcb);
+Prototype: void up_unblock_task(FAR struct tcb_s *tcb);
Description.
A task is currently in an inactive task list
@@ -1717,7 +1717,7 @@ The system can be re-made subsequently by just typing make
.
-Prototype: void up_block_task(FAR _TCB *tcb, tstate_t task_state);
+Prototype: void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state);
Description.
The currently executing task at the head of
@@ -1760,7 +1760,7 @@ The system can be re-made subsequently by just typing make
.
-Prototype: void up_reprioritize_rtr(FAR _TCB *tcb, uint8_t priority);
+Prototype: void up_reprioritize_rtr(FAR struct tcb_s *tcb, uint8_t priority);
Description.
Called when the priority of a running or
@@ -1821,7 +1821,7 @@ The system can be re-made subsequently by just typing make
.
Prototype:
- void up_schedule_sigaction(FAR _TCB *tcb, sig_deliver_t sigdeliver);
+ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver);
Description.
@@ -2297,7 +2297,7 @@ else
Prototype:
- int up_addrenv_assign(task_addrenv_t addrenv, FAR _TCB *tcb);
+ int up_addrenv_assign(task_addrenv_t addrenv, FAR struct tcb_s *tcb);
Description:
@@ -2316,7 +2316,7 @@ else
Prototype:
- int up_addrenv_share(FAR const _TCB *ptcb, FAR _TCB *ctcb);
+ int up_addrenv_share(FAR const struct tcb_s *ptcb, FAR struct tcb_s *ctcb);
Description:
@@ -2336,7 +2336,7 @@ else
Prototype:
- int up_addrenv_release(FAR _TCB *tcb);
+ int up_addrenv_release(FAR struct tcb_s *tcb);
Description:
diff --git a/nuttx/Documentation/NuttxUserGuide.html b/nuttx/Documentation/NuttxUserGuide.html
index 2704196d0..3aeb30788 100644
--- a/nuttx/Documentation/NuttxUserGuide.html
+++ b/nuttx/Documentation/NuttxUserGuide.html
@@ -13,7 +13,7 @@
NuttX Operating SystemUser's Manual
by
Gregory Nutt
-
Last Updated: February 2, 2013
+ Last Updated: February 4, 2013
@@ -342,7 +342,7 @@ VxWorks provides the following similar interface:
Function Prototype:
#include <sched.h>
- int task_init(_TCB *tcb, char *name, int priority, uint32_t *stack, uint32_t stack_size,
+ int task_init(struct tcb_s *tcb, char *name, int priority, uint32_t *stack, uint32_t stack_size,
maint_t entry, char * const argv[]);
@@ -414,7 +414,7 @@ VxWorks provides the following similar interface:
Function Prototype:
#include <sched.h>
- int task_activate(_TCB *tcb);
+ int task_activate(struct tcb_s *tcb);
@@ -9188,7 +9188,7 @@ From the standpoint of the application, these structures (and
structure pointers) should be treated as simple handles to reference
OS resources. These hidden structures include:
-- _TCB
+
- struct tcb_s
- mqd_t
- sem_t
- WDOG_ID
diff --git a/nuttx/TODO b/nuttx/TODO
index f3feb6fb0..3f26b852b 100644
--- a/nuttx/TODO
+++ b/nuttx/TODO
@@ -198,8 +198,8 @@ o Task/Scheduler (sched/)
bug-for-bug compatibility, the same errno should be shared by
the task and each thread that it creates. It is *very* easy
to make this change: Just move the pterrno field from
- _TCB to struct task_group_s. However, I am still not sure
- if this should be done or not.
+ struct tcb_s to struct task_group_s. However, I am still not
+ sure if this should be done or not.
Status: Closed. The existing solution is better (although its
incompatibilities could show up in porting some code).
Priority: Low
diff --git a/nuttx/arch/8051/src/up_assert.c b/nuttx/arch/8051/src/up_assert.c
index 5e59d6af0..f1f9bb87f 100644
--- a/nuttx/arch/8051/src/up_assert.c
+++ b/nuttx/arch/8051/src/up_assert.c
@@ -70,7 +70,7 @@ static void _up_assert(int errorcode)
{
/* Are we in an interrupt handler or the idle task? */
- if (g_irqtos || ((FAR _TCB*)g_readytorun.head)->pid == 0)
+ if (g_irqtos || ((FAR struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
for(;;)
@@ -100,7 +100,7 @@ static void _up_assert(int errorcode)
void up_assert(const uint8_t *filename, int lineno)
{
#if CONFIG_TASK_NAME_SIZE > 0
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
@@ -124,7 +124,7 @@ void up_assert(const uint8_t *filename, int lineno)
void up_assert_code(const uint8_t *filename, int lineno, int errorcode)
{
#if CONFIG_TASK_NAME_SIZE > 0
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
diff --git a/nuttx/arch/8051/src/up_blocktask.c b/nuttx/arch/8051/src/up_blocktask.c
index 14dc371dd..554111ae0 100644
--- a/nuttx/arch/8051/src/up_blocktask.c
+++ b/nuttx/arch/8051/src/up_blocktask.c
@@ -83,7 +83,7 @@
*
************************************************************************/
-void up_block_task(FAR _TCB *tcb, tstate_t task_state)
+void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state)
{
/* Verify that the context switch can be performed */
@@ -94,7 +94,7 @@ void up_block_task(FAR _TCB *tcb, tstate_t task_state)
}
else
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
bool switch_needed;
dbg("Blocking TCB=%p\n", tcb);
@@ -139,7 +139,7 @@ void up_block_task(FAR _TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
/* Then setup so that the context will be performed on exit
@@ -160,7 +160,7 @@ void up_block_task(FAR _TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
diff --git a/nuttx/arch/8051/src/up_exit.c b/nuttx/arch/8051/src/up_exit.c
index 27b9fe138..c96467bf9 100644
--- a/nuttx/arch/8051/src/up_exit.c
+++ b/nuttx/arch/8051/src/up_exit.c
@@ -77,7 +77,7 @@
void _exit(int status)
{
- FAR _TCB* tcb;
+ FAR struct tcb_s* tcb;
dbg("TCB=%p exitting\n", tcb);
@@ -95,7 +95,7 @@ void _exit(int status)
* head of the list.
*/
- tcb = (FAR _TCB*)g_readytorun.head;
+ tcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", tcb);
/* Then switch contexts */
diff --git a/nuttx/arch/8051/src/up_initialize.c b/nuttx/arch/8051/src/up_initialize.c
index b4835f4d1..c71b6c8df 100644
--- a/nuttx/arch/8051/src/up_initialize.c
+++ b/nuttx/arch/8051/src/up_initialize.c
@@ -68,7 +68,7 @@ volatile uint8_t g_irqtos;
* during the interrupt handling, these registers will be
* copied into the TCB again (NOTE: We could save a copy
* if the interrupt handling logic saved the registers
- * directly into (_TCB*)g_readytorun.head->xcp.regs).
+ * directly into (struct tcb_s*)g_readytorun.head->xcp.regs).
*/
uint8_t g_irqregs[REGS_SIZE];
diff --git a/nuttx/arch/8051/src/up_initialstate.c b/nuttx/arch/8051/src/up_initialstate.c
index 85f172888..1defe9f55 100644
--- a/nuttx/arch/8051/src/up_initialstate.c
+++ b/nuttx/arch/8051/src/up_initialstate.c
@@ -74,7 +74,7 @@
*
************************************************************************/
-void up_initial_state(FAR _TCB *tcb)
+void up_initial_state(FAR struct tcb_s *tcb)
{
FAR uint8_t *frame = tcb->xcp.stack;
FAR uint8_t *regs = tcb->xcp.regs;
diff --git a/nuttx/arch/8051/src/up_internal.h b/nuttx/arch/8051/src/up_internal.h
index c213cc3d4..46f4ffb20 100644
--- a/nuttx/arch/8051/src/up_internal.h
+++ b/nuttx/arch/8051/src/up_internal.h
@@ -79,7 +79,7 @@ extern volatile uint8_t g_irqtos;
* during the interrupt handling, these registers will be
* copied into the TCB again (NOTE: We could save a copy
* if the interrupt handling logic saved the registers
- * directly into (_TCB*)g_readytorun.head->xcp.regs).
+ * directly into (struct tcb_s*)g_readytorun.head->xcp.regs).
*/
extern uint8_t g_irqregs[REGS_SIZE];
diff --git a/nuttx/arch/8051/src/up_releasepending.c b/nuttx/arch/8051/src/up_releasepending.c
index 55f46edae..0d87608cf 100644
--- a/nuttx/arch/8051/src/up_releasepending.c
+++ b/nuttx/arch/8051/src/up_releasepending.c
@@ -76,7 +76,7 @@
void up_release_pending(void)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("From TCB=%p\n", rtcb);
@@ -102,7 +102,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
/* Then setup so that the context will be performed on exit
@@ -124,7 +124,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
diff --git a/nuttx/arch/8051/src/up_reprioritizertr.c b/nuttx/arch/8051/src/up_reprioritizertr.c
index 0d1941f66..14c14e663 100644
--- a/nuttx/arch/8051/src/up_reprioritizertr.c
+++ b/nuttx/arch/8051/src/up_reprioritizertr.c
@@ -85,7 +85,7 @@
*
****************************************************************************/
-void up_reprioritize_rtr(FAR _TCB *tcb, uint8_t priority)
+void up_reprioritize_rtr(FAR struct tcb_s *tcb, uint8_t priority)
{
/* Verify that the caller is sane */
@@ -103,7 +103,7 @@ void up_reprioritize_rtr(FAR _TCB *tcb, uint8_t priority)
}
else
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
bool switch_needed;
dbg("TCB=%p PRI=%d\n", tcb, priority);
@@ -157,7 +157,7 @@ void up_reprioritize_rtr(FAR _TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
/* Then setup so that the context will be performed on exit
@@ -178,7 +178,7 @@ void up_reprioritize_rtr(FAR _TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
diff --git a/nuttx/arch/8051/src/up_unblocktask.c b/nuttx/arch/8051/src/up_unblocktask.c
index 1c82236a5..f3f921549 100644
--- a/nuttx/arch/8051/src/up_unblocktask.c
+++ b/nuttx/arch/8051/src/up_unblocktask.c
@@ -80,7 +80,7 @@
*
************************************************************************/
-void up_unblock_task(FAR _TCB *tcb)
+void up_unblock_task(FAR struct tcb_s *tcb)
{
/* Verify that the context switch can be performed */
@@ -91,7 +91,7 @@ void up_unblock_task(FAR _TCB *tcb)
}
else
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("Unblocking TCB=%p\n", tcb);
@@ -131,7 +131,7 @@ void up_unblock_task(FAR _TCB *tcb)
* of the g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
/* Then setup so that the context will be performed on exit
@@ -154,7 +154,7 @@ void up_unblock_task(FAR _TCB *tcb)
* g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
diff --git a/nuttx/arch/arm/src/arm/up_allocpage.c b/nuttx/arch/arm/src/arm/up_allocpage.c
index 0284e48bc..8ec99b09c 100644
--- a/nuttx/arch/arm/src/arm/up_allocpage.c
+++ b/nuttx/arch/arm/src/arm/up_allocpage.c
@@ -165,7 +165,7 @@ static bool g_pgwrap;
*
****************************************************************************/
-int up_allocpage(FAR _TCB *tcb, FAR void **vpage)
+int up_allocpage(FAR struct tcb_s *tcb, FAR void **vpage)
{
uintptr_t vaddr;
uintptr_t paddr;
diff --git a/nuttx/arch/arm/src/arm/up_assert.c b/nuttx/arch/arm/src/arm/up_assert.c
index 5f713c34d..d97aba5ea 100644
--- a/nuttx/arch/arm/src/arm/up_assert.c
+++ b/nuttx/arch/arm/src/arm/up_assert.c
@@ -161,7 +161,7 @@ static inline void up_registerdump(void)
#ifdef CONFIG_ARCH_STACKDUMP
static void up_dumpstate(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
uint32_t sp = up_getsp();
uint32_t ustackbase;
uint32_t ustacksize;
@@ -257,7 +257,7 @@ static void _up_assert(int errorcode)
{
/* Are we in an interrupt handler or the idle task? */
- if (current_regs || ((_TCB*)g_readytorun.head)->pid == 0)
+ if (current_regs || ((struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
for(;;)
@@ -287,7 +287,7 @@ static void _up_assert(int errorcode)
void up_assert(const uint8_t *filename, int lineno)
{
#ifdef CONFIG_PRINT_TASKNAME
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
@@ -309,7 +309,7 @@ void up_assert(const uint8_t *filename, int lineno)
void up_assert_code(const uint8_t *filename, int lineno, int errorcode)
{
#ifdef CONFIG_PRINT_TASKNAME
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
diff --git a/nuttx/arch/arm/src/arm/up_blocktask.c b/nuttx/arch/arm/src/arm/up_blocktask.c
index f72a02465..090cc6407 100644
--- a/nuttx/arch/arm/src/arm/up_blocktask.c
+++ b/nuttx/arch/arm/src/arm/up_blocktask.c
@@ -84,7 +84,7 @@
*
****************************************************************************/
-void up_block_task(_TCB *tcb, tstate_t task_state)
+void up_block_task(struct tcb_s *tcb, tstate_t task_state)
{
/* Verify that the context switch can be performed */
@@ -95,7 +95,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* Remove the tcb task from the ready-to-run list. If we
@@ -138,7 +138,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -156,7 +156,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
diff --git a/nuttx/arch/arm/src/arm/up_checkmapping.c b/nuttx/arch/arm/src/arm/up_checkmapping.c
index ca8c3a032..f86b6de75 100644
--- a/nuttx/arch/arm/src/arm/up_checkmapping.c
+++ b/nuttx/arch/arm/src/arm/up_checkmapping.c
@@ -97,7 +97,7 @@
*
****************************************************************************/
-bool up_checkmapping(FAR _TCB *tcb)
+bool up_checkmapping(FAR struct tcb_s *tcb)
{
uintptr_t vaddr;
uint32_t *pte;
diff --git a/nuttx/arch/arm/src/arm/up_dataabort.c b/nuttx/arch/arm/src/arm/up_dataabort.c
index 60ef8385e..99b3bf2ab 100644
--- a/nuttx/arch/arm/src/arm/up_dataabort.c
+++ b/nuttx/arch/arm/src/arm/up_dataabort.c
@@ -102,9 +102,9 @@
#ifdef CONFIG_PAGING
void up_dataabort(uint32_t *regs, uint32_t far, uint32_t fsr)
{
- FAR _TCB *tcb = (FAR _TCB *)g_readytorun.head;
+ FAR struct tcb_s *tcb = (FAR struct tcb_s *)g_readytorun.head;
#ifdef CONFIG_PAGING
- uint32_t *savestate;
+ uint32_t *savestate;
/* Save the saved processor context in current_regs where it can be accessed
* for register dumps and possibly context switching.
diff --git a/nuttx/arch/arm/src/arm/up_initialstate.c b/nuttx/arch/arm/src/arm/up_initialstate.c
index fb672a2ac..7d8ef65b1 100644
--- a/nuttx/arch/arm/src/arm/up_initialstate.c
+++ b/nuttx/arch/arm/src/arm/up_initialstate.c
@@ -78,7 +78,7 @@
*
****************************************************************************/
-void up_initial_state(_TCB *tcb)
+void up_initial_state(struct tcb_s *tcb)
{
struct xcptcontext *xcp = &tcb->xcp;
uint32_t cpsr;
diff --git a/nuttx/arch/arm/src/arm/up_prefetchabort.c b/nuttx/arch/arm/src/arm/up_prefetchabort.c
index 9d028b0d4..541586de9 100644
--- a/nuttx/arch/arm/src/arm/up_prefetchabort.c
+++ b/nuttx/arch/arm/src/arm/up_prefetchabort.c
@@ -121,7 +121,7 @@ void up_prefetchabort(uint32_t *regs)
* prefetch and data aborts.
*/
- FAR _TCB *tcb = (FAR _TCB *)g_readytorun.head;
+ FAR struct tcb_s *tcb = (FAR struct tcb_s *)g_readytorun.head;
tcb->xcp.far = regs[REG_R15];
/* Call pg_miss() to schedule the page fill. A consequences of this
diff --git a/nuttx/arch/arm/src/arm/up_releasepending.c b/nuttx/arch/arm/src/arm/up_releasepending.c
index 8adeeb26d..169262e95 100644
--- a/nuttx/arch/arm/src/arm/up_releasepending.c
+++ b/nuttx/arch/arm/src/arm/up_releasepending.c
@@ -75,7 +75,7 @@
void up_release_pending(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("From TCB=%p\n", rtcb);
@@ -101,7 +101,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -121,7 +121,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
diff --git a/nuttx/arch/arm/src/arm/up_reprioritizertr.c b/nuttx/arch/arm/src/arm/up_reprioritizertr.c
index 02bc39d62..769794083 100644
--- a/nuttx/arch/arm/src/arm/up_reprioritizertr.c
+++ b/nuttx/arch/arm/src/arm/up_reprioritizertr.c
@@ -84,7 +84,7 @@
*
****************************************************************************/
-void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
+void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
{
/* Verify that the caller is sane */
@@ -102,7 +102,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
slldbg("TCB=%p PRI=%d\n", tcb, priority);
@@ -156,7 +156,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -175,7 +175,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
diff --git a/nuttx/arch/arm/src/arm/up_schedulesigaction.c b/nuttx/arch/arm/src/arm/up_schedulesigaction.c
index a76438f94..f7d33254b 100644
--- a/nuttx/arch/arm/src/arm/up_schedulesigaction.c
+++ b/nuttx/arch/arm/src/arm/up_schedulesigaction.c
@@ -101,7 +101,7 @@
*
****************************************************************************/
-void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
+void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
{
/* Refuse to handle nested signal actions */
@@ -121,7 +121,7 @@ void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
sdbg("rtcb=0x%p current_regs=0x%p\n", g_readytorun.head, current_regs);
- if (tcb == (_TCB*)g_readytorun.head)
+ if (tcb == (struct tcb_s*)g_readytorun.head)
{
/* CASE 1: We are not in an interrupt handler and
* a task is signalling itself for some reason.
diff --git a/nuttx/arch/arm/src/arm/up_sigdeliver.c b/nuttx/arch/arm/src/arm/up_sigdeliver.c
index 868449448..9459bf7e9 100644
--- a/nuttx/arch/arm/src/arm/up_sigdeliver.c
+++ b/nuttx/arch/arm/src/arm/up_sigdeliver.c
@@ -81,7 +81,7 @@
void up_sigdeliver(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
uint32_t regs[XCPTCONTEXT_REGS];
sig_deliver_t sigdeliver;
diff --git a/nuttx/arch/arm/src/arm/up_unblocktask.c b/nuttx/arch/arm/src/arm/up_unblocktask.c
index 633dc4e82..a2dc0f694 100644
--- a/nuttx/arch/arm/src/arm/up_unblocktask.c
+++ b/nuttx/arch/arm/src/arm/up_unblocktask.c
@@ -79,7 +79,7 @@
*
****************************************************************************/
-void up_unblock_task(_TCB *tcb)
+void up_unblock_task(struct tcb_s *tcb)
{
/* Verify that the context switch can be performed */
@@ -90,7 +90,7 @@ void up_unblock_task(_TCB *tcb)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
/* Remove the task from the blocked task list */
@@ -128,7 +128,7 @@ void up_unblock_task(_TCB *tcb)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -148,7 +148,7 @@ void up_unblock_task(_TCB *tcb)
* g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
diff --git a/nuttx/arch/arm/src/armv7-m/up_assert.c b/nuttx/arch/arm/src/armv7-m/up_assert.c
index b40b1090c..394c6858f 100644
--- a/nuttx/arch/arm/src/armv7-m/up_assert.c
+++ b/nuttx/arch/arm/src/armv7-m/up_assert.c
@@ -167,8 +167,8 @@ static inline void up_registerdump(void)
#ifdef CONFIG_ARCH_STACKDUMP
static void up_dumpstate(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
- uint32_t sp = up_getsp();
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
+ uint32_t sp = up_getsp();
uint32_t ustackbase;
uint32_t ustacksize;
#if CONFIG_ARCH_INTERRUPTSTACK > 3
@@ -272,7 +272,7 @@ static void _up_assert(int errorcode)
{
/* Are we in an interrupt handler or the idle task? */
- if (current_regs || ((_TCB*)g_readytorun.head)->pid == 0)
+ if (current_regs || ((struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
for(;;)
@@ -302,7 +302,7 @@ static void _up_assert(int errorcode)
void up_assert(const uint8_t *filename, int lineno)
{
#ifdef CONFIG_PRINT_TASKNAME
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
@@ -324,7 +324,7 @@ void up_assert(const uint8_t *filename, int lineno)
void up_assert_code(const uint8_t *filename, int lineno, int errorcode)
{
#ifdef CONFIG_PRINT_TASKNAME
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
diff --git a/nuttx/arch/arm/src/armv7-m/up_blocktask.c b/nuttx/arch/arm/src/armv7-m/up_blocktask.c
index 896476ed2..15558ed4d 100644
--- a/nuttx/arch/arm/src/armv7-m/up_blocktask.c
+++ b/nuttx/arch/arm/src/armv7-m/up_blocktask.c
@@ -84,7 +84,7 @@
*
****************************************************************************/
-void up_block_task(_TCB *tcb, tstate_t task_state)
+void up_block_task(struct tcb_s *tcb, tstate_t task_state)
{
/* Verify that the context switch can be performed */
@@ -95,7 +95,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* Remove the tcb task from the ready-to-run list. If we
@@ -138,7 +138,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -153,7 +153,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* ready to run list.
*/
- _TCB *nexttcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
/* up_switchcontext forces a context switch to the task at the
diff --git a/nuttx/arch/arm/src/armv7-m/up_initialstate.c b/nuttx/arch/arm/src/armv7-m/up_initialstate.c
index 635a700fd..ee523a016 100644
--- a/nuttx/arch/arm/src/armv7-m/up_initialstate.c
+++ b/nuttx/arch/arm/src/armv7-m/up_initialstate.c
@@ -81,7 +81,7 @@
*
****************************************************************************/
-void up_initial_state(_TCB *tcb)
+void up_initial_state(struct tcb_s *tcb)
{
struct xcptcontext *xcp = &tcb->xcp;
diff --git a/nuttx/arch/arm/src/armv7-m/up_releasepending.c b/nuttx/arch/arm/src/armv7-m/up_releasepending.c
index 2f0d4dc39..21c79bfc7 100644
--- a/nuttx/arch/arm/src/armv7-m/up_releasepending.c
+++ b/nuttx/arch/arm/src/armv7-m/up_releasepending.c
@@ -75,7 +75,7 @@
void up_release_pending(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("From TCB=%p\n", rtcb);
@@ -100,7 +100,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -116,7 +116,7 @@ void up_release_pending(void)
* ready to run list.
*/
- _TCB *nexttcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
/* up_switchcontext forces a context switch to the task at the
diff --git a/nuttx/arch/arm/src/armv7-m/up_reprioritizertr.c b/nuttx/arch/arm/src/armv7-m/up_reprioritizertr.c
index 9a971f064..94708a3be 100644
--- a/nuttx/arch/arm/src/armv7-m/up_reprioritizertr.c
+++ b/nuttx/arch/arm/src/armv7-m/up_reprioritizertr.c
@@ -84,7 +84,7 @@
*
****************************************************************************/
-void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
+void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
{
/* Verify that the caller is sane */
@@ -102,7 +102,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
slldbg("TCB=%p PRI=%d\n", tcb, priority);
@@ -157,7 +157,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -173,7 +173,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* ready to run list.
*/
- _TCB *nexttcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
/* up_switchcontext forces a context switch to the task at the
diff --git a/nuttx/arch/arm/src/armv7-m/up_schedulesigaction.c b/nuttx/arch/arm/src/armv7-m/up_schedulesigaction.c
index 9221a69a2..32f7082b3 100644
--- a/nuttx/arch/arm/src/armv7-m/up_schedulesigaction.c
+++ b/nuttx/arch/arm/src/armv7-m/up_schedulesigaction.c
@@ -101,7 +101,7 @@
*
****************************************************************************/
-void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
+void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
{
/* Refuse to handle nested signal actions */
@@ -121,7 +121,7 @@ void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
sdbg("rtcb=0x%p current_regs=0x%p\n", g_readytorun.head, current_regs);
- if (tcb == (_TCB*)g_readytorun.head)
+ if (tcb == (struct tcb_s*)g_readytorun.head)
{
/* CASE 1: We are not in an interrupt handler and
* a task is signalling itself for some reason.
diff --git a/nuttx/arch/arm/src/armv7-m/up_sigdeliver.c b/nuttx/arch/arm/src/armv7-m/up_sigdeliver.c
index 654214b39..2e75d254a 100644
--- a/nuttx/arch/arm/src/armv7-m/up_sigdeliver.c
+++ b/nuttx/arch/arm/src/armv7-m/up_sigdeliver.c
@@ -81,7 +81,7 @@
void up_sigdeliver(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
uint32_t regs[XCPTCONTEXT_REGS];
sig_deliver_t sigdeliver;
diff --git a/nuttx/arch/arm/src/armv7-m/up_svcall.c b/nuttx/arch/arm/src/armv7-m/up_svcall.c
index d32f0afc2..9fa5a0b82 100644
--- a/nuttx/arch/arm/src/armv7-m/up_svcall.c
+++ b/nuttx/arch/arm/src/armv7-m/up_svcall.c
@@ -109,9 +109,9 @@
#ifdef CONFIG_NUTTX_KERNEL
static inline void dispatch_syscall(uint32_t *regs)
{
- uint32_t cmd = regs[REG_R0];
- FAR _TCB *rtcb = sched_self();
- uintptr_t ret = (uintptr_t)ERROR;
+ uint32_t cmd = regs[REG_R0];
+ FAR struct tcb_s *rtcb = sched_self();
+ uintptr_t ret = (uintptr_t)ERROR;
/* Verify the the SYS call number is within range */
diff --git a/nuttx/arch/arm/src/armv7-m/up_unblocktask.c b/nuttx/arch/arm/src/armv7-m/up_unblocktask.c
index da10f0376..b2ff98879 100644
--- a/nuttx/arch/arm/src/armv7-m/up_unblocktask.c
+++ b/nuttx/arch/arm/src/armv7-m/up_unblocktask.c
@@ -79,7 +79,7 @@
*
****************************************************************************/
-void up_unblock_task(_TCB *tcb)
+void up_unblock_task(struct tcb_s *tcb)
{
/* Verify that the context switch can be performed */
@@ -90,7 +90,7 @@ void up_unblock_task(_TCB *tcb)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
/* Remove the task from the blocked task list */
@@ -128,7 +128,7 @@ void up_unblock_task(_TCB *tcb)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -143,7 +143,7 @@ void up_unblock_task(_TCB *tcb)
* ready to run list.
*/
- _TCB *nexttcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
/* up_switchcontext forces a context switch to the task at the
diff --git a/nuttx/arch/arm/src/common/up_checkstack.c b/nuttx/arch/arm/src/common/up_checkstack.c
index ac8d9e7b9..273d30d23 100644
--- a/nuttx/arch/arm/src/common/up_checkstack.c
+++ b/nuttx/arch/arm/src/common/up_checkstack.c
@@ -78,7 +78,7 @@
*
****************************************************************************/
-size_t up_check_tcbstack(FAR _TCB *tcb)
+size_t up_check_tcbstack(FAR struct tcb_s *tcb)
{
FAR uint32_t *ptr;
size_t mark;
@@ -136,12 +136,12 @@ size_t up_check_tcbstack(FAR _TCB *tcb)
size_t up_check_stack(void)
{
- return up_check_tcbstack((FAR _TCB*)g_readytorun.head);
+ return up_check_tcbstack((FAR struct tcb_s*)g_readytorun.head);
}
size_t up_check_stack_remain(void)
{
- return ((FAR _TCB*)g_readytorun.head)->adj_stack_size - up_check_tcbstack((FAR _TCB*)g_readytorun.head);
+ return ((FAR struct tcb_s*)g_readytorun.head)->adj_stack_size - up_check_tcbstack((FAR struct tcb_s*)g_readytorun.head);
}
#endif /* CONFIG_DEBUG && CONFIG_DEBUG_STACK */
diff --git a/nuttx/arch/arm/src/common/up_createstack.c b/nuttx/arch/arm/src/common/up_createstack.c
index 3d6dfef45..e3f963227 100644
--- a/nuttx/arch/arm/src/common/up_createstack.c
+++ b/nuttx/arch/arm/src/common/up_createstack.c
@@ -128,7 +128,7 @@ static void *memset32(void *s, uint32_t c, size_t n)
* must be allocated.
****************************************************************************/
-int up_create_stack(_TCB *tcb, size_t stack_size)
+int up_create_stack(struct tcb_s *tcb, size_t stack_size)
{
if (tcb->stack_alloc_ptr &&
tcb->adj_stack_size != stack_size)
@@ -174,7 +174,7 @@ int up_create_stack(_TCB *tcb, size_t stack_size)
size_of_stack = top_of_stack - (uint32_t)tcb->stack_alloc_ptr + 4;
- /* Save the adjusted stack values in the _TCB */
+ /* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack;
diff --git a/nuttx/arch/arm/src/common/up_exit.c b/nuttx/arch/arm/src/common/up_exit.c
index 16f5c4442..76bf4e0dd 100644
--- a/nuttx/arch/arm/src/common/up_exit.c
+++ b/nuttx/arch/arm/src/common/up_exit.c
@@ -73,7 +73,7 @@
****************************************************************************/
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
-static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
+static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
@@ -136,7 +136,7 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
void _exit(int status)
{
- _TCB* tcb;
+ struct tcb_s* tcb;
/* Disable interrupts. They will be restored when the next
* task is started.
@@ -159,7 +159,7 @@ void _exit(int status)
* head of the list.
*/
- tcb = (_TCB*)g_readytorun.head;
+ tcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
diff --git a/nuttx/arch/arm/src/common/up_internal.h b/nuttx/arch/arm/src/common/up_internal.h
index 8a24f003e..981fe7ae8 100644
--- a/nuttx/arch/arm/src/common/up_internal.h
+++ b/nuttx/arch/arm/src/common/up_internal.h
@@ -410,8 +410,8 @@ extern void up_rnginitialize(void);
#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_STACK)
extern size_t up_check_stack(void);
-extern size_t up_check_tcbstack(FAR _TCB);
-extern size_t up_check_tcbstack_remain(FAR _TCB);
+extern size_t up_check_tcbstack(FAR struct tcb_s);
+extern size_t up_check_tcbstack_remain(FAR struct tcb_s);
#endif
#endif /* __ASSEMBLY__ */
diff --git a/nuttx/arch/arm/src/common/up_releasestack.c b/nuttx/arch/arm/src/common/up_releasestack.c
index 82f5db88f..cb0bf030a 100644
--- a/nuttx/arch/arm/src/common/up_releasestack.c
+++ b/nuttx/arch/arm/src/common/up_releasestack.c
@@ -67,7 +67,7 @@
*
****************************************************************************/
-void up_release_stack(_TCB *dtcb)
+void up_release_stack(struct tcb_s *dtcb)
{
if (dtcb->stack_alloc_ptr)
{
diff --git a/nuttx/arch/arm/src/common/up_usestack.c b/nuttx/arch/arm/src/common/up_usestack.c
index a3f4f4816..d94f99a57 100644
--- a/nuttx/arch/arm/src/common/up_usestack.c
+++ b/nuttx/arch/arm/src/common/up_usestack.c
@@ -109,7 +109,7 @@
*
****************************************************************************/
-int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
+int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
{
size_t top_of_stack;
size_t size_of_stack;
@@ -146,7 +146,7 @@ int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
size_of_stack = top_of_stack - (uint32_t)tcb->stack_alloc_ptr + 4;
- /* Save the adjusted stack values in the _TCB */
+ /* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack;
diff --git a/nuttx/arch/arm/src/common/up_vfork.c b/nuttx/arch/arm/src/common/up_vfork.c
index 3b653e317..f576f6bfd 100644
--- a/nuttx/arch/arm/src/common/up_vfork.c
+++ b/nuttx/arch/arm/src/common/up_vfork.c
@@ -126,8 +126,8 @@
pid_t up_vfork(const struct vfork_s *context)
{
- _TCB *parent = (FAR _TCB *)g_readytorun.head;
- _TCB *child;
+ struct tcb_s *parent = (FAR struct tcb_s *)g_readytorun.head;
+ struct tcb_s *child;
size_t stacksize;
uint32_t newsp;
uint32_t newfp;
diff --git a/nuttx/arch/avr/src/avr/up_blocktask.c b/nuttx/arch/avr/src/avr/up_blocktask.c
index 4bc587903..7d48da78a 100644
--- a/nuttx/arch/avr/src/avr/up_blocktask.c
+++ b/nuttx/arch/avr/src/avr/up_blocktask.c
@@ -84,7 +84,7 @@
*
****************************************************************************/
-void up_block_task(_TCB *tcb, tstate_t task_state)
+void up_block_task(struct tcb_s *tcb, tstate_t task_state)
{
/* Verify that the context switch can be performed */
@@ -95,7 +95,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* Remove the tcb task from the ready-to-run list. If we
@@ -138,7 +138,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -153,7 +153,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* ready to run list.
*/
- _TCB *nexttcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
/* up_switchcontext forces a context switch to the task at the
diff --git a/nuttx/arch/avr/src/avr/up_checkstack.c b/nuttx/arch/avr/src/avr/up_checkstack.c
index b8325ccbc..e58ee0ca3 100644
--- a/nuttx/arch/avr/src/avr/up_checkstack.c
+++ b/nuttx/arch/avr/src/avr/up_checkstack.c
@@ -78,7 +78,7 @@
*
****************************************************************************/
-size_t up_check_tcbstack(FAR _TCB *tcb)
+size_t up_check_tcbstack(FAR struct tcb_s *tcb)
{
FAR uint8_t *ptr;
size_t mark;
@@ -135,7 +135,7 @@ size_t up_check_tcbstack(FAR _TCB *tcb)
size_t up_check_stack(void)
{
- return up_check_tcbstack((FAR _TCB*)g_readytorun.head);
+ return up_check_tcbstack((FAR struct tcb_s*)g_readytorun.head);
}
#endif /* CONFIG_DEBUG && CONFIG_DEBUG_STACK */
diff --git a/nuttx/arch/avr/src/avr/up_createstack.c b/nuttx/arch/avr/src/avr/up_createstack.c
index 67219ec9c..904a4acab 100644
--- a/nuttx/arch/avr/src/avr/up_createstack.c
+++ b/nuttx/arch/avr/src/avr/up_createstack.c
@@ -87,7 +87,7 @@
*
****************************************************************************/
-int up_create_stack(_TCB *tcb, size_t stack_size)
+int up_create_stack(struct tcb_s *tcb, size_t stack_size)
{
/* Is there already a stack allocated of a different size? */
@@ -137,7 +137,7 @@ int up_create_stack(_TCB *tcb, size_t stack_size)
top_of_stack = (size_t)tcb->stack_alloc_ptr + stack_size - 1;
- /* Save the adjusted stack values in the _TCB */
+ /* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_ptr = (FAR void *)top_of_stack;
tcb->adj_stack_size = stack_size;
diff --git a/nuttx/arch/avr/src/avr/up_dumpstate.c b/nuttx/arch/avr/src/avr/up_dumpstate.c
index 3ce595bf0..62e80255f 100644
--- a/nuttx/arch/avr/src/avr/up_dumpstate.c
+++ b/nuttx/arch/avr/src/avr/up_dumpstate.c
@@ -168,8 +168,8 @@ static inline void up_registerdump(void)
void up_dumpstate(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
- uint16_t sp = up_getsp();
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
+ uint16_t sp = up_getsp();
uint16_t ustackbase;
uint16_t ustacksize;
#if CONFIG_ARCH_INTERRUPTSTACK > 0
diff --git a/nuttx/arch/avr/src/avr/up_initialstate.c b/nuttx/arch/avr/src/avr/up_initialstate.c
index 12fead20a..8672e6da7 100644
--- a/nuttx/arch/avr/src/avr/up_initialstate.c
+++ b/nuttx/arch/avr/src/avr/up_initialstate.c
@@ -79,7 +79,7 @@
*
****************************************************************************/
-void up_initial_state(_TCB *tcb)
+void up_initial_state(struct tcb_s *tcb)
{
struct xcptcontext *xcp = &tcb->xcp;
diff --git a/nuttx/arch/avr/src/avr/up_releasepending.c b/nuttx/arch/avr/src/avr/up_releasepending.c
index 5684dcf55..0a63189fe 100644
--- a/nuttx/arch/avr/src/avr/up_releasepending.c
+++ b/nuttx/arch/avr/src/avr/up_releasepending.c
@@ -75,7 +75,7 @@
void up_release_pending(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("From TCB=%p\n", rtcb);
@@ -101,7 +101,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -117,7 +117,7 @@ void up_release_pending(void)
* ready to run list.
*/
- _TCB *nexttcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
/* up_switchcontext forces a context switch to the task at the
diff --git a/nuttx/arch/avr/src/avr/up_reprioritizertr.c b/nuttx/arch/avr/src/avr/up_reprioritizertr.c
index af329c13f..5b23a37a1 100644
--- a/nuttx/arch/avr/src/avr/up_reprioritizertr.c
+++ b/nuttx/arch/avr/src/avr/up_reprioritizertr.c
@@ -84,7 +84,7 @@
*
****************************************************************************/
-void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
+void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
{
/* Verify that the caller is sane */
@@ -102,7 +102,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
slldbg("TCB=%p PRI=%d\n", tcb, priority);
@@ -156,7 +156,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -172,7 +172,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* ready to run list.
*/
- _TCB *nexttcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
/* up_switchcontext forces a context switch to the task at the
diff --git a/nuttx/arch/avr/src/avr/up_schedulesigaction.c b/nuttx/arch/avr/src/avr/up_schedulesigaction.c
index a70158a0d..304f2dc22 100644
--- a/nuttx/arch/avr/src/avr/up_schedulesigaction.c
+++ b/nuttx/arch/avr/src/avr/up_schedulesigaction.c
@@ -101,7 +101,7 @@
*
****************************************************************************/
-void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
+void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
{
/* Refuse to handle nested signal actions */
@@ -121,7 +121,7 @@ void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
sdbg("rtcb=0x%p current_regs=0x%p\n", g_readytorun.head, current_regs);
- if (tcb == (_TCB*)g_readytorun.head)
+ if (tcb == (struct tcb_s*)g_readytorun.head)
{
/* CASE 1: We are not in an interrupt handler and
* a task is signalling itself for some reason.
diff --git a/nuttx/arch/avr/src/avr/up_sigdeliver.c b/nuttx/arch/avr/src/avr/up_sigdeliver.c
index 4398dba6b..400753799 100644
--- a/nuttx/arch/avr/src/avr/up_sigdeliver.c
+++ b/nuttx/arch/avr/src/avr/up_sigdeliver.c
@@ -81,7 +81,7 @@
void up_sigdeliver(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
uint8_t regs[XCPTCONTEXT_REGS];
sig_deliver_t sigdeliver;
diff --git a/nuttx/arch/avr/src/avr/up_unblocktask.c b/nuttx/arch/avr/src/avr/up_unblocktask.c
index 0eff2edcd..f1707b7bd 100644
--- a/nuttx/arch/avr/src/avr/up_unblocktask.c
+++ b/nuttx/arch/avr/src/avr/up_unblocktask.c
@@ -79,7 +79,7 @@
*
****************************************************************************/
-void up_unblock_task(_TCB *tcb)
+void up_unblock_task(struct tcb_s *tcb)
{
/* Verify that the context switch can be performed */
@@ -90,7 +90,7 @@ void up_unblock_task(_TCB *tcb)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
/* Remove the task from the blocked task list */
@@ -128,7 +128,7 @@ void up_unblock_task(_TCB *tcb)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -143,7 +143,7 @@ void up_unblock_task(_TCB *tcb)
* ready to run list.
*/
- _TCB *nexttcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
/* up_switchcontext forces a context switch to the task at the
diff --git a/nuttx/arch/avr/src/avr/up_usestack.c b/nuttx/arch/avr/src/avr/up_usestack.c
index cedc9afe3..cd93f5d23 100644
--- a/nuttx/arch/avr/src/avr/up_usestack.c
+++ b/nuttx/arch/avr/src/avr/up_usestack.c
@@ -82,7 +82,7 @@
*
****************************************************************************/
-int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
+int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
{
size_t top_of_stack;
@@ -115,7 +115,7 @@ int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
top_of_stack = (size_t)tcb->stack_alloc_ptr + stack_size - 1;
- /* Save the adjusted stack values in the _TCB */
+ /* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_ptr = (FAR void *)top_of_stack;
tcb->adj_stack_size = stack_size;
diff --git a/nuttx/arch/avr/src/avr32/up_blocktask.c b/nuttx/arch/avr/src/avr32/up_blocktask.c
index 5d05350e6..a5ff53ae9 100644
--- a/nuttx/arch/avr/src/avr32/up_blocktask.c
+++ b/nuttx/arch/avr/src/avr32/up_blocktask.c
@@ -84,7 +84,7 @@
*
****************************************************************************/
-void up_block_task(_TCB *tcb, tstate_t task_state)
+void up_block_task(struct tcb_s *tcb, tstate_t task_state)
{
/* Verify that the context switch can be performed */
@@ -95,7 +95,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* Remove the tcb task from the ready-to-run list. If we
@@ -138,7 +138,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -153,7 +153,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* ready to run list.
*/
- _TCB *nexttcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
/* up_switchcontext forces a context switch to the task at the
diff --git a/nuttx/arch/avr/src/avr32/up_createstack.c b/nuttx/arch/avr/src/avr32/up_createstack.c
index 2d34a9adf..93bbad6af 100644
--- a/nuttx/arch/avr/src/avr32/up_createstack.c
+++ b/nuttx/arch/avr/src/avr32/up_createstack.c
@@ -86,7 +86,7 @@
*
****************************************************************************/
-int up_create_stack(_TCB *tcb, size_t stack_size)
+int up_create_stack(struct tcb_s *tcb, size_t stack_size)
{
if (tcb->stack_alloc_ptr &&
tcb->adj_stack_size != stack_size)
@@ -124,7 +124,7 @@ int up_create_stack(_TCB *tcb, size_t stack_size)
top_of_stack &= ~3;
size_of_stack = top_of_stack - (size_t)tcb->stack_alloc_ptr + 4;
- /* Save the adjusted stack values in the _TCB */
+ /* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_ptr = (FAR void *)top_of_stack;
tcb->adj_stack_size = size_of_stack;
diff --git a/nuttx/arch/avr/src/avr32/up_dumpstate.c b/nuttx/arch/avr/src/avr32/up_dumpstate.c
index d6113d40b..32db56f0d 100644
--- a/nuttx/arch/avr/src/avr32/up_dumpstate.c
+++ b/nuttx/arch/avr/src/avr32/up_dumpstate.c
@@ -145,8 +145,8 @@ static inline void up_registerdump(void)
void up_dumpstate(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
- uint32_t sp = up_getsp();
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
+ uint32_t sp = up_getsp();
uint32_t ustackbase;
uint32_t ustacksize;
#if CONFIG_ARCH_INTERRUPTSTACK > 3
diff --git a/nuttx/arch/avr/src/avr32/up_initialstate.c b/nuttx/arch/avr/src/avr32/up_initialstate.c
index fe3a79d90..adfc95596 100644
--- a/nuttx/arch/avr/src/avr32/up_initialstate.c
+++ b/nuttx/arch/avr/src/avr32/up_initialstate.c
@@ -77,7 +77,7 @@
*
****************************************************************************/
-void up_initial_state(_TCB *tcb)
+void up_initial_state(struct tcb_s *tcb)
{
struct xcptcontext *xcp = &tcb->xcp;
diff --git a/nuttx/arch/avr/src/avr32/up_releasepending.c b/nuttx/arch/avr/src/avr32/up_releasepending.c
index 3cf29e623..00956e442 100644
--- a/nuttx/arch/avr/src/avr32/up_releasepending.c
+++ b/nuttx/arch/avr/src/avr32/up_releasepending.c
@@ -75,7 +75,7 @@
void up_release_pending(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("From TCB=%p\n", rtcb);
@@ -101,7 +101,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -117,7 +117,7 @@ void up_release_pending(void)
* ready to run list.
*/
- _TCB *nexttcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
/* up_switchcontext forces a context switch to the task at the
diff --git a/nuttx/arch/avr/src/avr32/up_reprioritizertr.c b/nuttx/arch/avr/src/avr32/up_reprioritizertr.c
index 0aad214e8..bc9ba21f0 100644
--- a/nuttx/arch/avr/src/avr32/up_reprioritizertr.c
+++ b/nuttx/arch/avr/src/avr32/up_reprioritizertr.c
@@ -84,7 +84,7 @@
*
****************************************************************************/
-void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
+void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
{
/* Verify that the caller is sane */
@@ -102,7 +102,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
slldbg("TCB=%p PRI=%d\n", tcb, priority);
@@ -156,7 +156,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -172,7 +172,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* ready to run list.
*/
- _TCB *nexttcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
/* up_switchcontext forces a context switch to the task at the
diff --git a/nuttx/arch/avr/src/avr32/up_schedulesigaction.c b/nuttx/arch/avr/src/avr32/up_schedulesigaction.c
index edf145a17..a710672dc 100644
--- a/nuttx/arch/avr/src/avr32/up_schedulesigaction.c
+++ b/nuttx/arch/avr/src/avr32/up_schedulesigaction.c
@@ -101,7 +101,7 @@
*
****************************************************************************/
-void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
+void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
{
/* Refuse to handle nested signal actions */
@@ -121,7 +121,7 @@ void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
sdbg("rtcb=0x%p current_regs=0x%p\n", g_readytorun.head, current_regs);
- if (tcb == (_TCB*)g_readytorun.head)
+ if (tcb == (struct tcb_s*)g_readytorun.head)
{
/* CASE 1: We are not in an interrupt handler and
* a task is signalling itself for some reason.
diff --git a/nuttx/arch/avr/src/avr32/up_sigdeliver.c b/nuttx/arch/avr/src/avr32/up_sigdeliver.c
index 8c1c0b705..d9b466890 100644
--- a/nuttx/arch/avr/src/avr32/up_sigdeliver.c
+++ b/nuttx/arch/avr/src/avr32/up_sigdeliver.c
@@ -81,7 +81,7 @@
void up_sigdeliver(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#if 0
uint32_t regs[XCPTCONTEXT_REGS+3]; /* Why +3? See below */
#else
diff --git a/nuttx/arch/avr/src/avr32/up_unblocktask.c b/nuttx/arch/avr/src/avr32/up_unblocktask.c
index da6b31f83..5ce48e366 100644
--- a/nuttx/arch/avr/src/avr32/up_unblocktask.c
+++ b/nuttx/arch/avr/src/avr32/up_unblocktask.c
@@ -79,7 +79,7 @@
*
****************************************************************************/
-void up_unblock_task(_TCB *tcb)
+void up_unblock_task(struct tcb_s *tcb)
{
/* Verify that the context switch can be performed */
@@ -90,7 +90,7 @@ void up_unblock_task(_TCB *tcb)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
/* Remove the task from the blocked task list */
@@ -128,7 +128,7 @@ void up_unblock_task(_TCB *tcb)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -143,7 +143,7 @@ void up_unblock_task(_TCB *tcb)
* ready to run list.
*/
- _TCB *nexttcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
/* up_switchcontext forces a context switch to the task at the
diff --git a/nuttx/arch/avr/src/avr32/up_usestack.c b/nuttx/arch/avr/src/avr32/up_usestack.c
index e73de3fb0..5afadb922 100644
--- a/nuttx/arch/avr/src/avr32/up_usestack.c
+++ b/nuttx/arch/avr/src/avr32/up_usestack.c
@@ -82,7 +82,7 @@
*
****************************************************************************/
-int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
+int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
{
size_t top_of_stack;
size_t size_of_stack;
@@ -113,7 +113,7 @@ int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
top_of_stack &= ~3;
size_of_stack = top_of_stack - (size_t)tcb->stack_alloc_ptr + 4;
- /* Save the adjusted stack values in the _TCB */
+ /* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_ptr = (FAR void *)top_of_stack;
tcb->adj_stack_size = size_of_stack;
diff --git a/nuttx/arch/avr/src/common/up_assert.c b/nuttx/arch/avr/src/common/up_assert.c
index be7f635e8..2e70a9c28 100644
--- a/nuttx/arch/avr/src/common/up_assert.c
+++ b/nuttx/arch/avr/src/common/up_assert.c
@@ -95,7 +95,7 @@ static void _up_assert(int errorcode)
{
/* Are we in an interrupt handler or the idle task? */
- if (current_regs || ((_TCB*)g_readytorun.head)->pid == 0)
+ if (current_regs || ((struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
for(;;)
@@ -125,7 +125,7 @@ static void _up_assert(int errorcode)
void up_assert(const uint8_t *filename, int lineno)
{
#ifdef CONFIG_PRINT_TASKNAME
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
@@ -147,7 +147,7 @@ void up_assert(const uint8_t *filename, int lineno)
void up_assert_code(const uint8_t *filename, int lineno, int errorcode)
{
#ifdef CONFIG_PRINT_TASKNAME
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
diff --git a/nuttx/arch/avr/src/common/up_exit.c b/nuttx/arch/avr/src/common/up_exit.c
index 68e33fde7..3b316123b 100644
--- a/nuttx/arch/avr/src/common/up_exit.c
+++ b/nuttx/arch/avr/src/common/up_exit.c
@@ -73,7 +73,7 @@
****************************************************************************/
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
-static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
+static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
@@ -136,7 +136,7 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
void _exit(int status)
{
- _TCB* tcb;
+ struct tcb_s* tcb;
/* Disable interrupts. They will be restored when the next
* task is started.
@@ -159,7 +159,7 @@ void _exit(int status)
* head of the list.
*/
- tcb = (_TCB*)g_readytorun.head;
+ tcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
diff --git a/nuttx/arch/avr/src/common/up_releasestack.c b/nuttx/arch/avr/src/common/up_releasestack.c
index 2cf3c30e8..98b1faea1 100644
--- a/nuttx/arch/avr/src/common/up_releasestack.c
+++ b/nuttx/arch/avr/src/common/up_releasestack.c
@@ -67,7 +67,7 @@
*
****************************************************************************/
-void up_release_stack(_TCB *dtcb)
+void up_release_stack(struct tcb_s *dtcb)
{
if (dtcb->stack_alloc_ptr)
{
diff --git a/nuttx/arch/hc/src/common/up_blocktask.c b/nuttx/arch/hc/src/common/up_blocktask.c
index 4e5bf1826..da7131c4c 100644
--- a/nuttx/arch/hc/src/common/up_blocktask.c
+++ b/nuttx/arch/hc/src/common/up_blocktask.c
@@ -84,7 +84,7 @@
*
****************************************************************************/
-void up_block_task(_TCB *tcb, tstate_t task_state)
+void up_block_task(struct tcb_s *tcb, tstate_t task_state)
{
/* Verify that the context switch can be performed */
@@ -95,7 +95,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* Remove the tcb task from the ready-to-run list. If we
@@ -138,7 +138,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -156,7 +156,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
diff --git a/nuttx/arch/hc/src/common/up_createstack.c b/nuttx/arch/hc/src/common/up_createstack.c
index ef0a9df9c..8c29190ae 100644
--- a/nuttx/arch/hc/src/common/up_createstack.c
+++ b/nuttx/arch/hc/src/common/up_createstack.c
@@ -83,7 +83,7 @@
*
****************************************************************************/
-int up_create_stack(_TCB *tcb, size_t stack_size)
+int up_create_stack(struct tcb_s *tcb, size_t stack_size)
{
if (tcb->stack_alloc_ptr && tcb->adj_stack_size != stack_size)
{
@@ -118,7 +118,7 @@ int up_create_stack(_TCB *tcb, size_t stack_size)
top_of_stack &= ~1;
size_of_stack = top_of_stack - (size_t)tcb->stack_alloc_ptr;
- /* Save the adjusted stack values in the _TCB */
+ /* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack;
diff --git a/nuttx/arch/hc/src/common/up_exit.c b/nuttx/arch/hc/src/common/up_exit.c
index 1c46875f8..9fad697f1 100644
--- a/nuttx/arch/hc/src/common/up_exit.c
+++ b/nuttx/arch/hc/src/common/up_exit.c
@@ -73,7 +73,7 @@
****************************************************************************/
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
-static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
+static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
@@ -136,7 +136,7 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
void _exit(int status)
{
- _TCB* tcb;
+ struct tcb_s* tcb;
/* Disable interrupts. They will be restored when the next
* task is started.
@@ -159,7 +159,7 @@ void _exit(int status)
* head of the list.
*/
- tcb = (_TCB*)g_readytorun.head;
+ tcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
diff --git a/nuttx/arch/hc/src/common/up_releasepending.c b/nuttx/arch/hc/src/common/up_releasepending.c
index 0c09cb0c6..b8da18d60 100644
--- a/nuttx/arch/hc/src/common/up_releasepending.c
+++ b/nuttx/arch/hc/src/common/up_releasepending.c
@@ -74,7 +74,7 @@
void up_release_pending(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("From TCB=%p\n", rtcb);
@@ -100,7 +100,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -120,7 +120,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
diff --git a/nuttx/arch/hc/src/common/up_releasestack.c b/nuttx/arch/hc/src/common/up_releasestack.c
index d3d917fc3..3d8b61176 100644
--- a/nuttx/arch/hc/src/common/up_releasestack.c
+++ b/nuttx/arch/hc/src/common/up_releasestack.c
@@ -68,7 +68,7 @@
*
****************************************************************************/
-void up_release_stack(_TCB *dtcb)
+void up_release_stack(struct tcb_s *dtcb)
{
if (dtcb->stack_alloc_ptr)
{
diff --git a/nuttx/arch/hc/src/common/up_reprioritizertr.c b/nuttx/arch/hc/src/common/up_reprioritizertr.c
index 31c76a9f5..92e18ff47 100644
--- a/nuttx/arch/hc/src/common/up_reprioritizertr.c
+++ b/nuttx/arch/hc/src/common/up_reprioritizertr.c
@@ -84,7 +84,7 @@
*
****************************************************************************/
-void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
+void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
{
/* Verify that the caller is sane */
@@ -102,7 +102,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
slldbg("TCB=%p PRI=%d\n", tcb, priority);
@@ -156,7 +156,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -175,7 +175,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
diff --git a/nuttx/arch/hc/src/common/up_unblocktask.c b/nuttx/arch/hc/src/common/up_unblocktask.c
index 9518da774..7d5f67a1b 100644
--- a/nuttx/arch/hc/src/common/up_unblocktask.c
+++ b/nuttx/arch/hc/src/common/up_unblocktask.c
@@ -79,7 +79,7 @@
*
****************************************************************************/
-void up_unblock_task(_TCB *tcb)
+void up_unblock_task(struct tcb_s *tcb)
{
/* Verify that the context switch can be performed */
@@ -90,7 +90,7 @@ void up_unblock_task(_TCB *tcb)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
/* Remove the task from the blocked task list */
@@ -128,7 +128,7 @@ void up_unblock_task(_TCB *tcb)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -148,7 +148,7 @@ void up_unblock_task(_TCB *tcb)
* g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
diff --git a/nuttx/arch/hc/src/common/up_usestack.c b/nuttx/arch/hc/src/common/up_usestack.c
index b0349b21b..53a571ed4 100644
--- a/nuttx/arch/hc/src/common/up_usestack.c
+++ b/nuttx/arch/hc/src/common/up_usestack.c
@@ -80,7 +80,7 @@
*
****************************************************************************/
-int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
+int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
{
size_t top_of_stack;
size_t size_of_stack;
@@ -112,7 +112,7 @@ int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
top_of_stack &= ~1;
size_of_stack = top_of_stack - (size_t)tcb->stack_alloc_ptr;
- /* Save the adjusted stack values in the _TCB */
+ /* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack;
diff --git a/nuttx/arch/hc/src/m9s12/m9s12_assert.c b/nuttx/arch/hc/src/m9s12/m9s12_assert.c
index 37ad5e30d..62ad33d2d 100644
--- a/nuttx/arch/hc/src/m9s12/m9s12_assert.c
+++ b/nuttx/arch/hc/src/m9s12/m9s12_assert.c
@@ -156,8 +156,8 @@ static inline void up_registerdump(void)
#ifdef CONFIG_ARCH_STACKDUMP
static void up_dumpstate(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
- uint16_t sp = up_getsp();
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
+ uint16_t sp = up_getsp();
uint16_t ustackbase;
uint16_t ustacksize;
#if CONFIG_ARCH_INTERRUPTSTACK > 3
@@ -252,7 +252,7 @@ static void _up_assert(int errorcode)
{
/* Are we in an interrupt handler or the idle task? */
- if (current_regs || ((_TCB*)g_readytorun.head)->pid == 0)
+ if (current_regs || ((struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
for(;;)
@@ -282,7 +282,7 @@ static void _up_assert(int errorcode)
void up_assert(const uint8_t *filename, int lineno)
{
#ifdef CONFIG_PRINT_TASKNAME
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
@@ -304,7 +304,7 @@ void up_assert(const uint8_t *filename, int lineno)
void up_assert_code(const uint8_t *filename, int lineno, int errorcode)
{
#ifdef CONFIG_PRINT_TASKNAME
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
diff --git a/nuttx/arch/hc/src/m9s12/m9s12_initialstate.c b/nuttx/arch/hc/src/m9s12/m9s12_initialstate.c
index 80bb5fe03..3259cbb9a 100644
--- a/nuttx/arch/hc/src/m9s12/m9s12_initialstate.c
+++ b/nuttx/arch/hc/src/m9s12/m9s12_initialstate.c
@@ -76,7 +76,7 @@
*
****************************************************************************/
-void up_initial_state(_TCB *tcb)
+void up_initial_state(struct tcb_s *tcb)
{
struct xcptcontext *xcp = &tcb->xcp;
diff --git a/nuttx/arch/mips/src/common/up_createstack.c b/nuttx/arch/mips/src/common/up_createstack.c
index d5c285e25..722c1a35e 100644
--- a/nuttx/arch/mips/src/common/up_createstack.c
+++ b/nuttx/arch/mips/src/common/up_createstack.c
@@ -84,7 +84,7 @@
* must be allocated.
****************************************************************************/
-int up_create_stack(_TCB *tcb, size_t stack_size)
+int up_create_stack(struct tcb_s *tcb, size_t stack_size)
{
if (tcb->stack_alloc_ptr &&
tcb->adj_stack_size != stack_size)
@@ -124,7 +124,7 @@ int up_create_stack(_TCB *tcb, size_t stack_size)
top_of_stack &= ~3;
size_of_stack = top_of_stack - (uint32_t)tcb->stack_alloc_ptr + 4;
- /* Save the adjusted stack values in the _TCB */
+ /* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack;
diff --git a/nuttx/arch/mips/src/common/up_exit.c b/nuttx/arch/mips/src/common/up_exit.c
index e112364b4..a5746f8aa 100644
--- a/nuttx/arch/mips/src/common/up_exit.c
+++ b/nuttx/arch/mips/src/common/up_exit.c
@@ -75,7 +75,7 @@
****************************************************************************/
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
-static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
+static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
@@ -138,7 +138,7 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
void _exit(int status)
{
- _TCB* tcb;
+ struct tcb_s* tcb;
/* Disable interrupts. They will be restored when the next
* task is started.
@@ -161,7 +161,7 @@ void _exit(int status)
* head of the list.
*/
- tcb = (_TCB*)g_readytorun.head;
+ tcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
diff --git a/nuttx/arch/mips/src/common/up_releasestack.c b/nuttx/arch/mips/src/common/up_releasestack.c
index a54ea70cd..7cbeb86e7 100644
--- a/nuttx/arch/mips/src/common/up_releasestack.c
+++ b/nuttx/arch/mips/src/common/up_releasestack.c
@@ -67,7 +67,7 @@
*
****************************************************************************/
-void up_release_stack(_TCB *dtcb)
+void up_release_stack(struct tcb_s *dtcb)
{
if (dtcb->stack_alloc_ptr)
{
diff --git a/nuttx/arch/mips/src/common/up_usestack.c b/nuttx/arch/mips/src/common/up_usestack.c
index e41608f67..6fa521579 100644
--- a/nuttx/arch/mips/src/common/up_usestack.c
+++ b/nuttx/arch/mips/src/common/up_usestack.c
@@ -82,7 +82,7 @@
*
****************************************************************************/
-int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
+int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
{
size_t top_of_stack;
size_t size_of_stack;
@@ -113,7 +113,7 @@ int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
top_of_stack &= ~3;
size_of_stack = top_of_stack - (uint32_t)tcb->stack_alloc_ptr + 4;
- /* Save the adjusted stack values in the _TCB */
+ /* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack;
diff --git a/nuttx/arch/mips/src/mips32/up_assert.c b/nuttx/arch/mips/src/mips32/up_assert.c
index f27bc0ebe..9f503ac85 100644
--- a/nuttx/arch/mips/src/mips32/up_assert.c
+++ b/nuttx/arch/mips/src/mips32/up_assert.c
@@ -95,7 +95,7 @@ static void _up_assert(int errorcode)
{
/* Are we in an interrupt handler or the idle task? */
- if (current_regs || ((_TCB*)g_readytorun.head)->pid == 0)
+ if (current_regs || ((struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
for(;;)
@@ -125,7 +125,7 @@ static void _up_assert(int errorcode)
void up_assert(const uint8_t *filename, int lineno)
{
#ifdef CONFIG_PRINT_TASKNAME
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
@@ -147,7 +147,7 @@ void up_assert(const uint8_t *filename, int lineno)
void up_assert_code(const uint8_t *filename, int lineno, int errorcode)
{
#ifdef CONFIG_PRINT_TASKNAME
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
diff --git a/nuttx/arch/mips/src/mips32/up_blocktask.c b/nuttx/arch/mips/src/mips32/up_blocktask.c
index 47fd4024b..8d209da9f 100644
--- a/nuttx/arch/mips/src/mips32/up_blocktask.c
+++ b/nuttx/arch/mips/src/mips32/up_blocktask.c
@@ -85,7 +85,7 @@
*
****************************************************************************/
-void up_block_task(_TCB *tcb, tstate_t task_state)
+void up_block_task(struct tcb_s *tcb, tstate_t task_state)
{
/* Verify that the context switch can be performed */
@@ -96,7 +96,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* Remove the tcb task from the ready-to-run list. If we
@@ -139,7 +139,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -154,7 +154,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* ready to run list.
*/
- _TCB *nexttcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
/* up_switchcontext forces a context switch to the task at the
diff --git a/nuttx/arch/mips/src/mips32/up_dumpstate.c b/nuttx/arch/mips/src/mips32/up_dumpstate.c
index 1cd426767..064aa0681 100644
--- a/nuttx/arch/mips/src/mips32/up_dumpstate.c
+++ b/nuttx/arch/mips/src/mips32/up_dumpstate.c
@@ -154,8 +154,8 @@ static inline void up_registerdump(void)
void up_dumpstate(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
- uint32_t sp = up_getsp();
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
+ uint32_t sp = up_getsp();
uint32_t ustackbase;
uint32_t ustacksize;
#if CONFIG_ARCH_INTERRUPTSTACK > 3
diff --git a/nuttx/arch/mips/src/mips32/up_initialstate.c b/nuttx/arch/mips/src/mips32/up_initialstate.c
index 0c24d1ee0..a4d204b30 100644
--- a/nuttx/arch/mips/src/mips32/up_initialstate.c
+++ b/nuttx/arch/mips/src/mips32/up_initialstate.c
@@ -80,7 +80,7 @@
*
****************************************************************************/
-void up_initial_state(_TCB *tcb)
+void up_initial_state(struct tcb_s *tcb)
{
struct xcptcontext *xcp = &tcb->xcp;
uint32_t regval;
diff --git a/nuttx/arch/mips/src/mips32/up_releasepending.c b/nuttx/arch/mips/src/mips32/up_releasepending.c
index 13918ca21..7999bffeb 100644
--- a/nuttx/arch/mips/src/mips32/up_releasepending.c
+++ b/nuttx/arch/mips/src/mips32/up_releasepending.c
@@ -77,7 +77,7 @@
void up_release_pending(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("From TCB=%p\n", rtcb);
@@ -103,7 +103,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -119,7 +119,7 @@ void up_release_pending(void)
* ready to run list.
*/
- _TCB *nexttcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
/* up_switchcontext forces a context switch to the task at the
diff --git a/nuttx/arch/mips/src/mips32/up_reprioritizertr.c b/nuttx/arch/mips/src/mips32/up_reprioritizertr.c
index 2e5f41d68..f4034cc1e 100644
--- a/nuttx/arch/mips/src/mips32/up_reprioritizertr.c
+++ b/nuttx/arch/mips/src/mips32/up_reprioritizertr.c
@@ -86,7 +86,7 @@
*
****************************************************************************/
-void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
+void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
{
/* Verify that the caller is sane */
@@ -104,7 +104,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
slldbg("TCB=%p PRI=%d\n", tcb, priority);
@@ -158,7 +158,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -174,7 +174,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* ready to run list.
*/
- _TCB *nexttcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
/* up_switchcontext forces a context switch to the task at the
diff --git a/nuttx/arch/mips/src/mips32/up_schedulesigaction.c b/nuttx/arch/mips/src/mips32/up_schedulesigaction.c
index f81fd890a..1ab8c2b56 100644
--- a/nuttx/arch/mips/src/mips32/up_schedulesigaction.c
+++ b/nuttx/arch/mips/src/mips32/up_schedulesigaction.c
@@ -101,7 +101,7 @@
*
****************************************************************************/
-void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
+void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
{
uint32_t status;
@@ -123,7 +123,7 @@ void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
sdbg("rtcb=0x%p current_regs=0x%p\n", g_readytorun.head, current_regs);
- if (tcb == (_TCB*)g_readytorun.head)
+ if (tcb == (struct tcb_s*)g_readytorun.head)
{
/* CASE 1: We are not in an interrupt handler and
* a task is signalling itself for some reason.
diff --git a/nuttx/arch/mips/src/mips32/up_sigdeliver.c b/nuttx/arch/mips/src/mips32/up_sigdeliver.c
index 8009b369c..0abc270d3 100644
--- a/nuttx/arch/mips/src/mips32/up_sigdeliver.c
+++ b/nuttx/arch/mips/src/mips32/up_sigdeliver.c
@@ -82,7 +82,7 @@
void up_sigdeliver(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
uint32_t regs[XCPTCONTEXT_REGS];
sig_deliver_t sigdeliver;
diff --git a/nuttx/arch/mips/src/mips32/up_swint0.c b/nuttx/arch/mips/src/mips32/up_swint0.c
index 87ccddf71..fc03de58b 100644
--- a/nuttx/arch/mips/src/mips32/up_swint0.c
+++ b/nuttx/arch/mips/src/mips32/up_swint0.c
@@ -139,9 +139,9 @@ static void up_registerdump(const uint32_t *regs)
#ifdef CONFIG_NUTTX_KERNEL
static inline void dispatch_syscall(uint32_t *regs)
{
- uint32_t cmd = regs[REG_A0];
- FAR _TCB *rtcb = sched_self();
- uintptr_t ret = (uintptr_t)ERROR;
+ uint32_t cmd = regs[REG_A0];
+ FAR struct tcb_s *rtcb = sched_self();
+ uintptr_t ret = (uintptr_t)ERROR;
/* Verify the the SYS call number is within range */
diff --git a/nuttx/arch/mips/src/mips32/up_unblocktask.c b/nuttx/arch/mips/src/mips32/up_unblocktask.c
index 5dafe90f0..70a5a7241 100644
--- a/nuttx/arch/mips/src/mips32/up_unblocktask.c
+++ b/nuttx/arch/mips/src/mips32/up_unblocktask.c
@@ -81,7 +81,7 @@
*
****************************************************************************/
-void up_unblock_task(_TCB *tcb)
+void up_unblock_task(struct tcb_s *tcb)
{
/* Verify that the context switch can be performed */
@@ -92,7 +92,7 @@ void up_unblock_task(_TCB *tcb)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
/* Remove the task from the blocked task list */
@@ -130,7 +130,7 @@ void up_unblock_task(_TCB *tcb)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -145,7 +145,7 @@ void up_unblock_task(_TCB *tcb)
* ready to run list.
*/
- _TCB *nexttcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
/* up_switchcontext forces a context switch to the task at the
diff --git a/nuttx/arch/mips/src/mips32/up_vfork.c b/nuttx/arch/mips/src/mips32/up_vfork.c
index 6b7e27f31..58e20f42d 100644
--- a/nuttx/arch/mips/src/mips32/up_vfork.c
+++ b/nuttx/arch/mips/src/mips32/up_vfork.c
@@ -113,8 +113,8 @@
pid_t up_vfork(const struct vfork_s *context)
{
- _TCB *parent = (FAR _TCB *)g_readytorun.head;
- _TCB *child;
+ struct tcb_s *parent = (FAR struct tcb_s *)g_readytorun.head;
+ struct tcb_s *child;
size_t stacksize;
uint32_t newsp;
#if CONFIG_MIPS32_FRAMEPOINTER
diff --git a/nuttx/arch/rgmp/include/arch.h b/nuttx/arch/rgmp/include/arch.h
index 32eb16ee3..af99356ea 100644
--- a/nuttx/arch/rgmp/include/arch.h
+++ b/nuttx/arch/rgmp/include/arch.h
@@ -48,10 +48,10 @@
struct up_wait {
struct up_wait *next;
- _TCB *task;
+ struct tcb_s *task;
};
-extern _TCB *current_task;
+extern struct tcb_s *current_task;
void up_sigentry(void);
diff --git a/nuttx/arch/rgmp/src/arm/arch_nuttx.c b/nuttx/arch/rgmp/src/arm/arch_nuttx.c
index cb946bfd1..e916c5520 100644
--- a/nuttx/arch/rgmp/src/arm/arch_nuttx.c
+++ b/nuttx/arch/rgmp/src/arm/arch_nuttx.c
@@ -55,7 +55,7 @@ void nuttx_arch_exit(void)
}
-void up_initial_state(_TCB *tcb)
+void up_initial_state(struct tcb_s *tcb)
{
struct Trapframe *tf;
diff --git a/nuttx/arch/rgmp/src/nuttx.c b/nuttx/arch/rgmp/src/nuttx.c
index 7deb959a2..6cb300f82 100644
--- a/nuttx/arch/rgmp/src/nuttx.c
+++ b/nuttx/arch/rgmp/src/nuttx.c
@@ -54,7 +54,7 @@
#include
#include
-_TCB *current_task = NULL;
+struct tcb_s *current_task = NULL;
/**
@@ -62,7 +62,7 @@ _TCB *current_task = NULL;
* to switch tasks.
* Assumption: global interrupt is disabled.
*/
-static inline void up_switchcontext(_TCB *ctcb, _TCB *ntcb)
+static inline void up_switchcontext(struct tcb_s *ctcb, struct tcb_s *ntcb)
{
// do nothing if two tasks are the same
if (ctcb == ntcb)
@@ -111,7 +111,7 @@ void up_allocate_heap(void **heap_start, size_t *heap_size)
*heap_size = KERNBASE + kmem_size - (uint32_t)boot_freemem;
}
-int up_create_stack(_TCB *tcb, size_t stack_size)
+int up_create_stack(struct tcb_s *tcb, size_t stack_size)
{
int ret = ERROR;
size_t *adj_stack_ptr;
@@ -139,7 +139,7 @@ int up_create_stack(_TCB *tcb, size_t stack_size)
return ret;
}
-int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
+int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
{
/* Move up to next even word boundary if necessary */
@@ -158,7 +158,7 @@ int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
return OK;
}
-void up_release_stack(_TCB *dtcb)
+void up_release_stack(struct tcb_s *dtcb)
{
if (dtcb->stack_alloc_ptr) {
free(dtcb->stack_alloc_ptr);
@@ -192,7 +192,7 @@ void up_release_stack(_TCB *dtcb)
* hold the blocked task TCB.
*
****************************************************************************/
-void up_block_task(_TCB *tcb, tstate_t task_state)
+void up_block_task(struct tcb_s *tcb, tstate_t task_state)
{
/* Verify that the context switch can be performed */
if ((tcb->task_state < FIRST_READY_TO_RUN_STATE) ||
@@ -201,7 +201,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
return;
}
else {
- _TCB *rtcb = current_task;
+ struct tcb_s *rtcb = current_task;
bool switch_needed;
/* Remove the tcb task from the ready-to-run list. If we
@@ -217,7 +217,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
/* Now, perform the context switch if one is needed */
if (switch_needed) {
- _TCB *nexttcb;
+ struct tcb_s *nexttcb;
// this part should not be executed in interrupt context
if (up_interrupt_context()) {
panic("%s: %d\n", __func__, __LINE__);
@@ -230,7 +230,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
warn("Disable preemption failed for task block itself\n");
sched_mergepending();
}
- nexttcb = (_TCB*)g_readytorun.head;
+ nexttcb = (struct tcb_s*)g_readytorun.head;
// context switch
up_switchcontext(rtcb, nexttcb);
}
@@ -252,7 +252,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* ready to run taks, executed.
*
****************************************************************************/
-void up_unblock_task(_TCB *tcb)
+void up_unblock_task(struct tcb_s *tcb)
{
/* Verify that the context switch can be performed */
if ((tcb->task_state < FIRST_BLOCKED_STATE) ||
@@ -261,7 +261,7 @@ void up_unblock_task(_TCB *tcb)
return;
}
else {
- _TCB *rtcb = current_task;
+ struct tcb_s *rtcb = current_task;
/* Remove the task from the blocked task list */
sched_removeblocked(tcb);
@@ -277,7 +277,7 @@ void up_unblock_task(_TCB *tcb)
// g_readytorun task list.
if (sched_addreadytorun(tcb) && !up_interrupt_context()) {
/* The currently active task has changed! */
- _TCB *nexttcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
// context switch
up_switchcontext(rtcb, nexttcb);
}
@@ -290,20 +290,20 @@ void up_unblock_task(_TCB *tcb)
*/
void up_release_pending(void)
{
- _TCB *rtcb = current_task;
+ struct tcb_s *rtcb = current_task;
/* Merge the g_pendingtasks list into the g_readytorun task list */
if (sched_mergepending()) {
/* The currently active task has changed! */
- _TCB *nexttcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
// context switch
up_switchcontext(rtcb, nexttcb);
}
}
-void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
+void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
{
/* Verify that the caller is sane */
@@ -320,7 +320,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
return;
}
else {
- _TCB *rtcb = current_task;
+ struct tcb_s *rtcb = current_task;
bool switch_needed;
/* Remove the tcb task from the ready-to-run list.
@@ -343,7 +343,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
/* Now, perform the context switch if one is needed */
if (switch_needed && !up_interrupt_context()) {
- _TCB *nexttcb;
+ struct tcb_s *nexttcb;
// If there are any pending tasks, then add them to the g_readytorun
// task list now. It should be the up_realease_pending() called from
// sched_unlock() to do this for disable preemption. But it block
@@ -353,7 +353,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
sched_mergepending();
}
- nexttcb = (_TCB*)g_readytorun.head;
+ nexttcb = (struct tcb_s*)g_readytorun.head;
// context switch
up_switchcontext(rtcb, nexttcb);
}
@@ -362,7 +362,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
void _exit(int status)
{
- _TCB* tcb;
+ struct tcb_s* tcb;
/* Destroy the task at the head of the ready to run list. */
@@ -372,7 +372,7 @@ void _exit(int status)
* head of the list.
*/
- tcb = (_TCB*)g_readytorun.head;
+ tcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -413,7 +413,7 @@ void up_assert_code(const uint8_t *filename, int line, int code)
#ifndef CONFIG_DISABLE_SIGNALS
-void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
+void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
{
/* Refuse to handle nested signal actions */
if (!tcb->xcp.sigdeliver) {
diff --git a/nuttx/arch/rgmp/src/rgmp.c b/nuttx/arch/rgmp/src/rgmp.c
index 479696fb5..db5dd955e 100644
--- a/nuttx/arch/rgmp/src/rgmp.c
+++ b/nuttx/arch/rgmp/src/rgmp.c
@@ -101,14 +101,14 @@ void rtos_exit_interrupt(void)
local_irq_disable();
nest_irq--;
if (!nest_irq) {
- _TCB *rtcb = current_task;
- _TCB *ntcb;
+ struct tcb_s *rtcb = current_task;
+ struct tcb_s *ntcb;
if (rtcb->xcp.sigdeliver) {
rtcb->xcp.ctx.tf = current_regs;
push_xcptcontext(&rtcb->xcp);
}
- ntcb = (_TCB*)g_readytorun.head;
+ ntcb = (struct tcb_s*)g_readytorun.head;
// switch needed
if (rtcb != ntcb) {
rtcb->xcp.ctx.tf = current_regs;
diff --git a/nuttx/arch/rgmp/src/x86/arch_nuttx.c b/nuttx/arch/rgmp/src/x86/arch_nuttx.c
index 04b8fa8c8..c691784d9 100644
--- a/nuttx/arch/rgmp/src/x86/arch_nuttx.c
+++ b/nuttx/arch/rgmp/src/x86/arch_nuttx.c
@@ -71,7 +71,7 @@ void nuttx_arch_exit(void)
}
-void up_initial_state(_TCB *tcb)
+void up_initial_state(struct tcb_s *tcb)
{
struct Trapframe *tf;
diff --git a/nuttx/arch/sh/src/common/up_assert.c b/nuttx/arch/sh/src/common/up_assert.c
index 62889fa5a..72880fd2a 100644
--- a/nuttx/arch/sh/src/common/up_assert.c
+++ b/nuttx/arch/sh/src/common/up_assert.c
@@ -81,7 +81,7 @@ static void _up_assert(int errorcode)
{
/* Are we in an interrupt handler or the idle task? */
- if (current_regs || ((_TCB*)g_readytorun.head)->pid == 0)
+ if (current_regs || ((struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
for(;;)
@@ -111,7 +111,7 @@ static void _up_assert(int errorcode)
void up_assert(const uint8_t *filename, int lineno)
{
#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG)
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
@@ -133,7 +133,7 @@ void up_assert(const uint8_t *filename, int lineno)
void up_assert_code(const uint8_t *filename, int lineno, int errorcode)
{
#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG)
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
diff --git a/nuttx/arch/sh/src/common/up_blocktask.c b/nuttx/arch/sh/src/common/up_blocktask.c
index 0a53b6633..db7f0297c 100644
--- a/nuttx/arch/sh/src/common/up_blocktask.c
+++ b/nuttx/arch/sh/src/common/up_blocktask.c
@@ -83,7 +83,7 @@
*
****************************************************************************/
-void up_block_task(_TCB *tcb, tstate_t task_state)
+void up_block_task(struct tcb_s *tcb, tstate_t task_state)
{
/* Verify that the context switch can be performed */
@@ -94,7 +94,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* Remove the tcb task from the ready-to-run list. If we
@@ -137,7 +137,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -155,7 +155,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
diff --git a/nuttx/arch/sh/src/common/up_createstack.c b/nuttx/arch/sh/src/common/up_createstack.c
index f80e4f7c0..f868750de 100644
--- a/nuttx/arch/sh/src/common/up_createstack.c
+++ b/nuttx/arch/sh/src/common/up_createstack.c
@@ -83,7 +83,7 @@
* must be allocated.
****************************************************************************/
-int up_create_stack(_TCB *tcb, size_t stack_size)
+int up_create_stack(struct tcb_s *tcb, size_t stack_size)
{
if (tcb->stack_alloc_ptr &&
tcb->adj_stack_size != stack_size)
@@ -119,7 +119,7 @@ int up_create_stack(_TCB *tcb, size_t stack_size)
top_of_stack &= ~3;
size_of_stack = top_of_stack - (uint32_t)tcb->stack_alloc_ptr + 4;
- /* Save the adjusted stack values in the _TCB */
+ /* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack;
diff --git a/nuttx/arch/sh/src/common/up_exit.c b/nuttx/arch/sh/src/common/up_exit.c
index 705f49852..31c8e0404 100644
--- a/nuttx/arch/sh/src/common/up_exit.c
+++ b/nuttx/arch/sh/src/common/up_exit.c
@@ -74,7 +74,7 @@
****************************************************************************/
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
-static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
+static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
@@ -137,7 +137,7 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
void _exit(int status)
{
- _TCB* tcb;
+ struct tcb_s* tcb;
/* Disable interrupts. They will be restored when the next
* task is started.
@@ -160,7 +160,7 @@ void _exit(int status)
* head of the list.
*/
- tcb = (_TCB*)g_readytorun.head;
+ tcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
diff --git a/nuttx/arch/sh/src/common/up_releasepending.c b/nuttx/arch/sh/src/common/up_releasepending.c
index 955febea1..b3960972d 100644
--- a/nuttx/arch/sh/src/common/up_releasepending.c
+++ b/nuttx/arch/sh/src/common/up_releasepending.c
@@ -75,7 +75,7 @@
void up_release_pending(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("From TCB=%p\n", rtcb);
@@ -101,7 +101,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -121,7 +121,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
diff --git a/nuttx/arch/sh/src/common/up_releasestack.c b/nuttx/arch/sh/src/common/up_releasestack.c
index bb6739433..3b4e4c914 100644
--- a/nuttx/arch/sh/src/common/up_releasestack.c
+++ b/nuttx/arch/sh/src/common/up_releasestack.c
@@ -67,7 +67,7 @@
*
****************************************************************************/
-void up_release_stack(_TCB *dtcb)
+void up_release_stack(struct tcb_s *dtcb)
{
if (dtcb->stack_alloc_ptr)
{
diff --git a/nuttx/arch/sh/src/common/up_reprioritizertr.c b/nuttx/arch/sh/src/common/up_reprioritizertr.c
index 99d350b29..dcf0fcd7b 100644
--- a/nuttx/arch/sh/src/common/up_reprioritizertr.c
+++ b/nuttx/arch/sh/src/common/up_reprioritizertr.c
@@ -84,7 +84,7 @@
*
****************************************************************************/
-void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
+void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
{
/* Verify that the caller is sane */
@@ -102,7 +102,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
slldbg("TCB=%p PRI=%d\n", tcb, priority);
@@ -156,7 +156,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -175,7 +175,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
diff --git a/nuttx/arch/sh/src/common/up_unblocktask.c b/nuttx/arch/sh/src/common/up_unblocktask.c
index 5841f50ad..b7c88f823 100644
--- a/nuttx/arch/sh/src/common/up_unblocktask.c
+++ b/nuttx/arch/sh/src/common/up_unblocktask.c
@@ -79,7 +79,7 @@
*
****************************************************************************/
-void up_unblock_task(_TCB *tcb)
+void up_unblock_task(struct tcb_s *tcb)
{
/* Verify that the context switch can be performed */
@@ -90,7 +90,7 @@ void up_unblock_task(_TCB *tcb)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
/* Remove the task from the blocked task list */
@@ -128,7 +128,7 @@ void up_unblock_task(_TCB *tcb)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -148,7 +148,7 @@ void up_unblock_task(_TCB *tcb)
* g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
diff --git a/nuttx/arch/sh/src/common/up_usestack.c b/nuttx/arch/sh/src/common/up_usestack.c
index 41367ce0b..ee26cb70c 100644
--- a/nuttx/arch/sh/src/common/up_usestack.c
+++ b/nuttx/arch/sh/src/common/up_usestack.c
@@ -82,7 +82,7 @@
*
****************************************************************************/
-int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
+int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
{
size_t top_of_stack;
size_t size_of_stack;
@@ -113,7 +113,7 @@ int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
top_of_stack &= ~3;
size_of_stack = top_of_stack - (uint32_t)tcb->stack_alloc_ptr + 4;
- /* Save the adjusted stack values in the _TCB */
+ /* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_size = top_of_stack;
tcb->adj_stack_size = size_of_stack;
diff --git a/nuttx/arch/sh/src/m16c/m16c_dumpstate.c b/nuttx/arch/sh/src/m16c/m16c_dumpstate.c
index 38571a7e1..3570a9ebe 100644
--- a/nuttx/arch/sh/src/m16c/m16c_dumpstate.c
+++ b/nuttx/arch/sh/src/m16c/m16c_dumpstate.c
@@ -158,8 +158,8 @@ static inline void m16c_registerdump(void)
void up_dumpstate(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
- uint16_t sp = m16c_getsp();
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
+ uint16_t sp = m16c_getsp();
uint16_t ustackbase;
uint16_t ustacksize;
#if CONFIG_ARCH_INTERRUPTSTACK > 3
diff --git a/nuttx/arch/sh/src/m16c/m16c_initialstate.c b/nuttx/arch/sh/src/m16c/m16c_initialstate.c
index f667cf557..ee22d5497 100644
--- a/nuttx/arch/sh/src/m16c/m16c_initialstate.c
+++ b/nuttx/arch/sh/src/m16c/m16c_initialstate.c
@@ -77,7 +77,7 @@
*
****************************************************************************/
-void up_initial_state(FAR _TCB *tcb)
+void up_initial_state(FAR struct tcb_s *tcb)
{
FAR struct xcptcontext *xcp = &tcb->xcp;
FAR uint8_t *regs = xcp->regs;
diff --git a/nuttx/arch/sh/src/m16c/m16c_schedulesigaction.c b/nuttx/arch/sh/src/m16c/m16c_schedulesigaction.c
index 0dc33568d..d7af7e477 100644
--- a/nuttx/arch/sh/src/m16c/m16c_schedulesigaction.c
+++ b/nuttx/arch/sh/src/m16c/m16c_schedulesigaction.c
@@ -100,7 +100,7 @@
*
****************************************************************************/
-void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
+void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
{
/* Refuse to handle nested signal actions */
@@ -120,7 +120,7 @@ void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
sdbg("rtcb=0x%p current_regs=0x%p\n", g_readytorun.head, current_regs);
- if (tcb == (_TCB*)g_readytorun.head)
+ if (tcb == (struct tcb_s*)g_readytorun.head)
{
/* CASE 1: We are not in an interrupt handler and
* a task is signalling itself for some reason.
diff --git a/nuttx/arch/sh/src/m16c/m16c_sigdeliver.c b/nuttx/arch/sh/src/m16c/m16c_sigdeliver.c
index 958ff56af..7bba3b902 100644
--- a/nuttx/arch/sh/src/m16c/m16c_sigdeliver.c
+++ b/nuttx/arch/sh/src/m16c/m16c_sigdeliver.c
@@ -81,7 +81,7 @@
void up_sigdeliver(void)
{
#ifndef CONFIG_DISABLE_SIGNALS
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
uint8_t regs[XCPTCONTEXT_SIZE];
sig_deliver_t sigdeliver;
diff --git a/nuttx/arch/sh/src/sh1/sh1_dumpstate.c b/nuttx/arch/sh/src/sh1/sh1_dumpstate.c
index f54ea46ce..3d101c92d 100644
--- a/nuttx/arch/sh/src/sh1/sh1_dumpstate.c
+++ b/nuttx/arch/sh/src/sh1/sh1_dumpstate.c
@@ -147,7 +147,7 @@ static inline void sh1_registerdump(void)
void up_dumpstate(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
uint32_t sp = sh1_getsp();
uint32_t ustackbase;
uint32_t ustacksize;
diff --git a/nuttx/arch/sh/src/sh1/sh1_initialstate.c b/nuttx/arch/sh/src/sh1/sh1_initialstate.c
index c4fb11a74..fe703f5a9 100644
--- a/nuttx/arch/sh/src/sh1/sh1_initialstate.c
+++ b/nuttx/arch/sh/src/sh1/sh1_initialstate.c
@@ -92,7 +92,7 @@ static inline irqstate_t up_getsr(void)
*
****************************************************************************/
-void up_initial_state(_TCB *tcb)
+void up_initial_state(struct tcb_s *tcb)
{
struct xcptcontext *xcp = &tcb->xcp;
diff --git a/nuttx/arch/sh/src/sh1/sh1_schedulesigaction.c b/nuttx/arch/sh/src/sh1/sh1_schedulesigaction.c
index f0bc0af84..1c05d669c 100644
--- a/nuttx/arch/sh/src/sh1/sh1_schedulesigaction.c
+++ b/nuttx/arch/sh/src/sh1/sh1_schedulesigaction.c
@@ -100,7 +100,7 @@
*
****************************************************************************/
-void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
+void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
{
/* Refuse to handle nested signal actions */
@@ -120,7 +120,7 @@ void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
sdbg("rtcb=0x%p current_regs=0x%p\n", g_readytorun.head, current_regs);
- if (tcb == (_TCB*)g_readytorun.head)
+ if (tcb == (struct tcb_s*)g_readytorun.head)
{
/* CASE 1: We are not in an interrupt handler and
* a task is signalling itself for some reason.
diff --git a/nuttx/arch/sh/src/sh1/sh1_sigdeliver.c b/nuttx/arch/sh/src/sh1/sh1_sigdeliver.c
index 2f596b6b0..eb278163d 100644
--- a/nuttx/arch/sh/src/sh1/sh1_sigdeliver.c
+++ b/nuttx/arch/sh/src/sh1/sh1_sigdeliver.c
@@ -81,7 +81,7 @@
void up_sigdeliver(void)
{
#ifndef CONFIG_DISABLE_SIGNALS
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
uint32_t regs[XCPTCONTEXT_REGS];
sig_deliver_t sigdeliver;
diff --git a/nuttx/arch/sim/src/up_blocktask.c b/nuttx/arch/sim/src/up_blocktask.c
index c69c979ae..46598b442 100644
--- a/nuttx/arch/sim/src/up_blocktask.c
+++ b/nuttx/arch/sim/src/up_blocktask.c
@@ -84,7 +84,7 @@
*
****************************************************************************/
-void up_block_task(_TCB *tcb, tstate_t task_state)
+void up_block_task(struct tcb_s *tcb, tstate_t task_state)
{
/* Verify that the context switch can be performed */
if ((tcb->task_state < FIRST_READY_TO_RUN_STATE) ||
@@ -94,7 +94,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
sdbg("Blocking TCB=%p\n", tcb);
@@ -136,7 +136,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
sdbg("New Active Task TCB=%p\n", rtcb);
/* The way that we handle signals in the simulation is kind of
diff --git a/nuttx/arch/sim/src/up_createstack.c b/nuttx/arch/sim/src/up_createstack.c
index be8fe278b..268a9ba46 100644
--- a/nuttx/arch/sim/src/up_createstack.c
+++ b/nuttx/arch/sim/src/up_createstack.c
@@ -85,7 +85,7 @@
*
****************************************************************************/
-int up_create_stack(_TCB *tcb, size_t stack_size)
+int up_create_stack(struct tcb_s *tcb, size_t stack_size)
{
int ret = ERROR;
diff --git a/nuttx/arch/sim/src/up_exit.c b/nuttx/arch/sim/src/up_exit.c
index 3f82246c9..348c4a9e6 100644
--- a/nuttx/arch/sim/src/up_exit.c
+++ b/nuttx/arch/sim/src/up_exit.c
@@ -76,7 +76,7 @@
void _exit(int status)
{
- _TCB* tcb;
+ struct tcb_s* tcb;
sdbg("TCB=%p exitting\n", tcb);
@@ -88,7 +88,7 @@ void _exit(int status)
* head of the list.
*/
- tcb = (_TCB*)g_readytorun.head;
+ tcb = (struct tcb_s*)g_readytorun.head;
sdbg("New Active Task TCB=%p\n", tcb);
/* The way that we handle signals in the simulation is kind of
diff --git a/nuttx/arch/sim/src/up_initialstate.c b/nuttx/arch/sim/src/up_initialstate.c
index 6f241fc47..dfa114995 100644
--- a/nuttx/arch/sim/src/up_initialstate.c
+++ b/nuttx/arch/sim/src/up_initialstate.c
@@ -76,7 +76,7 @@
*
****************************************************************************/
-void up_initial_state(_TCB *tcb)
+void up_initial_state(struct tcb_s *tcb)
{
memset(&tcb->xcp, 0, sizeof(struct xcptcontext));
tcb->xcp.regs[JB_SP] = (uint32_t)tcb->adj_stack_ptr;
diff --git a/nuttx/arch/sim/src/up_releasepending.c b/nuttx/arch/sim/src/up_releasepending.c
index 52d76bcac..036c65299 100644
--- a/nuttx/arch/sim/src/up_releasepending.c
+++ b/nuttx/arch/sim/src/up_releasepending.c
@@ -75,7 +75,7 @@
void up_release_pending(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
sdbg("From TCB=%p\n", rtcb);
@@ -96,7 +96,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
sdbg("New Active Task TCB=%p\n", rtcb);
/* The way that we handle signals in the simulation is kind of
diff --git a/nuttx/arch/sim/src/up_releasestack.c b/nuttx/arch/sim/src/up_releasestack.c
index ef09fcb2a..c1e12ca00 100644
--- a/nuttx/arch/sim/src/up_releasestack.c
+++ b/nuttx/arch/sim/src/up_releasestack.c
@@ -69,7 +69,7 @@
*
****************************************************************************/
-void up_release_stack(_TCB *dtcb)
+void up_release_stack(struct tcb_s *dtcb)
{
if (dtcb->stack_alloc_ptr)
{
diff --git a/nuttx/arch/sim/src/up_reprioritizertr.c b/nuttx/arch/sim/src/up_reprioritizertr.c
index 15c1b26d5..0b18defe6 100644
--- a/nuttx/arch/sim/src/up_reprioritizertr.c
+++ b/nuttx/arch/sim/src/up_reprioritizertr.c
@@ -85,7 +85,7 @@
*
****************************************************************************/
-void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
+void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
{
/* Verify that the caller is sane */
@@ -103,7 +103,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
sdbg("TCB=%p PRI=%d\n", tcb, priority);
@@ -154,7 +154,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
sdbg("New Active Task TCB=%p\n", rtcb);
/* The way that we handle signals in the simulation is kind of
diff --git a/nuttx/arch/sim/src/up_schedulesigaction.c b/nuttx/arch/sim/src/up_schedulesigaction.c
index 871040a94..485f720ca 100644
--- a/nuttx/arch/sim/src/up_schedulesigaction.c
+++ b/nuttx/arch/sim/src/up_schedulesigaction.c
@@ -96,11 +96,11 @@
*
****************************************************************************/
-void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
+void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
{
/* We don't have to anything complex for the simulated target */
- if (tcb == (_TCB*)g_readytorun.head)
+ if (tcb == (struct tcb_s*)g_readytorun.head)
{
sigdeliver(tcb);
}
diff --git a/nuttx/arch/sim/src/up_unblocktask.c b/nuttx/arch/sim/src/up_unblocktask.c
index 04b6455f3..f8b229f8d 100644
--- a/nuttx/arch/sim/src/up_unblocktask.c
+++ b/nuttx/arch/sim/src/up_unblocktask.c
@@ -79,7 +79,7 @@
*
****************************************************************************/
-void up_unblock_task(_TCB *tcb)
+void up_unblock_task(struct tcb_s *tcb)
{
/* Verify that the context switch can be performed */
if ((tcb->task_state < FIRST_BLOCKED_STATE) ||
@@ -89,7 +89,7 @@ void up_unblock_task(_TCB *tcb)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
sdbg("Unblocking TCB=%p\n", tcb);
@@ -124,7 +124,7 @@ void up_unblock_task(_TCB *tcb)
* g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
sdbg("New Active Task TCB=%p\n", rtcb);
/* The way that we handle signals in the simulation is kind of
diff --git a/nuttx/arch/sim/src/up_usestack.c b/nuttx/arch/sim/src/up_usestack.c
index aa832ff90..afa419364 100644
--- a/nuttx/arch/sim/src/up_usestack.c
+++ b/nuttx/arch/sim/src/up_usestack.c
@@ -81,7 +81,7 @@
*
****************************************************************************/
-int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
+int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
{
/* Move up to next even word boundary if necessary */
diff --git a/nuttx/arch/x86/src/common/up_assert.c b/nuttx/arch/x86/src/common/up_assert.c
index 653e8e562..173ca6623 100644
--- a/nuttx/arch/x86/src/common/up_assert.c
+++ b/nuttx/arch/x86/src/common/up_assert.c
@@ -115,8 +115,8 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base)
#ifdef CONFIG_ARCH_STACKDUMP
static void up_dumpstate(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
- uint32_t sp = up_getsp();
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
+ uint32_t sp = up_getsp();
uint32_t ustackbase;
uint32_t ustacksize;
#if CONFIG_ARCH_INTERRUPTSTACK > 3
@@ -214,7 +214,7 @@ static void _up_assert(int errorcode)
{
/* Are we in an interrupt handler or the idle task? */
- if (current_regs || ((_TCB*)g_readytorun.head)->pid == 0)
+ if (current_regs || ((struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
for(;;)
@@ -244,7 +244,7 @@ static void _up_assert(int errorcode)
void up_assert(const uint8_t *filename, int lineno)
{
#ifdef CONFIG_PRINT_TASKNAME
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
@@ -266,7 +266,7 @@ void up_assert(const uint8_t *filename, int lineno)
void up_assert_code(const uint8_t *filename, int lineno, int errorcode)
{
#ifdef CONFIG_PRINT_TASKNAME
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
diff --git a/nuttx/arch/x86/src/common/up_blocktask.c b/nuttx/arch/x86/src/common/up_blocktask.c
index 530147a97..b1653f1e4 100644
--- a/nuttx/arch/x86/src/common/up_blocktask.c
+++ b/nuttx/arch/x86/src/common/up_blocktask.c
@@ -83,7 +83,7 @@
*
****************************************************************************/
-void up_block_task(_TCB *tcb, tstate_t task_state)
+void up_block_task(struct tcb_s *tcb, tstate_t task_state)
{
/* Verify that the context switch can be performed */
@@ -94,7 +94,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* Remove the tcb task from the ready-to-run list. If we
@@ -137,7 +137,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -155,7 +155,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
diff --git a/nuttx/arch/x86/src/common/up_exit.c b/nuttx/arch/x86/src/common/up_exit.c
index dee6f7d49..2aa21f352 100644
--- a/nuttx/arch/x86/src/common/up_exit.c
+++ b/nuttx/arch/x86/src/common/up_exit.c
@@ -73,7 +73,7 @@
****************************************************************************/
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
-static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
+static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
@@ -136,7 +136,7 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
void _exit(int status)
{
- _TCB* tcb;
+ struct tcb_s* tcb;
/* Disable interrupts. They will be restored when the next
* task is started.
@@ -159,7 +159,7 @@ void _exit(int status)
* head of the list.
*/
- tcb = (_TCB*)g_readytorun.head;
+ tcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
diff --git a/nuttx/arch/x86/src/common/up_releasepending.c b/nuttx/arch/x86/src/common/up_releasepending.c
index 979e0b50f..3f9f9fc0b 100644
--- a/nuttx/arch/x86/src/common/up_releasepending.c
+++ b/nuttx/arch/x86/src/common/up_releasepending.c
@@ -75,7 +75,7 @@
void up_release_pending(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("From TCB=%p\n", rtcb);
@@ -101,7 +101,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -121,7 +121,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
diff --git a/nuttx/arch/x86/src/common/up_reprioritizertr.c b/nuttx/arch/x86/src/common/up_reprioritizertr.c
index 53a0e4315..47c55f6b2 100644
--- a/nuttx/arch/x86/src/common/up_reprioritizertr.c
+++ b/nuttx/arch/x86/src/common/up_reprioritizertr.c
@@ -84,7 +84,7 @@
*
****************************************************************************/
-void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
+void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
{
/* Verify that the caller is sane */
@@ -102,7 +102,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
slldbg("TCB=%p PRI=%d\n", tcb, priority);
@@ -156,7 +156,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -175,7 +175,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
diff --git a/nuttx/arch/x86/src/common/up_unblocktask.c b/nuttx/arch/x86/src/common/up_unblocktask.c
index 3397b75e5..eac913886 100644
--- a/nuttx/arch/x86/src/common/up_unblocktask.c
+++ b/nuttx/arch/x86/src/common/up_unblocktask.c
@@ -78,7 +78,7 @@
*
****************************************************************************/
-void up_unblock_task(_TCB *tcb)
+void up_unblock_task(struct tcb_s *tcb)
{
/* Verify that the context switch can be performed */
@@ -89,7 +89,7 @@ void up_unblock_task(_TCB *tcb)
}
else
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
/* Remove the task from the blocked task list */
@@ -127,7 +127,7 @@ void up_unblock_task(_TCB *tcb)
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -147,7 +147,7 @@ void up_unblock_task(_TCB *tcb)
* g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
diff --git a/nuttx/arch/x86/src/i486/up_createstack.c b/nuttx/arch/x86/src/i486/up_createstack.c
index 1a2f67f33..fc739afdc 100644
--- a/nuttx/arch/x86/src/i486/up_createstack.c
+++ b/nuttx/arch/x86/src/i486/up_createstack.c
@@ -85,7 +85,7 @@
*
****************************************************************************/
-int up_create_stack(_TCB *tcb, size_t stack_size)
+int up_create_stack(struct tcb_s *tcb, size_t stack_size)
{
if (tcb->stack_alloc_ptr && tcb->adj_stack_size != stack_size)
{
@@ -122,7 +122,7 @@ int up_create_stack(_TCB *tcb, size_t stack_size)
top_of_stack &= ~3;
size_of_stack = top_of_stack - (uint32_t)tcb->stack_alloc_ptr + 4;
- /* Save the adjusted stack values in the _TCB */
+ /* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack;
diff --git a/nuttx/arch/x86/src/i486/up_initialstate.c b/nuttx/arch/x86/src/i486/up_initialstate.c
index 078099bd1..8efd0e92a 100644
--- a/nuttx/arch/x86/src/i486/up_initialstate.c
+++ b/nuttx/arch/x86/src/i486/up_initialstate.c
@@ -77,7 +77,7 @@
*
****************************************************************************/
-void up_initial_state(_TCB *tcb)
+void up_initial_state(struct tcb_s *tcb)
{
struct xcptcontext *xcp = &tcb->xcp;
diff --git a/nuttx/arch/x86/src/i486/up_releasestack.c b/nuttx/arch/x86/src/i486/up_releasestack.c
index a10a001e1..47b3ea994 100644
--- a/nuttx/arch/x86/src/i486/up_releasestack.c
+++ b/nuttx/arch/x86/src/i486/up_releasestack.c
@@ -67,7 +67,7 @@
*
****************************************************************************/
-void up_release_stack(_TCB *dtcb)
+void up_release_stack(struct tcb_s *dtcb)
{
if (dtcb->stack_alloc_ptr)
{
diff --git a/nuttx/arch/x86/src/i486/up_schedulesigaction.c b/nuttx/arch/x86/src/i486/up_schedulesigaction.c
index bacc12622..1eb773ce8 100644
--- a/nuttx/arch/x86/src/i486/up_schedulesigaction.c
+++ b/nuttx/arch/x86/src/i486/up_schedulesigaction.c
@@ -96,7 +96,7 @@
*
****************************************************************************/
-void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
+void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
{
/* Refuse to handle nested signal actions */
@@ -116,7 +116,7 @@ void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
sdbg("rtcb=0x%p current_regs=0x%p\n", g_readytorun.head, current_regs);
- if (tcb == (_TCB*)g_readytorun.head)
+ if (tcb == (struct tcb_s*)g_readytorun.head)
{
/* CASE 1: We are not in an interrupt handler and a task is
* signalling itself for some reason.
diff --git a/nuttx/arch/x86/src/i486/up_sigdeliver.c b/nuttx/arch/x86/src/i486/up_sigdeliver.c
index 468f5bc66..0f2082a20 100644
--- a/nuttx/arch/x86/src/i486/up_sigdeliver.c
+++ b/nuttx/arch/x86/src/i486/up_sigdeliver.c
@@ -81,7 +81,7 @@
void up_sigdeliver(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
uint32_t regs[XCPTCONTEXT_REGS];
sig_deliver_t sigdeliver;
diff --git a/nuttx/arch/x86/src/i486/up_usestack.c b/nuttx/arch/x86/src/i486/up_usestack.c
index 4a44c8415..38290dd77 100644
--- a/nuttx/arch/x86/src/i486/up_usestack.c
+++ b/nuttx/arch/x86/src/i486/up_usestack.c
@@ -81,7 +81,7 @@
*
****************************************************************************/
-int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
+int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
{
size_t top_of_stack;
size_t size_of_stack;
@@ -110,7 +110,7 @@ int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
top_of_stack &= ~3;
size_of_stack = top_of_stack - (uint32_t)tcb->stack_alloc_ptr + 4;
- /* Save the adjusted stack values in the _TCB */
+ /* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack;
diff --git a/nuttx/arch/z16/src/common/up_assert.c b/nuttx/arch/z16/src/common/up_assert.c
index 661d88833..06c77a73e 100644
--- a/nuttx/arch/z16/src/common/up_assert.c
+++ b/nuttx/arch/z16/src/common/up_assert.c
@@ -81,7 +81,7 @@ static void _up_assert(int errorcode) /* noreturn_function */
{
/* Are we in an interrupt handler or the idle task? */
- if (up_interrupt_context() || ((FAR _TCB*)g_readytorun.head)->pid == 0)
+ if (up_interrupt_context() || ((FAR struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
for(;;)
@@ -115,7 +115,7 @@ void up_assert(void)
#endif
{
#if CONFIG_TASK_NAME_SIZE > 0
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
@@ -152,7 +152,7 @@ void up_assert_code(int errorcode)
#endif
{
#if CONFIG_TASK_NAME_SIZE > 0
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
diff --git a/nuttx/arch/z16/src/common/up_blocktask.c b/nuttx/arch/z16/src/common/up_blocktask.c
index 88b422cf8..93efee96f 100644
--- a/nuttx/arch/z16/src/common/up_blocktask.c
+++ b/nuttx/arch/z16/src/common/up_blocktask.c
@@ -84,7 +84,7 @@
*
****************************************************************************/
-void up_block_task(FAR _TCB *tcb, tstate_t task_state)
+void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state)
{
/* Verify that the context switch can be performed */
@@ -95,7 +95,7 @@ void up_block_task(FAR _TCB *tcb, tstate_t task_state)
}
else
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* dbg("Blocking TCB=%p\n", tcb); */
@@ -140,7 +140,7 @@ void up_block_task(FAR _TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
/* dbg("New Active Task TCB=%p\n", rtcb); */
/* Then setup so that the context will be performed on exit
@@ -161,7 +161,7 @@ void up_block_task(FAR _TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
/* dbg("New Active Task TCB=%p\n", rtcb); */
/* Then switch contexts */
diff --git a/nuttx/arch/z16/src/common/up_createstack.c b/nuttx/arch/z16/src/common/up_createstack.c
index ed9b1655c..a65c69917 100644
--- a/nuttx/arch/z16/src/common/up_createstack.c
+++ b/nuttx/arch/z16/src/common/up_createstack.c
@@ -84,7 +84,7 @@
* must be allocated.
****************************************************************************/
-int up_create_stack(_TCB *tcb, size_t stack_size)
+int up_create_stack(struct tcb_s *tcb, size_t stack_size)
{
if (tcb->stack_alloc_ptr &&
tcb->adj_stack_size != stack_size)
@@ -120,7 +120,7 @@ int up_create_stack(_TCB *tcb, size_t stack_size)
top_of_stack &= ~3;
size_of_stack = top_of_stack - (uint32_t)tcb->stack_alloc_ptr + 4;
- /* Save the adjusted stack values in the _TCB */
+ /* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack;
diff --git a/nuttx/arch/z16/src/common/up_exit.c b/nuttx/arch/z16/src/common/up_exit.c
index 20b808360..59764484f 100644
--- a/nuttx/arch/z16/src/common/up_exit.c
+++ b/nuttx/arch/z16/src/common/up_exit.c
@@ -75,7 +75,7 @@
****************************************************************************/
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
-static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
+static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
@@ -138,7 +138,7 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
void _exit(int status)
{
- FAR _TCB* tcb;
+ FAR struct tcb_s* tcb;
/* Disable interrupts. Interrupts will remain disabled until
* the new task is resumed below.
@@ -161,7 +161,7 @@ void _exit(int status)
* head of the list.
*/
- tcb = (FAR _TCB*)g_readytorun.head;
+ tcb = (FAR struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", tcb);
/* Then switch contexts */
diff --git a/nuttx/arch/z16/src/common/up_initialstate.c b/nuttx/arch/z16/src/common/up_initialstate.c
index 8938679ac..50ff3f133 100644
--- a/nuttx/arch/z16/src/common/up_initialstate.c
+++ b/nuttx/arch/z16/src/common/up_initialstate.c
@@ -76,7 +76,7 @@
*
****************************************************************************/
-void up_initial_state(_TCB *tcb)
+void up_initial_state(struct tcb_s *tcb)
{
uint32_t *reg32 = (uint32_t*)tcb->xcp.regs;
diff --git a/nuttx/arch/z16/src/common/up_releasepending.c b/nuttx/arch/z16/src/common/up_releasepending.c
index ff9a9782e..a25459730 100644
--- a/nuttx/arch/z16/src/common/up_releasepending.c
+++ b/nuttx/arch/z16/src/common/up_releasepending.c
@@ -77,7 +77,7 @@
void up_release_pending(void)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
slldbg("From TCB=%p\n", rtcb);
@@ -103,7 +103,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then setup so that the context will be performed on exit
@@ -125,7 +125,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
diff --git a/nuttx/arch/z16/src/common/up_releasestack.c b/nuttx/arch/z16/src/common/up_releasestack.c
index f064cae7f..82ba1b122 100644
--- a/nuttx/arch/z16/src/common/up_releasestack.c
+++ b/nuttx/arch/z16/src/common/up_releasestack.c
@@ -67,7 +67,7 @@
*
************************************************************/
-void up_release_stack(_TCB *dtcb)
+void up_release_stack(struct tcb_s *dtcb)
{
if (dtcb->stack_alloc_ptr)
{
diff --git a/nuttx/arch/z16/src/common/up_reprioritizertr.c b/nuttx/arch/z16/src/common/up_reprioritizertr.c
index 6e76d6ce1..2eb5c2cdb 100644
--- a/nuttx/arch/z16/src/common/up_reprioritizertr.c
+++ b/nuttx/arch/z16/src/common/up_reprioritizertr.c
@@ -86,7 +86,7 @@
*
****************************************************************************/
-void up_reprioritize_rtr(FAR _TCB *tcb, uint8_t priority)
+void up_reprioritize_rtr(FAR struct tcb_s *tcb, uint8_t priority)
{
/* Verify that the caller is sane */
@@ -104,7 +104,7 @@ void up_reprioritize_rtr(FAR _TCB *tcb, uint8_t priority)
}
else
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
bool switch_needed;
slldbg("TCB=%p PRI=%d\n", tcb, priority);
@@ -158,7 +158,7 @@ void up_reprioritize_rtr(FAR _TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then setup so that the context will be performed on exit
@@ -179,7 +179,7 @@ void up_reprioritize_rtr(FAR _TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
diff --git a/nuttx/arch/z16/src/common/up_schedulesigaction.c b/nuttx/arch/z16/src/common/up_schedulesigaction.c
index 1c5b9a78c..b241d0a5b 100644
--- a/nuttx/arch/z16/src/common/up_schedulesigaction.c
+++ b/nuttx/arch/z16/src/common/up_schedulesigaction.c
@@ -100,7 +100,7 @@
*
****************************************************************************/
-void up_schedule_sigaction(FAR _TCB *tcb, sig_deliver_t sigdeliver)
+void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
{
/* Refuse to handle nested signal actions */
@@ -120,7 +120,7 @@ void up_schedule_sigaction(FAR _TCB *tcb, sig_deliver_t sigdeliver)
dbg("rtcb=0x%p current_regs=0x%p\n", g_readytorun.head, current_regs);
- if (tcb == (FAR _TCB*)g_readytorun.head)
+ if (tcb == (FAR struct tcb_s*)g_readytorun.head)
{
/* CASE 1: We are not in an interrupt handler and
* a task is signalling itself for some reason.
diff --git a/nuttx/arch/z16/src/common/up_sigdeliver.c b/nuttx/arch/z16/src/common/up_sigdeliver.c
index d8636bd6f..8f5118798 100644
--- a/nuttx/arch/z16/src/common/up_sigdeliver.c
+++ b/nuttx/arch/z16/src/common/up_sigdeliver.c
@@ -81,7 +81,7 @@
void up_sigdeliver(void)
{
#ifndef CONFIG_DISABLE_SIGNALS
- FAR _TCB *rtcb = (_TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
chipreg_t regs[XCPTCONTEXT_REGS];
FAR uint32_t *regs32 = (FAR uint32_t*)regs;
sig_deliver_t sigdeliver;
diff --git a/nuttx/arch/z16/src/common/up_stackdump.c b/nuttx/arch/z16/src/common/up_stackdump.c
index 077b0c8f7..ef9eebb23 100644
--- a/nuttx/arch/z16/src/common/up_stackdump.c
+++ b/nuttx/arch/z16/src/common/up_stackdump.c
@@ -78,8 +78,8 @@
#ifdef CONFIG_ARCH_STACKDUMP
static void up_stackdump(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
- chipreg_t sp = up_getsp();
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
+ chipreg_t sp = up_getsp();
chipreg_t stack_base = (chipreg_t)rtcb->adj_stack_ptr;
chipreg_t stack_size = (chipreg_t)rtcb->adj_stack_size;
diff --git a/nuttx/arch/z16/src/common/up_unblocktask.c b/nuttx/arch/z16/src/common/up_unblocktask.c
index d72d55424..f63981ab5 100644
--- a/nuttx/arch/z16/src/common/up_unblocktask.c
+++ b/nuttx/arch/z16/src/common/up_unblocktask.c
@@ -81,7 +81,7 @@
*
****************************************************************************/
-void up_unblock_task(FAR _TCB *tcb)
+void up_unblock_task(FAR struct tcb_s *tcb)
{
/* Verify that the context switch can be performed */
@@ -92,7 +92,7 @@ void up_unblock_task(FAR _TCB *tcb)
}
else
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
/* dbg("Unblocking TCB=%p\n", tcb); */
@@ -132,7 +132,7 @@ void up_unblock_task(FAR _TCB *tcb)
* of the g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
/* dbg("New Active Task TCB=%p\n", rtcb); */
/* Then setup so that the context will be performed on exit
@@ -155,7 +155,7 @@ void up_unblock_task(FAR _TCB *tcb)
* g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
/* dbg("New Active Task TCB=%p\n", rtcb); */
/* Then switch contexts */
diff --git a/nuttx/arch/z16/src/common/up_usestack.c b/nuttx/arch/z16/src/common/up_usestack.c
index 69e4763c5..9ebe01de4 100644
--- a/nuttx/arch/z16/src/common/up_usestack.c
+++ b/nuttx/arch/z16/src/common/up_usestack.c
@@ -82,7 +82,7 @@
*
************************************************************/
-int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
+int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
{
size_t top_of_stack;
size_t size_of_stack;
@@ -113,7 +113,7 @@ int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
top_of_stack &= ~3;
size_of_stack = top_of_stack - (uint32_t)tcb->stack_alloc_ptr + 4;
- /* Save the adjusted stack values in the _TCB */
+ /* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_size = top_of_stack;
tcb->adj_stack_size = size_of_stack;
diff --git a/nuttx/arch/z80/src/common/up_assert.c b/nuttx/arch/z80/src/common/up_assert.c
index 11a2a4f2a..27929c97a 100644
--- a/nuttx/arch/z80/src/common/up_assert.c
+++ b/nuttx/arch/z80/src/common/up_assert.c
@@ -81,7 +81,7 @@ static void _up_assert(int errorcode) /* noreturn_function */
{
/* Are we in an interrupt handler or the idle task? */
- if (up_interrupt_context() || ((FAR _TCB*)g_readytorun.head)->pid == 0)
+ if (up_interrupt_context() || ((FAR struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
for(;;)
@@ -115,7 +115,7 @@ void up_assert(void)
#endif
{
#if CONFIG_TASK_NAME_SIZE > 0
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
@@ -152,7 +152,7 @@ void up_assert_code(int errorcode)
#endif
{
#if CONFIG_TASK_NAME_SIZE > 0
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
diff --git a/nuttx/arch/z80/src/common/up_blocktask.c b/nuttx/arch/z80/src/common/up_blocktask.c
index bbc2be5e6..6a9f050aa 100644
--- a/nuttx/arch/z80/src/common/up_blocktask.c
+++ b/nuttx/arch/z80/src/common/up_blocktask.c
@@ -85,7 +85,7 @@
*
****************************************************************************/
-void up_block_task(FAR _TCB *tcb, tstate_t task_state)
+void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state)
{
/* Verify that the context switch can be performed */
@@ -96,7 +96,7 @@ void up_block_task(FAR _TCB *tcb, tstate_t task_state)
}
else
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* dbg("Blocking TCB=%p\n", tcb); */
@@ -141,7 +141,7 @@ void up_block_task(FAR _TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
/* dbg("New Active Task TCB=%p\n", rtcb); */
/* Then setup so that the context will be performed on exit
@@ -162,7 +162,7 @@ void up_block_task(FAR _TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
/* dbg("New Active Task TCB=%p\n", rtcb); */
/* Then switch contexts */
diff --git a/nuttx/arch/z80/src/common/up_createstack.c b/nuttx/arch/z80/src/common/up_createstack.c
index 28246aec3..6636643b1 100644
--- a/nuttx/arch/z80/src/common/up_createstack.c
+++ b/nuttx/arch/z80/src/common/up_createstack.c
@@ -82,7 +82,7 @@
* must be allocated.
****************************************************************************/
-int up_create_stack(_TCB *tcb, size_t stack_size)
+int up_create_stack(struct tcb_s *tcb, size_t stack_size)
{
if (tcb->stack_alloc_ptr &&
tcb->adj_stack_size != stack_size)
@@ -118,7 +118,7 @@ int up_create_stack(_TCB *tcb, size_t stack_size)
top_of_stack &= ~3;
size_of_stack = top_of_stack - (uint32_t)tcb->stack_alloc_ptr + 4;
- /* Save the adjusted stack values in the _TCB */
+ /* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack;
diff --git a/nuttx/arch/z80/src/common/up_exit.c b/nuttx/arch/z80/src/common/up_exit.c
index 603a0bfbe..c738202a9 100644
--- a/nuttx/arch/z80/src/common/up_exit.c
+++ b/nuttx/arch/z80/src/common/up_exit.c
@@ -76,7 +76,7 @@
****************************************************************************/
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
-static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
+static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
@@ -139,7 +139,7 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
void _exit(int status)
{
- FAR _TCB* tcb;
+ FAR struct tcb_s* tcb;
/* Disable interrupts. Interrupts will remain disabled until
* the new task is resumed below.
@@ -162,7 +162,7 @@ void _exit(int status)
* head of the list.
*/
- tcb = (FAR _TCB*)g_readytorun.head;
+ tcb = (FAR struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", tcb);
/* Then switch contexts */
diff --git a/nuttx/arch/z80/src/common/up_releasepending.c b/nuttx/arch/z80/src/common/up_releasepending.c
index bb5187465..7e9eb9f18 100644
--- a/nuttx/arch/z80/src/common/up_releasepending.c
+++ b/nuttx/arch/z80/src/common/up_releasepending.c
@@ -78,7 +78,7 @@
void up_release_pending(void)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
slldbg("From TCB=%p\n", rtcb);
@@ -104,7 +104,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then setup so that the context will be performed on exit
@@ -126,7 +126,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
diff --git a/nuttx/arch/z80/src/common/up_releasestack.c b/nuttx/arch/z80/src/common/up_releasestack.c
index d41cc9918..b5c9ef2f9 100644
--- a/nuttx/arch/z80/src/common/up_releasestack.c
+++ b/nuttx/arch/z80/src/common/up_releasestack.c
@@ -67,7 +67,7 @@
*
************************************************************/
-void up_release_stack(_TCB *dtcb)
+void up_release_stack(struct tcb_s *dtcb)
{
if (dtcb->stack_alloc_ptr)
{
diff --git a/nuttx/arch/z80/src/common/up_reprioritizertr.c b/nuttx/arch/z80/src/common/up_reprioritizertr.c
index b8102c99f..476f324e3 100644
--- a/nuttx/arch/z80/src/common/up_reprioritizertr.c
+++ b/nuttx/arch/z80/src/common/up_reprioritizertr.c
@@ -87,7 +87,7 @@
*
****************************************************************************/
-void up_reprioritize_rtr(FAR _TCB *tcb, uint8_t priority)
+void up_reprioritize_rtr(FAR struct tcb_s *tcb, uint8_t priority)
{
/* Verify that the caller is sane */
@@ -105,7 +105,7 @@ void up_reprioritize_rtr(FAR _TCB *tcb, uint8_t priority)
}
else
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
bool switch_needed;
slldbg("TCB=%p PRI=%d\n", tcb, priority);
@@ -159,7 +159,7 @@ void up_reprioritize_rtr(FAR _TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then setup so that the context will be performed on exit
@@ -180,7 +180,7 @@ void up_reprioritize_rtr(FAR _TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
diff --git a/nuttx/arch/z80/src/common/up_stackdump.c b/nuttx/arch/z80/src/common/up_stackdump.c
index f9c515337..6cb85dd38 100644
--- a/nuttx/arch/z80/src/common/up_stackdump.c
+++ b/nuttx/arch/z80/src/common/up_stackdump.c
@@ -79,8 +79,8 @@
#ifdef CONFIG_ARCH_STACKDUMP
static void up_stackdump(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
- uint16_t sp = up_getsp();
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
+ uint16_t sp = up_getsp();
uint16_t stack_base = (uint16_t)rtcb->adj_stack_ptr;
uint16_t stack_size = (uint16_t)rtcb->adj_stack_size;
diff --git a/nuttx/arch/z80/src/common/up_unblocktask.c b/nuttx/arch/z80/src/common/up_unblocktask.c
index d99d6d87d..9f9714bb9 100644
--- a/nuttx/arch/z80/src/common/up_unblocktask.c
+++ b/nuttx/arch/z80/src/common/up_unblocktask.c
@@ -82,7 +82,7 @@
*
****************************************************************************/
-void up_unblock_task(FAR _TCB *tcb)
+void up_unblock_task(FAR struct tcb_s *tcb)
{
/* Verify that the context switch can be performed */
@@ -93,7 +93,7 @@ void up_unblock_task(FAR _TCB *tcb)
}
else
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
/* dbg("Unblocking TCB=%p\n", tcb); */
@@ -133,7 +133,7 @@ void up_unblock_task(FAR _TCB *tcb)
* of the g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
/* dbg("New Active Task TCB=%p\n", rtcb); */
/* Then setup so that the context will be performed on exit
@@ -156,7 +156,7 @@ void up_unblock_task(FAR _TCB *tcb)
* g_readytorun task list.
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
/* dbg("New Active Task TCB=%p\n", rtcb); */
/* Then switch contexts */
diff --git a/nuttx/arch/z80/src/common/up_usestack.c b/nuttx/arch/z80/src/common/up_usestack.c
index 7d348a9c6..0aaa5f906 100644
--- a/nuttx/arch/z80/src/common/up_usestack.c
+++ b/nuttx/arch/z80/src/common/up_usestack.c
@@ -81,7 +81,7 @@
*
************************************************************/
-int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
+int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
{
size_t top_of_stack;
size_t size_of_stack;
@@ -112,7 +112,7 @@ int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
top_of_stack &= ~3;
size_of_stack = top_of_stack - (uint32_t)tcb->stack_alloc_ptr + 4;
- /* Save the adjusted stack values in the _TCB */
+ /* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_size = top_of_stack;
tcb->adj_stack_size = size_of_stack;
diff --git a/nuttx/arch/z80/src/ez80/ez80_initialstate.c b/nuttx/arch/z80/src/ez80/ez80_initialstate.c
index 9ff56e7c1..945ba5b39 100644
--- a/nuttx/arch/z80/src/ez80/ez80_initialstate.c
+++ b/nuttx/arch/z80/src/ez80/ez80_initialstate.c
@@ -77,7 +77,7 @@
*
****************************************************************************/
-void up_initial_state(_TCB *tcb)
+void up_initial_state(struct tcb_s *tcb)
{
struct xcptcontext *xcp = &tcb->xcp;
diff --git a/nuttx/arch/z80/src/ez80/ez80_schedulesigaction.c b/nuttx/arch/z80/src/ez80/ez80_schedulesigaction.c
index 04643304d..c519fb18b 100644
--- a/nuttx/arch/z80/src/ez80/ez80_schedulesigaction.c
+++ b/nuttx/arch/z80/src/ez80/ez80_schedulesigaction.c
@@ -68,7 +68,7 @@
* Name: ez80_sigsetup
****************************************************************************/
-static void ez80_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs)
+static void ez80_sigsetup(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs)
{
/* Save the return address and interrupt state. These will be restored by
* the signal trampoline after the signals have been delivered.
@@ -121,7 +121,7 @@ static void ez80_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t
*
****************************************************************************/
-void up_schedule_sigaction(FAR _TCB *tcb, sig_deliver_t sigdeliver)
+void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
{
sdbg("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t)sigdeliver);
@@ -139,7 +139,7 @@ void up_schedule_sigaction(FAR _TCB *tcb, sig_deliver_t sigdeliver)
* to the currently executing task.
*/
- if (tcb == (FAR _TCB*)g_readytorun.head)
+ if (tcb == (FAR struct tcb_s*)g_readytorun.head)
{
/* CASE 1: We are not in an interrupt handler and a task is
* signalling itself for some reason.
diff --git a/nuttx/arch/z80/src/ez80/ez80_sigdeliver.c b/nuttx/arch/z80/src/ez80/ez80_sigdeliver.c
index 2d946aa32..aeb2d6316 100644
--- a/nuttx/arch/z80/src/ez80/ez80_sigdeliver.c
+++ b/nuttx/arch/z80/src/ez80/ez80_sigdeliver.c
@@ -81,7 +81,7 @@
void up_sigdeliver(void)
{
#ifndef CONFIG_DISABLE_SIGNALS
- FAR _TCB *rtcb = (_TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
chipreg_t regs[XCPTCONTEXT_REGS];
sig_deliver_t sigdeliver;
diff --git a/nuttx/arch/z80/src/ez80/switch.h b/nuttx/arch/z80/src/ez80/switch.h
index 0970b25ce..f12983a12 100644
--- a/nuttx/arch/z80/src/ez80/switch.h
+++ b/nuttx/arch/z80/src/ez80/switch.h
@@ -157,7 +157,7 @@ void ez80_restorecontext(FAR chipreg_t *regs);
/* Defined in ez80_sigsetup.c */
-void ez80_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, chipreg_t *regs);
+void ez80_sigsetup(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver, chipreg_t *regs);
/* Defined in ez80_registerdump.c */
diff --git a/nuttx/arch/z80/src/z180/switch.h b/nuttx/arch/z80/src/z180/switch.h
index 7bf851a7c..5405ac8a2 100644
--- a/nuttx/arch/z80/src/z180/switch.h
+++ b/nuttx/arch/z80/src/z180/switch.h
@@ -223,7 +223,7 @@ void z180_restoreusercontext(FAR chipreg_t *regs);
/* Defined in z180_sigsetup.c */
-void z180_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs);
+void z180_sigsetup(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs);
/* Defined in z180_registerdump.c */
diff --git a/nuttx/arch/z80/src/z180/z180_initialstate.c b/nuttx/arch/z80/src/z180/z180_initialstate.c
index 8d0211261..491ea6dfb 100644
--- a/nuttx/arch/z80/src/z180/z180_initialstate.c
+++ b/nuttx/arch/z80/src/z180/z180_initialstate.c
@@ -76,7 +76,7 @@
*
****************************************************************************/
-void up_initial_state(_TCB *tcb)
+void up_initial_state(struct tcb_s *tcb)
{
struct xcptcontext *xcp = &tcb->xcp;
diff --git a/nuttx/arch/z80/src/z180/z180_mmu.c b/nuttx/arch/z80/src/z180/z180_mmu.c
index 5f9b26be2..09fa65f21 100644
--- a/nuttx/arch/z80/src/z180/z180_mmu.c
+++ b/nuttx/arch/z80/src/z180/z180_mmu.c
@@ -435,7 +435,7 @@ int up_addrenv_destroy(task_addrenv_t addrenv)
*
****************************************************************************/
-int up_addrenv_assign(task_addrenv_t addrenv, FAR _TCB *tcb)
+int up_addrenv_assign(task_addrenv_t addrenv, FAR struct tcb_s *tcb)
{
FAR struct z180_cbr_s *cbr = (FAR struct z180_cbr_s *)addrenv;
int ret;
@@ -470,7 +470,7 @@ int up_addrenv_assign(task_addrenv_t addrenv, FAR _TCB *tcb)
*
****************************************************************************/
-int up_addrenv_share(FAR const _TCB *ptcb, FAR _TCB *ctcb)
+int up_addrenv_share(FAR const struct tcb_s *ptcb, FAR struct tcb_s *ctcb)
{
irqstate_t flags;
@@ -513,7 +513,7 @@ int up_addrenv_share(FAR const _TCB *ptcb, FAR _TCB *ctcb)
*
****************************************************************************/
-int up_addrenv_release(FAR _TCB *tcb)
+int up_addrenv_release(FAR struct tcb_s *tcb)
{
FAR struct z180_cbr_s *cbr;
irqstate_t flags;
diff --git a/nuttx/arch/z80/src/z180/z180_schedulesigaction.c b/nuttx/arch/z80/src/z180/z180_schedulesigaction.c
index 3d9bbe55b..39344e51f 100644
--- a/nuttx/arch/z80/src/z180/z180_schedulesigaction.c
+++ b/nuttx/arch/z80/src/z180/z180_schedulesigaction.c
@@ -68,7 +68,7 @@
* Name: z180_sigsetup
****************************************************************************/
-static void z180_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs)
+static void z180_sigsetup(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs)
{
/* Save the return address and interrupt state. These will be restored by
* the signal trampoline after the signals have been delivered.
@@ -121,7 +121,7 @@ static void z180_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t
*
****************************************************************************/
-void up_schedule_sigaction(FAR _TCB *tcb, sig_deliver_t sigdeliver)
+void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
{
dbg("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t)sigdeliver);
@@ -139,7 +139,7 @@ void up_schedule_sigaction(FAR _TCB *tcb, sig_deliver_t sigdeliver)
* to the currently executing task.
*/
- if (tcb == (FAR _TCB*)g_readytorun.head)
+ if (tcb == (FAR struct tcb_s*)g_readytorun.head)
{
/* CASE 1: We are not in an interrupt handler and a task is
* signalling itself for some reason.
diff --git a/nuttx/arch/z80/src/z180/z180_sigdeliver.c b/nuttx/arch/z80/src/z180/z180_sigdeliver.c
index 281cfcf6a..eb3fa8e2c 100644
--- a/nuttx/arch/z80/src/z180/z180_sigdeliver.c
+++ b/nuttx/arch/z80/src/z180/z180_sigdeliver.c
@@ -80,7 +80,7 @@
void up_sigdeliver(void)
{
#ifndef CONFIG_DISABLE_SIGNALS
- FAR _TCB *rtcb = (_TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
chipreg_t regs[XCPTCONTEXT_REGS];
sig_deliver_t sigdeliver;
diff --git a/nuttx/arch/z80/src/z8/switch.h b/nuttx/arch/z80/src/z8/switch.h
index 17f15b6da..3e4a4d28e 100644
--- a/nuttx/arch/z80/src/z8/switch.h
+++ b/nuttx/arch/z80/src/z8/switch.h
@@ -245,7 +245,7 @@ void z8_restorecontext(FAR chipreg_t *regs);
/* Defined in z8_sigsetup.c */
-void z8_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs);
+void z8_sigsetup(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs);
/* Defined in z8_registerdump.c */
diff --git a/nuttx/arch/z80/src/z8/z8_initialstate.c b/nuttx/arch/z80/src/z8/z8_initialstate.c
index 706347da9..496d05b34 100644
--- a/nuttx/arch/z80/src/z8/z8_initialstate.c
+++ b/nuttx/arch/z80/src/z8/z8_initialstate.c
@@ -78,7 +78,7 @@
*
****************************************************************************/
-void up_initial_state(FAR _TCB *tcb)
+void up_initial_state(FAR struct tcb_s *tcb)
{
struct xcptcontext *xcp = &tcb->xcp;
diff --git a/nuttx/arch/z80/src/z8/z8_schedulesigaction.c b/nuttx/arch/z80/src/z8/z8_schedulesigaction.c
index 7a5f66615..daae09008 100644
--- a/nuttx/arch/z80/src/z8/z8_schedulesigaction.c
+++ b/nuttx/arch/z80/src/z8/z8_schedulesigaction.c
@@ -68,7 +68,7 @@
* Name: z8_sigsetup
****************************************************************************/
-static void z8_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs)
+static void z8_sigsetup(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs)
{
/* Save the return address and interrupt state. These will be restored by
* the signal trampoline after the signals have been delivered.
@@ -121,7 +121,7 @@ static void z8_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *
*
****************************************************************************/
-void up_schedule_sigaction(FAR _TCB *tcb, sig_deliver_t sigdeliver)
+void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
{
dbg("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t)sigdeliver);
@@ -139,7 +139,7 @@ void up_schedule_sigaction(FAR _TCB *tcb, sig_deliver_t sigdeliver)
* to the currently executing task.
*/
- if (tcb == (FAR _TCB*)g_readytorun.head)
+ if (tcb == (FAR struct tcb_s*)g_readytorun.head)
{
/* CASE 1: We are not in an interrupt handler and a task is
* signalling itself for some reason.
diff --git a/nuttx/arch/z80/src/z8/z8_sigdeliver.c b/nuttx/arch/z80/src/z8/z8_sigdeliver.c
index d1153a497..50b81a202 100644
--- a/nuttx/arch/z80/src/z8/z8_sigdeliver.c
+++ b/nuttx/arch/z80/src/z8/z8_sigdeliver.c
@@ -95,7 +95,7 @@ static void z8_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src)
void up_sigdeliver(void)
{
#ifndef CONFIG_DISABLE_SIGNALS
- FAR _TCB *rtcb = (_TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
chipreg_t regs[XCPTCONTEXT_REGS];
sig_deliver_t sigdeliver;
diff --git a/nuttx/arch/z80/src/z80/switch.h b/nuttx/arch/z80/src/z80/switch.h
index 4a49c70ef..472daad78 100644
--- a/nuttx/arch/z80/src/z80/switch.h
+++ b/nuttx/arch/z80/src/z80/switch.h
@@ -156,7 +156,7 @@ void z80_restoreusercontext(FAR chipreg_t *regs);
/* Defined in z80_sigsetup.c */
-void z80_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs);
+void z80_sigsetup(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs);
/* Defined in z80_registerdump.c */
diff --git a/nuttx/arch/z80/src/z80/z80_initialstate.c b/nuttx/arch/z80/src/z80/z80_initialstate.c
index 01cc4f00a..2fcac2ed9 100644
--- a/nuttx/arch/z80/src/z80/z80_initialstate.c
+++ b/nuttx/arch/z80/src/z80/z80_initialstate.c
@@ -76,7 +76,7 @@
*
****************************************************************************/
-void up_initial_state(_TCB *tcb)
+void up_initial_state(struct tcb_s *tcb)
{
struct xcptcontext *xcp = &tcb->xcp;
diff --git a/nuttx/arch/z80/src/z80/z80_schedulesigaction.c b/nuttx/arch/z80/src/z80/z80_schedulesigaction.c
index 3b227d5e3..893589726 100644
--- a/nuttx/arch/z80/src/z80/z80_schedulesigaction.c
+++ b/nuttx/arch/z80/src/z80/z80_schedulesigaction.c
@@ -68,7 +68,7 @@
* Name: z80_sigsetup
****************************************************************************/
-static void z80_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs)
+static void z80_sigsetup(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs)
{
/* Save the return address and interrupt state. These will be restored by
* the signal trampoline after the signals have been delivered.
@@ -121,7 +121,7 @@ static void z80_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t
*
****************************************************************************/
-void up_schedule_sigaction(FAR _TCB *tcb, sig_deliver_t sigdeliver)
+void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
{
dbg("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t)sigdeliver);
@@ -139,7 +139,7 @@ void up_schedule_sigaction(FAR _TCB *tcb, sig_deliver_t sigdeliver)
* to the currently executing task.
*/
- if (tcb == (FAR _TCB*)g_readytorun.head)
+ if (tcb == (FAR struct tcb_s*)g_readytorun.head)
{
/* CASE 1: We are not in an interrupt handler and a task is
* signalling itself for some reason.
diff --git a/nuttx/arch/z80/src/z80/z80_sigdeliver.c b/nuttx/arch/z80/src/z80/z80_sigdeliver.c
index a8fc1e347..3eacd6467 100644
--- a/nuttx/arch/z80/src/z80/z80_sigdeliver.c
+++ b/nuttx/arch/z80/src/z80/z80_sigdeliver.c
@@ -80,7 +80,7 @@
void up_sigdeliver(void)
{
#ifndef CONFIG_DISABLE_SIGNALS
- FAR _TCB *rtcb = (_TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
chipreg_t regs[XCPTCONTEXT_REGS];
sig_deliver_t sigdeliver;
diff --git a/nuttx/binfmt/binfmt_execmodule.c b/nuttx/binfmt/binfmt_execmodule.c
index 10068b482..7d7f00b33 100644
--- a/nuttx/binfmt/binfmt_execmodule.c
+++ b/nuttx/binfmt/binfmt_execmodule.c
@@ -134,13 +134,13 @@ static void exec_ctors(FAR void *arg)
int exec_module(FAR const struct binary_s *binp)
{
- FAR _TCB *tcb;
+ FAR struct tcb_s *tcb;
#ifndef CONFIG_CUSTOM_STACK
FAR uint32_t *stack;
#endif
- pid_t pid;
- int err;
- int ret;
+ pid_t pid;
+ int err;
+ int ret;
/* Sanity checking */
@@ -156,7 +156,7 @@ int exec_module(FAR const struct binary_s *binp)
/* Allocate a TCB for the new task. */
- tcb = (FAR _TCB*)kzalloc(sizeof(_TCB));
+ tcb = (FAR struct tcb_s*)kzalloc(sizeof(struct tcb_s));
if (!tcb)
{
err = ENOMEM;
diff --git a/nuttx/configs/ea3131/src/up_fillpage.c b/nuttx/configs/ea3131/src/up_fillpage.c
index 9fdd80864..09cbf6171 100644
--- a/nuttx/configs/ea3131/src/up_fillpage.c
+++ b/nuttx/configs/ea3131/src/up_fillpage.c
@@ -2,7 +2,7 @@
* configs/ea3131/src/up_fillpage.c
* arch/arm/src/board/up_fillpage.c
*
- * Copyright (C) 2010,2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2010, 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -402,7 +402,7 @@ static inline void lpc31_initsrc(void)
/* Version 1: Supports blocking fill operations */
-int up_fillpage(FAR _TCB *tcb, FAR void *vpage)
+int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage)
{
#if defined(CONFIG_PAGING_BINPATH)
ssize_t nbytes;
@@ -474,7 +474,7 @@ int up_fillpage(FAR _TCB *tcb, FAR void *vpage)
/* Version 2: Supports non-blocking, asynchronous fill operations */
-int up_fillpage(FAR _TCB *tcb, FAR void *vpage, up_pgcallback_t pg_callback)
+int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage, up_pgcallback_t pg_callback)
{
pglldbg("TCB: %p vpage: %d far: %08x\n", tcb, vpage, tcb->xcp.far);
DEBUGASSERT(tcb->xcp.far >= PG_PAGED_VBASE && tcb->xcp.far < PG_PAGED_VEND);
diff --git a/nuttx/configs/ea3152/src/up_fillpage.c b/nuttx/configs/ea3152/src/up_fillpage.c
index 880f70036..a6b5f3590 100644
--- a/nuttx/configs/ea3152/src/up_fillpage.c
+++ b/nuttx/configs/ea3152/src/up_fillpage.c
@@ -2,7 +2,7 @@
* configs/ea3152/src/up_fillpage.c
* arch/arm/src/board/up_fillpage.c
*
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -402,7 +402,7 @@ static inline void lpc31_initsrc(void)
/* Version 1: Supports blocking fill operations */
-int up_fillpage(FAR _TCB *tcb, FAR void *vpage)
+int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage)
{
#if defined(CONFIG_PAGING_BINPATH)
ssize_t nbytes;
@@ -474,7 +474,7 @@ int up_fillpage(FAR _TCB *tcb, FAR void *vpage)
/* Version 2: Supports non-blocking, asynchronous fill operations */
-int up_fillpage(FAR _TCB *tcb, FAR void *vpage, up_pgcallback_t pg_callback)
+int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage, up_pgcallback_t pg_callback)
{
pglldbg("TCB: %p vpage: %d far: %08x\n", tcb, vpage, tcb->xcp.far);
DEBUGASSERT(tcb->xcp.far >= PG_PAGED_VBASE && tcb->xcp.far < PG_PAGED_VEND);
diff --git a/nuttx/fs/fs_fdopen.c b/nuttx/fs/fs_fdopen.c
index d8a370482..5d1c67c34 100644
--- a/nuttx/fs/fs_fdopen.c
+++ b/nuttx/fs/fs_fdopen.c
@@ -63,7 +63,7 @@
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
-static inline int fs_checkfd(FAR _TCB *tcb, int fd, int oflags)
+static inline int fs_checkfd(FAR struct tcb_s *tcb, int fd, int oflags)
{
FAR struct filelist *flist;
FAR struct inode *inode;
@@ -119,7 +119,7 @@ static inline int fs_checkfd(FAR _TCB *tcb, int fd, int oflags)
*
****************************************************************************/
-FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR _TCB *tcb)
+FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR struct tcb_s *tcb)
{
FAR struct streamlist *slist;
FAR FILE *stream;
diff --git a/nuttx/include/nuttx/arch.h b/nuttx/include/nuttx/arch.h
index 958986472..c86b66ed1 100644
--- a/nuttx/include/nuttx/arch.h
+++ b/nuttx/include/nuttx/arch.h
@@ -57,7 +57,7 @@
* Public Types
****************************************************************************/
-typedef CODE void (*sig_deliver_t)(FAR _TCB *tcb);
+typedef CODE void (*sig_deliver_t)(FAR struct tcb_s *tcb);
/****************************************************************************
* Public Variables
@@ -129,7 +129,7 @@ void up_idle(void);
*
****************************************************************************/
-void up_initial_state(FAR _TCB *tcb);
+void up_initial_state(FAR struct tcb_s *tcb);
/****************************************************************************
* Name: up_create_stack
@@ -154,7 +154,7 @@ void up_initial_state(FAR _TCB *tcb);
****************************************************************************/
#ifndef CONFIG_CUSTOM_STACK
-int up_create_stack(FAR _TCB *tcb, size_t stack_size);
+int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size);
#endif
/****************************************************************************
@@ -179,7 +179,7 @@ int up_create_stack(FAR _TCB *tcb, size_t stack_size);
****************************************************************************/
#ifndef CONFIG_CUSTOM_STACK
-int up_use_stack(FAR _TCB *tcb, FAR void *stack, size_t stack_size);
+int up_use_stack(FAR struct tcb_s *tcb, FAR void *stack, size_t stack_size);
#endif
/****************************************************************************
@@ -192,7 +192,7 @@ int up_use_stack(FAR _TCB *tcb, FAR void *stack, size_t stack_size);
****************************************************************************/
#ifndef CONFIG_CUSTOM_STACK
-void up_release_stack(FAR _TCB *dtcb);
+void up_release_stack(FAR struct tcb_s *dtcb);
#endif
/****************************************************************************
@@ -215,7 +215,7 @@ void up_release_stack(FAR _TCB *dtcb);
*
****************************************************************************/
-void up_unblock_task(FAR _TCB *tcb);
+void up_unblock_task(FAR struct tcb_s *tcb);
/****************************************************************************
* Name: up_block_task
@@ -241,7 +241,7 @@ void up_unblock_task(FAR _TCB *tcb);
*
****************************************************************************/
-void up_block_task(FAR _TCB *tcb, tstate_t task_state);
+void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state);
/****************************************************************************
* Name: up_release_pending
@@ -286,7 +286,7 @@ void up_release_pending(void);
*
****************************************************************************/
-void up_reprioritize_rtr(FAR _TCB *tcb, uint8_t priority);
+void up_reprioritize_rtr(FAR struct tcb_s *tcb, uint8_t priority);
/****************************************************************************
* Name: _exit
@@ -348,7 +348,7 @@ void up_reprioritize_rtr(FAR _TCB *tcb, uint8_t priority);
****************************************************************************/
#ifndef CONFIG_DISABLE_SIGNALS
-void up_schedule_sigaction(FAR _TCB *tcb, sig_deliver_t sigdeliver);
+void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver);
#endif
/****************************************************************************
@@ -542,7 +542,7 @@ int up_addrenv_destroy(task_addrenv_t addrenv);
****************************************************************************/
#ifdef CONFIG_ADDRENV
-int up_addrenv_assign(task_addrenv_t addrenv, FAR _TCB *tcb);
+int up_addrenv_assign(task_addrenv_t addrenv, FAR struct tcb_s *tcb);
#endif
/****************************************************************************
@@ -564,7 +564,7 @@ int up_addrenv_assign(task_addrenv_t addrenv, FAR _TCB *tcb);
****************************************************************************/
#ifdef CONFIG_ADDRENV
-int up_addrenv_share(FAR const _TCB *ptcb, FAR _TCB *ctcb);
+int up_addrenv_share(FAR const struct tcb_s *ptcb, FAR struct tcb_s *ctcb);
#endif
/****************************************************************************
@@ -586,7 +586,7 @@ int up_addrenv_share(FAR const _TCB *ptcb, FAR _TCB *ctcb);
****************************************************************************/
#ifdef CONFIG_ADDRENV
-int up_addrenv_release(FAR _TCB *tcb);
+int up_addrenv_release(FAR struct tcb_s *tcb);
#endif
/****************************************************************************
diff --git a/nuttx/include/nuttx/fs/fs.h b/nuttx/include/nuttx/fs/fs.h
index 93ca2a334..c11084dee 100644
--- a/nuttx/include/nuttx/fs/fs.h
+++ b/nuttx/include/nuttx/fs/fs.h
@@ -590,13 +590,8 @@ int close_blockdriver(FAR struct inode *inode);
****************************************************************************/
#if CONFIG_NFILE_STREAMS > 0
-
-#ifndef __TCB_DEFINED__
-typedef struct _TCB _TCB;
-#define __TCB_DEFINED__
-#endif
-
-FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR _TCB *tcb);
+struct tcb_s; /* Forward reference */
+FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR struct tcb_s *tcb);
#endif
/* lib/stdio/lib_fflush.c **************************************************/
diff --git a/nuttx/include/nuttx/page.h b/nuttx/include/nuttx/page.h
index 2502e16ee..8098971be 100644
--- a/nuttx/include/nuttx/page.h
+++ b/nuttx/include/nuttx/page.h
@@ -2,7 +2,7 @@
* include/nuttx/page.h
* This file defines interfaces used to support NuttX On-Demand Paging.
*
- * Copyright (C) 2010 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2010, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -232,7 +232,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
-extern "C" {
+extern "C"
+{
#else
#define EXTERN extern
#endif
@@ -308,7 +309,7 @@ extern "C" {
*
****************************************************************************/
-EXTERN void pg_miss(void);
+void pg_miss(void);
/****************************************************************************
* Public Functions -- Provided by architecture-specific logic to common
@@ -345,7 +346,7 @@ EXTERN void pg_miss(void);
*
****************************************************************************/
-EXTERN bool up_checkmapping(FAR _TCB *tcb);
+bool up_checkmapping(FAR struct tcb_s *tcb);
/****************************************************************************
* Name: up_allocpage()
@@ -396,7 +397,7 @@ EXTERN bool up_checkmapping(FAR _TCB *tcb);
*
****************************************************************************/
-EXTERN int up_allocpage(FAR _TCB *tcb, FAR void **vpage);
+int up_allocpage(FAR struct tcb_s *tcb, FAR void **vpage);
/****************************************************************************
* Name: up_fillpage()
@@ -451,10 +452,11 @@ EXTERN int up_allocpage(FAR _TCB *tcb, FAR void **vpage);
****************************************************************************/
#ifdef CONFIG_PAGING_BLOCKINGFILL
-EXTERN int up_fillpage(FAR _TCB *tcb, FAR void *vpage);
+int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage);
#else
-typedef void (*up_pgcallback_t)(FAR _TCB *tcb, int result);
-EXTERN int up_fillpage(FAR _TCB *tcb, FAR void *vpage, up_pgcallback_t pg_callback);
+typedef void (*up_pgcallback_t)(FAR struct tcb_s *tcb, int result);
+int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage,
+ up_pgcallback_t pg_callback);
#endif
#undef EXTERN
diff --git a/nuttx/include/nuttx/sched.h b/nuttx/include/nuttx/sched.h
index 082ce65dd..68afb3bf5 100644
--- a/nuttx/include/nuttx/sched.h
+++ b/nuttx/include/nuttx/sched.h
@@ -108,7 +108,7 @@
#define MAX_LOCK_COUNT 127
-/* Values for the _TCB flags bits */
+/* Values for the struct tcb_s flags bits */
#define TCB_FLAG_TTYPE_SHIFT (0) /* Bits 0-1: thread type */
#define TCB_FLAG_TTYPE_MASK (3 << TCB_FLAG_TTYPE_SHIFT)
@@ -140,10 +140,10 @@
#ifndef __ASSEMBLY__
/* General Task Management Types ************************************************/
-
/* This is the type of the task_state field of the TCB. NOTE: the order and
* content of this enumeration is critical since there are some OS tables indexed
- * by these values. The range of values is assumed to fit into a uint8_t in _TCB.
+ * by these values. The range of values is assumed to fit into a uint8_t in
+ * struct tcb_s.
*/
enum tstate_e
@@ -386,17 +386,17 @@ struct task_group_s
};
#endif
-/* _TCB **************************************************************************/
-/* This is the task control block (TCB). Each task or thread is represented by
- * a TCB. The TCB is the heart of the NuttX task-control logic.
+/* struct tcb_s ******************************************************************/
+/* This is the common part of the task control block (TCB). Each task or thread
+ * is represented by a TCB. The TCB is the heart of the NuttX task-control logic.
*/
-struct _TCB
+struct tcb_s
{
/* Fields used to support list management *************************************/
- FAR struct _TCB *flink; /* Doubly linked list */
- FAR struct _TCB *blink;
+ FAR struct tcb_s *flink; /* Doubly linked list */
+ FAR struct tcb_s *blink;
/* Task Group *****************************************************************/
@@ -512,18 +512,9 @@ struct _TCB
#endif
};
-/* Certain other header files may also define this time to avoid circular header
- * file inclusion issues.
- */
-
-#ifndef __TCB_DEFINED__
-typedef struct _TCB _TCB;
-#define __TCB_DEFINED__
-#endif
-
/* This is the callback type used by sched_foreach() */
-typedef void (*sched_foreach_t)(FAR _TCB *tcb, FAR void *arg);
+typedef void (*sched_foreach_t)(FAR struct tcb_s *tcb, FAR void *arg);
#endif /* __ASSEMBLY__ */
@@ -547,7 +538,7 @@ extern "C"
/* TCB helpers */
-FAR _TCB *sched_self(void);
+FAR struct tcb_s *sched_self(void);
/* File system helpers */
@@ -565,7 +556,7 @@ FAR struct socketlist *sched_getsockets(void);
/* Setup up a start hook */
#ifdef CONFIG_SCHED_STARTHOOK
-void task_starthook(FAR _TCB *tcb, starthook_t starthook, FAR void *arg);
+void task_starthook(FAR struct tcb_s *tcb, starthook_t starthook, FAR void *arg);
#endif
/* Internal vfork support.The overall sequence is:
@@ -590,9 +581,9 @@ void task_starthook(FAR _TCB *tcb, starthook_t starthook, FAR void *arg);
* task_vforkabort() may be called if an error occurs between steps 3 and 6.
*/
-FAR _TCB *task_vforksetup(start_t retaddr);
-pid_t task_vforkstart(FAR _TCB *child);
-void task_vforkabort(FAR _TCB *child, int errcode);
+FAR struct tcb_s *task_vforksetup(start_t retaddr);
+pid_t task_vforkstart(FAR struct tcb_s *child);
+void task_vforkabort(FAR struct tcb_s *child, int errcode);
/* sched_foreach will enumerate over each task and provide the
* TCB of each task to a user callback functions. Interrupts
diff --git a/nuttx/include/sched.h b/nuttx/include/sched.h
index 804dd47cd..c9ff6d248 100644
--- a/nuttx/include/sched.h
+++ b/nuttx/include/sched.h
@@ -1,7 +1,7 @@
/********************************************************************************
* include/sched.h
*
- * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009, 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -110,17 +110,17 @@ extern "C"
/* Task Control Interfaces (non-standard) */
#ifndef CONFIG_CUSTOM_STACK
-int task_init(FAR _TCB *tcb, const char *name, int priority,
+int task_init(FAR struct tcb_s *tcb, const char *name, int priority,
FAR uint32_t *stack, uint32_t stack_size, main_t entry,
FAR char * const argv[]);
#else
-int task_init(FAR _TCB *tcb, const char *name, int priority, main_t entry,
- FAR char * const argv[]);
+int task_init(FAR struct tcb_s *tcb, const char *name, int priority,
+ main_t entry, FAR char * const argv[]);
#endif
-int task_activate(FAR _TCB *tcb);
+int task_activate(FAR struct tcb_s *tcb);
#ifndef CONFIG_CUSTOM_STACK
-int task_create(FAR const char *name, int priority, int stack_size, main_t entry,
- FAR char * const argv[]);
+int task_create(FAR const char *name, int priority, int stack_size,
+ main_t entry, FAR char * const argv[]);
#else
int task_create(FAR const char *name, int priority, main_t entry,
FAR char * const argv[]);
@@ -152,9 +152,10 @@ int sched_lockcount(void);
#ifdef CONFIG_SCHED_INSTRUMENTATION
-void sched_note_start(FAR _TCB *tcb);
-void sched_note_stop(FAR _TCB *tcb);
-void sched_note_switch(FAR _TCB *pFromTcb, FAR _TCB *pToTcb);
+void sched_note_start(FAR struct tcb_s *tcb);
+void sched_note_stop(FAR struct tcb_s *tcb);
+void sched_note_switch(FAR struct tcb_s *pFromTcb,
+ FAR struct tcb_s *pToTcb);
#else
# define sched_note_start(t)
diff --git a/nuttx/include/semaphore.h b/nuttx/include/semaphore.h
index 203118bd6..46f2c06ea 100644
--- a/nuttx/include/semaphore.h
+++ b/nuttx/include/semaphore.h
@@ -63,12 +63,13 @@ extern "C" {
/* This structure contains information about the holder of a semaphore */
#ifdef CONFIG_PRIORITY_INHERITANCE
+struct tcb_s; /* Forward reference */
struct semholder_s
{
#if CONFIG_SEM_PREALLOCHOLDERS > 0
struct semholder_s *flink; /* Implements singly linked list */
#endif
- void *htcb; /* Holder TCB (actual type is _TCB) */
+ FAR struct tcb_s *htcb; /* Holder TCB */
int16_t counts; /* Number of counts owned by this holder */
};
diff --git a/nuttx/sched/Kconfig b/nuttx/sched/Kconfig
index 097dd1993..f9ba37cea 100644
--- a/nuttx/sched/Kconfig
+++ b/nuttx/sched/Kconfig
@@ -26,9 +26,9 @@ config SCHED_INSTRUMENTATION
If enabled, then the board-specific logic must provide the following
functions (see include/sched.h):
- void sched_note_start(FAR _TCB *tcb);
- void sched_note_stop(FAR _TCB *tcb);
- void sched_note_switch(FAR _TCB *pFromTcb, FAR _TCB *pToTcb);
+ void sched_note_start(FAR struct tcb_s *tcb);
+ void sched_note_stop(FAR struct tcb_s *tcb);
+ void sched_note_switch(FAR struct tcb_s *pFromTcb, FAR struct tcb_s *pToTcb);
config TASK_NAME_SIZE
int "Maximum task name size"
diff --git a/nuttx/sched/atexit.c b/nuttx/sched/atexit.c
index f60598884..4539aa8ff 100644
--- a/nuttx/sched/atexit.c
+++ b/nuttx/sched/atexit.c
@@ -120,7 +120,7 @@ int atexit(void (*func)(void))
return on_exit((onexitfunc_t)func, NULL);
#elif defined(CONFIG_SCHED_ATEXIT_MAX) && CONFIG_SCHED_ATEXIT_MAX > 1
- FAR _TCB *tcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *tcb = (FAR struct tcb_s*)g_readytorun.head;
FAR struct task_group_s *group = tcb->group;
int index;
int ret = ERROR;
@@ -155,7 +155,7 @@ int atexit(void (*func)(void))
return ret;
#else
- FAR _TCB *tcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *tcb = (FAR struct tcb_s*)g_readytorun.head;
FAR struct task_group_s *group = tcb->group;
int ret = ERROR;
diff --git a/nuttx/sched/env_clearenv.c b/nuttx/sched/env_clearenv.c
index 062fd60ed..4724e2816 100644
--- a/nuttx/sched/env_clearenv.c
+++ b/nuttx/sched/env_clearenv.c
@@ -74,7 +74,7 @@
int clearenv(void)
{
- FAR _TCB *tcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *tcb = (FAR struct tcb_s*)g_readytorun.head;
DEBUGASSERT(tcb->group);
env_release(tcb->group);
diff --git a/nuttx/sched/env_dup.c b/nuttx/sched/env_dup.c
index 3b653b010..c7a10af48 100644
--- a/nuttx/sched/env_dup.c
+++ b/nuttx/sched/env_dup.c
@@ -81,7 +81,7 @@
int env_dup(FAR struct task_group_s *group)
{
- FAR _TCB *ptcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *ptcb = (FAR struct tcb_s*)g_readytorun.head;
FAR char *envp = NULL;
size_t envlen;
int ret = OK;
diff --git a/nuttx/sched/env_getenv.c b/nuttx/sched/env_getenv.c
index 4709bc380..0414e23aa 100644
--- a/nuttx/sched/env_getenv.c
+++ b/nuttx/sched/env_getenv.c
@@ -77,7 +77,7 @@
FAR char *getenv(const char *name)
{
- FAR _TCB *rtcb;
+ FAR struct tcb_s *rtcb;
FAR struct task_group_s *group;
FAR char *pvar;
FAR char *pvalue = NULL;
@@ -94,7 +94,7 @@ FAR char *getenv(const char *name)
/* Get a reference to the thread-private environ in the TCB.*/
sched_lock();
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
group = rtcb->group;
/* Check if the variable exists */
diff --git a/nuttx/sched/env_getenvironptr.c b/nuttx/sched/env_getenvironptr.c
index 25b09755b..91f3940b6 100644
--- a/nuttx/sched/env_getenvironptr.c
+++ b/nuttx/sched/env_getenvironptr.c
@@ -85,7 +85,7 @@ FAR char **get_environ_ptr( void )
/* Return a reference to the thread-private environ in the TCB.*/
- FAR _TCB *ptcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *ptcb = (FAR struct tcb_s*)g_readytorun.head;
if (ptcb->envp)
{
return &ptcb->envp->ev_env;
diff --git a/nuttx/sched/env_setenv.c b/nuttx/sched/env_setenv.c
index cfde71604..772b01160 100644
--- a/nuttx/sched/env_setenv.c
+++ b/nuttx/sched/env_setenv.c
@@ -85,7 +85,7 @@
int setenv(FAR const char *name, FAR const char *value, int overwrite)
{
- FAR _TCB *rtcb;
+ FAR struct tcb_s *rtcb;
FAR struct task_group_s *group;
FAR char *pvar;
FAR char *newenvp;
@@ -124,7 +124,7 @@ int setenv(FAR const char *name, FAR const char *value, int overwrite)
/* Get a reference to the thread-private environ in the TCB.*/
sched_lock();
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
group = rtcb->group;
DEBUGASSERT(group);
diff --git a/nuttx/sched/env_unsetenv.c b/nuttx/sched/env_unsetenv.c
index 8206a4ece..b41f58c38 100644
--- a/nuttx/sched/env_unsetenv.c
+++ b/nuttx/sched/env_unsetenv.c
@@ -77,7 +77,7 @@
int unsetenv(FAR const char *name)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
FAR struct task_group_s *group = rtcb->group;
FAR char *pvar;
FAR char *newenvp;
diff --git a/nuttx/sched/errno_getptr.c b/nuttx/sched/errno_getptr.c
index 0b27768da..841cb837c 100644
--- a/nuttx/sched/errno_getptr.c
+++ b/nuttx/sched/errno_getptr.c
@@ -91,7 +91,7 @@ FAR int *get_errno_ptr(void)
* logic (see, for example, task_deletecurrent.c).
*/
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
if (rtcb->task_state == TSTATE_TASK_RUNNING)
{
/* Yes.. the task is running normally. Return a reference to the
diff --git a/nuttx/sched/exit.c b/nuttx/sched/exit.c
index 7e50c273c..ec3f1b928 100644
--- a/nuttx/sched/exit.c
+++ b/nuttx/sched/exit.c
@@ -92,7 +92,7 @@
void exit(int status)
{
- _TCB *tcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *tcb = (struct tcb_s*)g_readytorun.head;
/* Only the lower 8-bits of status are used */
diff --git a/nuttx/sched/getpid.c b/nuttx/sched/getpid.c
index f41467d9f..259d78091 100644
--- a/nuttx/sched/getpid.c
+++ b/nuttx/sched/getpid.c
@@ -81,5 +81,5 @@ pid_t getpid(void)
* ready-to-run task list
*/
- return ((FAR _TCB*)g_readytorun.head)->pid;
+ return ((FAR struct tcb_s*)g_readytorun.head)->pid;
}
diff --git a/nuttx/sched/group_create.c b/nuttx/sched/group_create.c
index 58eb60606..414fe1824 100644
--- a/nuttx/sched/group_create.c
+++ b/nuttx/sched/group_create.c
@@ -174,7 +174,7 @@ void group_assigngid(FAR struct task_group_s *group)
*
*****************************************************************************/
-int group_allocate(FAR _TCB *tcb)
+int group_allocate(FAR struct tcb_s *tcb)
{
FAR struct task_group_s *group;
int ret;
@@ -241,7 +241,7 @@ int group_allocate(FAR _TCB *tcb)
*
*****************************************************************************/
-int group_initialize(FAR _TCB *tcb)
+int group_initialize(FAR struct tcb_s *tcb)
{
FAR struct task_group_s *group;
#ifdef HAVE_GROUP_MEMBERS
diff --git a/nuttx/sched/group_internal.h b/nuttx/sched/group_internal.h
index c949968cf..8936b9bbf 100644
--- a/nuttx/sched/group_internal.h
+++ b/nuttx/sched/group_internal.h
@@ -76,11 +76,11 @@ extern FAR struct task_group_s *g_grouphead;
/* Task group data structure management */
#ifdef HAVE_TASK_GROUP
-int group_allocate(FAR _TCB *tcb);
-int group_initialize(FAR _TCB *tcb);
-int group_bind(FAR _TCB *tcb);
-int group_join(FAR _TCB *tcb);
-void group_leave(FAR _TCB *tcb);
+int group_allocate(FAR struct tcb_s *tcb);
+int group_initialize(FAR struct tcb_s *tcb);
+int group_bind(FAR struct tcb_s *tcb);
+int group_join(FAR struct tcb_s *tcb);
+void group_leave(FAR struct tcb_s *tcb);
#ifdef HAVE_GROUP_MEMBERS
FAR struct task_group_s *group_find(gid_t gid);
@@ -122,10 +122,10 @@ void group_removechildren(FAR struct task_group_s *group);
/* Group data resource configuration */
#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0
-int group_setupidlefiles(FAR _TCB *tcb);
-int group_setuptaskfiles(FAR _TCB *tcb);
+int group_setupidlefiles(FAR struct tcb_s *tcb);
+int group_setuptaskfiles(FAR struct tcb_s *tcb);
#if CONFIG_NFILE_STREAMS > 0
-int group_setupstreams(FAR _TCB *tcb);
+int group_setupstreams(FAR struct tcb_s *tcb);
#endif
#endif
diff --git a/nuttx/sched/group_join.c b/nuttx/sched/group_join.c
index 70319b3a1..564fbe7e9 100644
--- a/nuttx/sched/group_join.c
+++ b/nuttx/sched/group_join.c
@@ -99,9 +99,9 @@
*
*****************************************************************************/
-int group_bind(FAR _TCB *tcb)
+int group_bind(FAR struct tcb_s *tcb)
{
- FAR _TCB *ptcb = (FAR _TCB *)g_readytorun.head;
+ FAR struct tcb_s *ptcb = (FAR struct tcb_s *)g_readytorun.head;
DEBUGASSERT(ptcb && tcb && ptcb->group && !tcb->group);
@@ -136,7 +136,7 @@ int group_bind(FAR _TCB *tcb)
*
*****************************************************************************/
-int group_join(FAR _TCB *tcb)
+int group_join(FAR struct tcb_s *tcb)
{
FAR struct task_group_s *group;
#ifdef HAVE_GROUP_MEMBERS
diff --git a/nuttx/sched/group_leave.c b/nuttx/sched/group_leave.c
index 30faafa4f..43a79c9bb 100644
--- a/nuttx/sched/group_leave.c
+++ b/nuttx/sched/group_leave.c
@@ -242,7 +242,7 @@ static inline void group_release(FAR struct task_group_s *group)
*****************************************************************************/
#ifdef HAVE_GROUP_MEMBERS
-void group_leave(FAR _TCB *tcb)
+void group_leave(FAR struct tcb_s *tcb)
{
FAR struct task_group_s *group;
@@ -277,7 +277,7 @@ void group_leave(FAR _TCB *tcb)
#else /* HAVE_GROUP_MEMBERS */
-void group_leave(FAR _TCB *tcb)
+void group_leave(FAR struct tcb_s *tcb)
{
FAR struct task_group_s *group;
diff --git a/nuttx/sched/group_setupidlefiles.c b/nuttx/sched/group_setupidlefiles.c
index ceb9f3e2c..d3e00660c 100644
--- a/nuttx/sched/group_setupidlefiles.c
+++ b/nuttx/sched/group_setupidlefiles.c
@@ -78,7 +78,7 @@
*
****************************************************************************/
-int group_setupidlefiles(FAR _TCB *tcb)
+int group_setupidlefiles(FAR struct tcb_s *tcb)
{
#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0
FAR struct task_group_s *group = tcb->group;
diff --git a/nuttx/sched/group_setupstreams.c b/nuttx/sched/group_setupstreams.c
index 08399ae41..377ee9e97 100644
--- a/nuttx/sched/group_setupstreams.c
+++ b/nuttx/sched/group_setupstreams.c
@@ -72,7 +72,7 @@
*
****************************************************************************/
-int group_setupstreams(FAR _TCB *tcb)
+int group_setupstreams(FAR struct tcb_s *tcb)
{
DEBUGASSERT(tcb && tcb->group);
diff --git a/nuttx/sched/group_setuptaskfiles.c b/nuttx/sched/group_setuptaskfiles.c
index e2e7d4634..8d1895c94 100644
--- a/nuttx/sched/group_setuptaskfiles.c
+++ b/nuttx/sched/group_setuptaskfiles.c
@@ -85,11 +85,11 @@
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_FDCLONE_DISABLE)
-static inline void sched_dupfiles(FAR _TCB *tcb)
+static inline void sched_dupfiles(FAR struct tcb_s *tcb)
{
/* The parent task is the one at the head of the ready-to-run list */
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
FAR struct file *parent;
FAR struct file *child;
int i;
@@ -143,11 +143,11 @@ static inline void sched_dupfiles(FAR _TCB *tcb)
****************************************************************************/
#if CONFIG_NSOCKET_DESCRIPTORS > 0 && !defined(CONFIG_SDCLONE_DISABLE)
-static inline void sched_dupsockets(FAR _TCB *tcb)
+static inline void sched_dupsockets(FAR struct tcb_s *tcb)
{
/* The parent task is the one at the head of the ready-to-run list */
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
FAR struct socket *parent;
FAR struct socket *child;
int i;
@@ -206,7 +206,7 @@ static inline void sched_dupsockets(FAR _TCB *tcb)
*
****************************************************************************/
-int group_setuptaskfiles(FAR _TCB *tcb)
+int group_setuptaskfiles(FAR struct tcb_s *tcb)
{
#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0
FAR struct task_group_s *group = tcb->group;
diff --git a/nuttx/sched/group_signal.c b/nuttx/sched/group_signal.c
index 009ab7a55..dcea62eb7 100644
--- a/nuttx/sched/group_signal.c
+++ b/nuttx/sched/group_signal.c
@@ -92,7 +92,7 @@
int group_signal(FAR struct task_group_s *group, FAR siginfo_t *info)
{
#ifdef HAVE_GROUP_MEMBERS
- FAR _TCB *gtcb;
+ FAR struct tcb_s *gtcb;
int i;
DEBUGASSERT(group && info);
@@ -151,7 +151,7 @@ int group_signal(FAR struct task_group_s *group, FAR siginfo_t *info)
*
*****************************************************************************/
-int group_signalmember(FAR _TCB *tcb, FAR siginfo_t *info)
+int group_signalmember(FAR struct tcb_s *tcb, FAR siginfo_t *info)
{
#ifdef HAVE_GROUP_MEMBERS
DEBUGASSERT(tcb);
diff --git a/nuttx/sched/mq_close.c b/nuttx/sched/mq_close.c
index 464056ce0..0ca13bd56 100644
--- a/nuttx/sched/mq_close.c
+++ b/nuttx/sched/mq_close.c
@@ -113,7 +113,7 @@
int mq_close(mqd_t mqdes)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
FAR struct task_group_s *group = rtcb->group;
FAR msgq_t *msgq;
irqstate_t saved_state;
diff --git a/nuttx/sched/mq_descreate.c b/nuttx/sched/mq_descreate.c
index 3fe696fc5..0b315e7cd 100644
--- a/nuttx/sched/mq_descreate.c
+++ b/nuttx/sched/mq_descreate.c
@@ -135,7 +135,7 @@ static mqd_t mq_desalloc(void)
*
****************************************************************************/
-mqd_t mq_descreate(FAR _TCB* mtcb, FAR msgq_t* msgq, int oflags)
+mqd_t mq_descreate(FAR struct tcb_s* mtcb, FAR msgq_t* msgq, int oflags)
{
FAR struct task_group_s *group = mtcb->group;
mqd_t mqdes;
diff --git a/nuttx/sched/mq_internal.h b/nuttx/sched/mq_internal.h
index 90072cb60..5a05d9da8 100644
--- a/nuttx/sched/mq_internal.h
+++ b/nuttx/sched/mq_internal.h
@@ -149,14 +149,14 @@ EXTERN sq_queue_t g_desfree;
void weak_function mq_initialize(void);
void mq_desblockalloc(void);
-mqd_t mq_descreate(FAR _TCB* mtcb, FAR msgq_t* msgq, int oflags);
+mqd_t mq_descreate(FAR struct tcb_s* mtcb, FAR msgq_t* msgq, int oflags);
FAR msgq_t *mq_findnamed(const char *mq_name);
void mq_msgfree(FAR mqmsg_t *mqmsg);
void mq_msgqfree(FAR msgq_t *msgq);
/* mq_waitirq.c ************************************************************/
-void mq_waitirq(FAR _TCB *wtcb, int errcode);
+void mq_waitirq(FAR struct tcb_s *wtcb, int errcode);
/* mq_rcvinternal.c ********************************************************/
diff --git a/nuttx/sched/mq_notify.c b/nuttx/sched/mq_notify.c
index 589bee312..3cff48a2b 100644
--- a/nuttx/sched/mq_notify.c
+++ b/nuttx/sched/mq_notify.c
@@ -1,7 +1,7 @@
/************************************************************************
* sched/mq_notify.c
*
- * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2009, 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -126,9 +126,9 @@
int mq_notify(mqd_t mqdes, const struct sigevent *notification)
{
- _TCB *rtcb;
+ struct tcb_s *rtcb;
msgq_t *msgq;
- int errval;
+ int errval;
/* Was a valid message queue descriptor provided? */
@@ -147,7 +147,7 @@ int mq_notify(mqd_t mqdes, const struct sigevent *notification)
/* Get the current process ID */
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
/* Is there already a notification attached */
diff --git a/nuttx/sched/mq_open.c b/nuttx/sched/mq_open.c
index 89d80f072..64c8389b1 100644
--- a/nuttx/sched/mq_open.c
+++ b/nuttx/sched/mq_open.c
@@ -109,12 +109,12 @@
mqd_t mq_open(const char *mq_name, int oflags, ...)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
- FAR msgq_t *msgq;
- mqd_t mqdes = NULL;
- va_list arg; /* Points to each un-named argument */
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
+ FAR msgq_t *msgq;
+ mqd_t mqdes = NULL;
+ va_list arg; /* Points to each un-named argument */
struct mq_attr *attr; /* MQ creation attributes */
- int namelen; /* Length of MQ name */
+ int namelen; /* Length of MQ name */
/* Make sure that a non-NULL name is supplied */
diff --git a/nuttx/sched/mq_rcvinternal.c b/nuttx/sched/mq_rcvinternal.c
index e80685e87..44f0edcb2 100644
--- a/nuttx/sched/mq_rcvinternal.c
+++ b/nuttx/sched/mq_rcvinternal.c
@@ -156,8 +156,8 @@ int mq_verifyreceive(mqd_t mqdes, void *msg, size_t msglen)
FAR mqmsg_t *mq_waitreceive(mqd_t mqdes)
{
- FAR _TCB *rtcb;
- FAR msgq_t *msgq;
+ FAR struct tcb_s *rtcb;
+ FAR msgq_t *msgq;
FAR mqmsg_t *rcvmsg;
/* Get a pointer to the message queue */
@@ -176,7 +176,7 @@ FAR mqmsg_t *mq_waitreceive(mqd_t mqdes)
{
/* Yes.. Block and try again */
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
rtcb->msgwaitq = msgq;
msgq->nwaitnotempty++;
@@ -247,10 +247,10 @@ FAR mqmsg_t *mq_waitreceive(mqd_t mqdes)
ssize_t mq_doreceive(mqd_t mqdes, mqmsg_t *mqmsg, void *ubuffer, int *prio)
{
- FAR _TCB *btcb;
- irqstate_t saved_state;
+ FAR struct tcb_s *btcb;
+ irqstate_t saved_state;
FAR msgq_t *msgq;
- ssize_t rcvmsglen;
+ ssize_t rcvmsglen;
/* Get the length of the message (also the return value) */
@@ -283,7 +283,7 @@ ssize_t mq_doreceive(mqd_t mqdes, mqmsg_t *mqmsg, void *ubuffer, int *prio)
*/
saved_state = irqsave();
- for (btcb = (FAR _TCB*)g_waitingformqnotfull.head;
+ for (btcb = (FAR struct tcb_s*)g_waitingformqnotfull.head;
btcb && btcb->msgwaitq != msgq;
btcb = btcb->flink);
diff --git a/nuttx/sched/mq_sndinternal.c b/nuttx/sched/mq_sndinternal.c
index f16f7de1a..e65b51c5a 100644
--- a/nuttx/sched/mq_sndinternal.c
+++ b/nuttx/sched/mq_sndinternal.c
@@ -1,7 +1,7 @@
/****************************************************************************
* sched/mq_send.c
*
- * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -249,8 +249,8 @@ FAR mqmsg_t *mq_msgalloc(void)
int mq_waitsend(mqd_t mqdes)
{
- FAR _TCB *rtcb;
- FAR msgq_t *msgq;
+ FAR struct tcb_s *rtcb;
+ FAR msgq_t *msgq;
/* Get a pointer to the message queue */
@@ -288,7 +288,7 @@ int mq_waitsend(mqd_t mqdes)
* When we are unblocked, we will try again
*/
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
rtcb->msgwaitq = msgq;
msgq->nwaitnotfull++;
@@ -336,11 +336,11 @@ int mq_waitsend(mqd_t mqdes)
int mq_dosend(mqd_t mqdes, FAR mqmsg_t *mqmsg, const void *msg, size_t msglen, int prio)
{
- FAR _TCB *btcb;
- FAR msgq_t *msgq;
+ FAR struct tcb_s *btcb;
+ FAR msgq_t *msgq;
FAR mqmsg_t *next;
FAR mqmsg_t *prev;
- irqstate_t saved_state;
+ irqstate_t saved_state;
/* Get a pointer to the message queue */
@@ -430,7 +430,7 @@ int mq_dosend(mqd_t mqdes, FAR mqmsg_t *mqmsg, const void *msg, size_t msglen, i
* interrupts should never cause a change in this list
*/
- for (btcb = (FAR _TCB*)g_waitingformqnotempty.head;
+ for (btcb = (FAR struct tcb_s*)g_waitingformqnotempty.head;
btcb && btcb->msgwaitq != msgq;
btcb = btcb->flink);
diff --git a/nuttx/sched/mq_timedreceive.c b/nuttx/sched/mq_timedreceive.c
index 0df904830..0e68ecc67 100644
--- a/nuttx/sched/mq_timedreceive.c
+++ b/nuttx/sched/mq_timedreceive.c
@@ -94,7 +94,7 @@
static void mq_rcvtimeout(int argc, uint32_t pid)
{
- FAR _TCB *wtcb;
+ FAR struct tcb_s *wtcb;
irqstate_t saved_state;
/* Disable interrupts. This is necessary because an interrupt handler may
diff --git a/nuttx/sched/mq_timedsend.c b/nuttx/sched/mq_timedsend.c
index 745cc6272..d48dd32ce 100644
--- a/nuttx/sched/mq_timedsend.c
+++ b/nuttx/sched/mq_timedsend.c
@@ -93,7 +93,7 @@
static void mq_sndtimeout(int argc, uint32_t pid)
{
- FAR _TCB *wtcb;
+ FAR struct tcb_s *wtcb;
irqstate_t saved_state;
/* Disable interrupts. This is necessary because an interrupt handler may
diff --git a/nuttx/sched/mq_waitirq.c b/nuttx/sched/mq_waitirq.c
index 94a15df3c..c12de1675 100644
--- a/nuttx/sched/mq_waitirq.c
+++ b/nuttx/sched/mq_waitirq.c
@@ -90,7 +90,7 @@
*
****************************************************************************/
-void mq_waitirq(FAR _TCB *wtcb, int errcode)
+void mq_waitirq(FAR struct tcb_s *wtcb, int errcode)
{
FAR msgq_t *msgq;
irqstate_t saved_state;
diff --git a/nuttx/sched/on_exit.c b/nuttx/sched/on_exit.c
index 89c4a2d57..ef3c31631 100644
--- a/nuttx/sched/on_exit.c
+++ b/nuttx/sched/on_exit.c
@@ -115,7 +115,7 @@
int on_exit(CODE void (*func)(int, FAR void *), FAR void *arg)
{
#if defined(CONFIG_SCHED_ONEXIT_MAX) && CONFIG_SCHED_ONEXIT_MAX > 1
- FAR _TCB *tcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *tcb = (FAR struct tcb_s*)g_readytorun.head;
FAR struct task_group_s *group = tcb->group;
int index;
int ret = ENOSPC;
@@ -150,7 +150,7 @@ int on_exit(CODE void (*func)(int, FAR void *), FAR void *arg)
return ret;
#else
- FAR _TCB *tcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *tcb = (FAR struct tcb_s*)g_readytorun.head;
FAR struct task_group_s *group = tcb->group;
int ret = ENOSPC;
diff --git a/nuttx/sched/os_internal.h b/nuttx/sched/os_internal.h
index 73bff3422..22f69e53d 100644
--- a/nuttx/sched/os_internal.h
+++ b/nuttx/sched/os_internal.h
@@ -114,7 +114,7 @@ enum os_crash_codes_e
/* A more efficient ways to access the errno */
#define SET_ERRNO(e) \
- { _TCB *rtcb = _TCB*)g_readytorun.head; rtcb->pterrno = (e); }
+ { struct tcb_s *rtcb = struct tcb_s*)g_readytorun.head; rtcb->pterrno = (e); }
#define _SET_TCB_ERRNO(t,e) \
{ (t)->pterrno = (e); }
@@ -130,8 +130,8 @@ enum os_crash_codes_e
struct pidhash_s
{
- FAR _TCB *tcb;
- pid_t pid;
+ FAR struct tcb_s *tcb;
+ pid_t pid;
};
typedef struct pidhash_s pidhash_t;
@@ -257,10 +257,10 @@ int os_bringup(void);
void weak_function task_initialize(void);
#endif
void task_start(void);
-int task_schedsetup(FAR _TCB *tcb, int priority, start_t start,
+int task_schedsetup(FAR struct tcb_s *tcb, int priority, start_t start,
main_t main, uint8_t ttype);
-int task_argsetup(FAR _TCB *tcb, FAR const char *name, FAR char * const argv[]);
-void task_exithook(FAR _TCB *tcb, int status);
+int task_argsetup(FAR struct tcb_s *tcb, FAR const char *name, FAR char * const argv[]);
+void task_exithook(FAR struct tcb_s *tcb, int status);
int task_deletecurrent(void);
#ifndef CONFIG_CUSTOM_STACK
@@ -270,22 +270,22 @@ int kernel_thread(FAR const char *name, int priority, int stack_size,
int kernel_thread(FAR const char *name, int priority, main_t entry,
FAR char * const argv[]);
#endif
-bool sched_addreadytorun(FAR _TCB *rtrtcb);
-bool sched_removereadytorun(FAR _TCB *rtrtcb);
-bool sched_addprioritized(FAR _TCB *newTcb, DSEG dq_queue_t *list);
+bool sched_addreadytorun(FAR struct tcb_s *rtrtcb);
+bool sched_removereadytorun(FAR struct tcb_s *rtrtcb);
+bool sched_addprioritized(FAR struct tcb_s *newTcb, DSEG dq_queue_t *list);
bool sched_mergepending(void);
-void sched_addblocked(FAR _TCB *btcb, tstate_t task_state);
-void sched_removeblocked(FAR _TCB *btcb);
-int sched_setpriority(FAR _TCB *tcb, int sched_priority);
+void sched_addblocked(FAR struct tcb_s *btcb, tstate_t task_state);
+void sched_removeblocked(FAR struct tcb_s *btcb);
+int sched_setpriority(FAR struct tcb_s *tcb, int sched_priority);
#ifdef CONFIG_PRIORITY_INHERITANCE
-int sched_reprioritize(FAR _TCB *tcb, int sched_priority);
+int sched_reprioritize(FAR struct tcb_s *tcb, int sched_priority);
#else
# define sched_reprioritize(tcb,sched_priority) sched_setpriority(tcb,sched_priority)
#endif
-FAR _TCB *sched_gettcb(pid_t pid);
-bool sched_verifytcb(FAR _TCB *tcb);
+FAR struct tcb_s *sched_gettcb(pid_t pid);
+bool sched_verifytcb(FAR struct tcb_s *tcb);
-int sched_releasetcb(FAR _TCB *tcb);
+int sched_releasetcb(FAR struct tcb_s *tcb);
void sched_garbagecollection(void);
#endif /* __SCHED_OS_INTERNAL_H */
diff --git a/nuttx/sched/os_start.c b/nuttx/sched/os_start.c
index c60edc495..fd13865db 100644
--- a/nuttx/sched/os_start.c
+++ b/nuttx/sched/os_start.c
@@ -204,7 +204,7 @@ const tasklist_t g_tasklisttable[NUM_TASK_STATES] =
* that user init task is responsible for bringing up the rest of the system
*/
-static FAR _TCB g_idletcb;
+static FAR struct tcb_s g_idletcb;
/* This is the name of the idle task */
@@ -272,7 +272,7 @@ void os_start(void)
* that has pid == 0 and sched_priority == 0.
*/
- bzero((void*)&g_idletcb, sizeof(_TCB));
+ bzero((void*)&g_idletcb, sizeof(struct tcb_s));
g_idletcb.task_state = TSTATE_TASK_RUNNING;
g_idletcb.entry.main = (main_t)os_start;
diff --git a/nuttx/sched/pg_internal.h b/nuttx/sched/pg_internal.h
index e7bafcd91..ecece8650 100644
--- a/nuttx/sched/pg_internal.h
+++ b/nuttx/sched/pg_internal.h
@@ -98,7 +98,7 @@ extern pid_t g_pgworker;
* TSTATE_TASK_INVALID.
*/
-extern FAR _TCB *g_pftcb;
+extern FAR struct tcb_s *g_pftcb;
/****************************************************************************
* Public Function Prototypes
diff --git a/nuttx/sched/pg_miss.c b/nuttx/sched/pg_miss.c
index 8a649a6d5..32c9c5bb8 100644
--- a/nuttx/sched/pg_miss.c
+++ b/nuttx/sched/pg_miss.c
@@ -121,8 +121,8 @@
void pg_miss(void)
{
- FAR _TCB *ftcb = (FAR _TCB*)g_readytorun.head;
- FAR _TCB *wtcb;
+ FAR struct tcb_s *ftcb = (FAR struct tcb_s*)g_readytorun.head;
+ FAR struct tcb_s *wtcb;
/* Sanity checking
*
diff --git a/nuttx/sched/pg_worker.c b/nuttx/sched/pg_worker.c
index 4a18ec9a3..b1380111a 100644
--- a/nuttx/sched/pg_worker.c
+++ b/nuttx/sched/pg_worker.c
@@ -91,7 +91,7 @@ pid_t g_pgworker;
* TSTATE_TASK_INVALID.
*/
-FAR _TCB *g_pftcb;
+FAR struct tcb_s *g_pftcb;
/****************************************************************************
* Private Variables
@@ -155,15 +155,15 @@ status uint32_t g_starttime;
****************************************************************************/
#ifndef CONFIG_PAGING_BLOCKINGFILL
-static void pg_callback(FAR _TCB *tcb, int result)
+static void pg_callback(FAR struct tcb_s *tcb, int result)
{
/* Verify that g_pftcb is non-NULL */
pgllvdbg("g_pftcb: %p\n", g_pftcb);
if (g_pftcb)
{
- FAR _TCB *htcb = (FAR _TCB *)g_waitingforfill.head;
- FAR _TCB *wtcb = sched_gettcb(g_pgworker);
+ FAR struct tcb_s *htcb = (FAR struct tcb_s *)g_waitingforfill.head;
+ FAR struct tcb_s *wtcb = sched_gettcb(g_pgworker);
/* Find the higher priority between the task waiting for the fill to
* complete in g_pftcb and the task waiting at the head of the
@@ -249,7 +249,7 @@ static inline bool pg_dequeue(void)
{
/* Remove the TCB from the head of the list (if any) */
- g_pftcb = (FAR _TCB *)dq_remfirst((dq_queue_t*)&g_waitingforfill);
+ g_pftcb = (FAR struct tcb_s *)dq_remfirst((dq_queue_t*)&g_waitingforfill);
pgllvdbg("g_pftcb: %p\n", g_pftcb);
if (g_pftcb != NULL)
{
@@ -279,7 +279,7 @@ static inline bool pg_dequeue(void)
* if a new higher priority fill is required).
*/
- FAR _TCB *wtcb = (FAR _TCB *)g_readytorun.head;
+ FAR struct tcb_s *wtcb = (FAR struct tcb_s *)g_readytorun.head;
if (wtcb->sched_priority > CONFIG_PAGING_DEFPRIO &&
wtcb->sched_priority > g_pftcb->sched_priority)
{
@@ -456,7 +456,7 @@ static inline bool pg_startfill(void)
static inline void pg_alldone(void)
{
- FAR _TCB *wtcb = (FAR _TCB *)g_readytorun.head;
+ FAR struct tcb_s *wtcb = (FAR struct tcb_s *)g_readytorun.head;
g_pftcb = NULL;
pgllvdbg("New worker priority. %d->%d\n",
wtcb->sched_priority, CONFIG_PAGING_DEFPRIO);
diff --git a/nuttx/sched/prctl.c b/nuttx/sched/prctl.c
index 3db83d3d7..c4cc13c6c 100644
--- a/nuttx/sched/prctl.c
+++ b/nuttx/sched/prctl.c
@@ -1,7 +1,7 @@
/************************************************************************
* sched/prctl.c
*
- * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -92,8 +92,8 @@ int prctl(int option, ...)
/* Get the prctl arguments */
FAR char *name = va_arg(ap, FAR char *);
- int pid = va_arg(ap, int);
- FAR _TCB *tcb;
+ int pid = va_arg(ap, int);
+ FAR struct tcb_s *tcb;
/* Get the TCB associated with the PID (handling the special case of
* pid==0 meaning "this thread")
@@ -101,7 +101,7 @@ int prctl(int option, ...)
if (!pid)
{
- tcb = (FAR _TCB *)g_readytorun.head;
+ tcb = (FAR struct tcb_s *)g_readytorun.head;
}
else
{
diff --git a/nuttx/sched/pthread_cancel.c b/nuttx/sched/pthread_cancel.c
index 4dd209aeb..6c114ba75 100644
--- a/nuttx/sched/pthread_cancel.c
+++ b/nuttx/sched/pthread_cancel.c
@@ -77,7 +77,7 @@
int pthread_cancel(pthread_t thread)
{
- _TCB *tcb;
+ struct tcb_s *tcb;
/* First, make sure that the handle references a valid thread */
@@ -132,7 +132,7 @@ int pthread_cancel(pthread_t thread)
* same as pthread_exit(PTHREAD_CANCELED).
*/
- if (tcb == (_TCB*)g_readytorun.head)
+ if (tcb == (struct tcb_s*)g_readytorun.head)
{
pthread_exit(PTHREAD_CANCELED);
}
diff --git a/nuttx/sched/pthread_create.c b/nuttx/sched/pthread_create.c
index 82a5bc271..956c0aed9 100644
--- a/nuttx/sched/pthread_create.c
+++ b/nuttx/sched/pthread_create.c
@@ -111,7 +111,7 @@ static const char g_pthreadname[] = "";
*
****************************************************************************/
-static void pthread_argsetup(FAR _TCB *tcb, pthread_addr_t arg)
+static void pthread_argsetup(FAR struct tcb_s *tcb, pthread_addr_t arg)
{
int i;
@@ -189,7 +189,7 @@ static inline void pthread_addjoininfo(FAR struct task_group_s *group,
static void pthread_start(void)
{
- FAR _TCB *ptcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *ptcb = (FAR struct tcb_s*)g_readytorun.head;
FAR struct task_group_s *group = ptcb->group;
FAR struct join_s *pjoin = (FAR struct join_s*)ptcb->joininfo;
pthread_addr_t exit_status;
@@ -247,7 +247,7 @@ static void pthread_start(void)
int pthread_create(FAR pthread_t *thread, FAR pthread_attr_t *attr,
pthread_startroutine_t start_routine, pthread_addr_t arg)
{
- FAR _TCB *ptcb;
+ FAR struct tcb_s *ptcb;
FAR struct join_s *pjoin;
int priority;
#if CONFIG_RR_INTERVAL > 0
@@ -266,7 +266,7 @@ int pthread_create(FAR pthread_t *thread, FAR pthread_attr_t *attr,
/* Allocate a TCB for the new task. */
- ptcb = (FAR _TCB*)kzalloc(sizeof(_TCB));
+ ptcb = (FAR struct tcb_s*)kzalloc(sizeof(struct tcb_s));
if (!ptcb)
{
return ENOMEM;
@@ -291,7 +291,7 @@ int pthread_create(FAR pthread_t *thread, FAR pthread_attr_t *attr,
*/
#ifdef CONFIG_ADDRENV
- ret = up_addrenv_share((FAR const _TCB *)g_readytorun.head, ptcb);
+ ret = up_addrenv_share((FAR const struct tcb_s *)g_readytorun.head, ptcb);
if (ret < 0)
{
errcode = -ret;
diff --git a/nuttx/sched/pthread_detach.c b/nuttx/sched/pthread_detach.c
index 6c4b17bee..78c0e4f94 100644
--- a/nuttx/sched/pthread_detach.c
+++ b/nuttx/sched/pthread_detach.c
@@ -97,7 +97,7 @@
int pthread_detach(pthread_t thread)
{
- FAR _TCB *rtcb = (FAR _TCB *)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s *)g_readytorun.head;
FAR struct task_group_s *group = rtcb->group;
FAR struct join_s *pjoin;
int ret;
diff --git a/nuttx/sched/pthread_getspecific.c b/nuttx/sched/pthread_getspecific.c
index c6c61fed6..065cb5a16 100644
--- a/nuttx/sched/pthread_getspecific.c
+++ b/nuttx/sched/pthread_getspecific.c
@@ -104,7 +104,7 @@
FAR void *pthread_getspecific(pthread_key_t key)
{
#if CONFIG_NPTHREAD_KEYS > 0
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
FAR struct task_group_s *group = rtcb->group;
FAR void *ret = NULL;
diff --git a/nuttx/sched/pthread_join.c b/nuttx/sched/pthread_join.c
index e5ff56734..92d3bfe69 100644
--- a/nuttx/sched/pthread_join.c
+++ b/nuttx/sched/pthread_join.c
@@ -102,7 +102,7 @@
int pthread_join(pthread_t thread, FAR pthread_addr_t *pexit_value)
{
- FAR _TCB *rtcb = (FAR _TCB *)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s *)g_readytorun.head;
FAR struct task_group_s *group = rtcb->group;
FAR struct join_s *pjoin;
int ret;
@@ -139,7 +139,7 @@ int pthread_join(pthread_t thread, FAR pthread_addr_t *pexit_value)
{
/* Determine what kind of error to return */
- FAR _TCB *tcb = sched_gettcb((pthread_t)thread);
+ FAR struct tcb_s *tcb = sched_gettcb((pthread_t)thread);
sdbg("Could not find thread data\n");
diff --git a/nuttx/sched/pthread_keycreate.c b/nuttx/sched/pthread_keycreate.c
index db09d035f..f9845960d 100644
--- a/nuttx/sched/pthread_keycreate.c
+++ b/nuttx/sched/pthread_keycreate.c
@@ -111,7 +111,7 @@
int pthread_key_create(FAR pthread_key_t *key, CODE void (*destructor)(void*))
{
#if CONFIG_NPTHREAD_KEYS > 0
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
FAR struct task_group_s *group = rtcb->group;
int ret = EAGAIN;
diff --git a/nuttx/sched/pthread_setcancelstate.c b/nuttx/sched/pthread_setcancelstate.c
index 2c6bf3083..834dc4a59 100644
--- a/nuttx/sched/pthread_setcancelstate.c
+++ b/nuttx/sched/pthread_setcancelstate.c
@@ -75,7 +75,7 @@
int pthread_setcancelstate(int state, FAR int *oldstate)
{
- _TCB *tcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *tcb = (struct tcb_s*)g_readytorun.head;
int ret = OK;
/* Suppress context changes for a bit so that the flags are stable. (the
diff --git a/nuttx/sched/pthread_setspecific.c b/nuttx/sched/pthread_setspecific.c
index 8d32772ef..cc792b3ce 100644
--- a/nuttx/sched/pthread_setspecific.c
+++ b/nuttx/sched/pthread_setspecific.c
@@ -115,7 +115,7 @@
int pthread_setspecific(pthread_key_t key, FAR void *value)
{
#if CONFIG_NPTHREAD_KEYS > 0
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
FAR struct task_group_s *group = rtcb->group;
int ret = EINVAL;
diff --git a/nuttx/sched/sched_addblocked.c b/nuttx/sched/sched_addblocked.c
index c0b80c8ac..66b10619b 100644
--- a/nuttx/sched/sched_addblocked.c
+++ b/nuttx/sched/sched_addblocked.c
@@ -88,7 +88,7 @@
*
************************************************************************/
-void sched_addblocked(FAR _TCB *btcb, tstate_t task_state)
+void sched_addblocked(FAR struct tcb_s *btcb, tstate_t task_state)
{
/* Make sure that we received a valid blocked state */
diff --git a/nuttx/sched/sched_addprioritized.c b/nuttx/sched/sched_addprioritized.c
index 20178fb9c..9940e1874 100644
--- a/nuttx/sched/sched_addprioritized.c
+++ b/nuttx/sched/sched_addprioritized.c
@@ -95,10 +95,10 @@
* match the state associated with the list.
************************************************************************/
-bool sched_addprioritized(FAR _TCB *tcb, DSEG dq_queue_t *list)
+bool sched_addprioritized(FAR struct tcb_s *tcb, DSEG dq_queue_t *list)
{
- FAR _TCB *next;
- FAR _TCB *prev;
+ FAR struct tcb_s *next;
+ FAR struct tcb_s *prev;
uint8_t sched_priority = tcb->sched_priority;
bool ret = false;
@@ -110,7 +110,7 @@ bool sched_addprioritized(FAR _TCB *tcb, DSEG dq_queue_t *list)
* Each is list is maintained in ascending sched_priority order.
*/
- for (next = (FAR _TCB*)list->head;
+ for (next = (FAR struct tcb_s*)list->head;
(next && sched_priority <= next->sched_priority);
next = next->flink);
@@ -123,7 +123,7 @@ bool sched_addprioritized(FAR _TCB *tcb, DSEG dq_queue_t *list)
{
/* The tcb goes at the end of the list. */
- prev = (FAR _TCB*)list->tail;
+ prev = (FAR struct tcb_s*)list->tail;
if (!prev)
{
/* Special case: The list is empty */
@@ -148,7 +148,7 @@ bool sched_addprioritized(FAR _TCB *tcb, DSEG dq_queue_t *list)
{
/* The tcb goes just before next */
- prev = (FAR _TCB*)next->blink;
+ prev = (FAR struct tcb_s*)next->blink;
if (!prev)
{
/* Special case: Insert at the head of the list */
diff --git a/nuttx/sched/sched_addreadytorun.c b/nuttx/sched/sched_addreadytorun.c
index 1e1829343..a30b7d8c5 100644
--- a/nuttx/sched/sched_addreadytorun.c
+++ b/nuttx/sched/sched_addreadytorun.c
@@ -98,9 +98,9 @@
*
****************************************************************************/
-bool sched_addreadytorun(FAR _TCB *btcb)
+bool sched_addreadytorun(FAR struct tcb_s *btcb)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
bool ret;
/* Check if pre-emption is disabled for the current running task and if
diff --git a/nuttx/sched/sched_getfiles.c b/nuttx/sched/sched_getfiles.c
index 95f5c44ec..abb051ef3 100644
--- a/nuttx/sched/sched_getfiles.c
+++ b/nuttx/sched/sched_getfiles.c
@@ -69,7 +69,7 @@
FAR struct filelist *sched_getfiles(void)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
FAR struct task_group_s *group = rtcb->group;
/* The group may be NULL under certain conditions. For example, if
diff --git a/nuttx/sched/sched_getparam.c b/nuttx/sched/sched_getparam.c
index 47eab4988..9fb829474 100644
--- a/nuttx/sched/sched_getparam.c
+++ b/nuttx/sched/sched_getparam.c
@@ -98,8 +98,8 @@
int sched_getparam (pid_t pid, struct sched_param * param)
{
- FAR _TCB *rtcb;
- FAR _TCB *tcb;
+ FAR struct tcb_s *rtcb;
+ FAR struct tcb_s *tcb;
int ret = OK;
if (!param)
@@ -109,7 +109,7 @@ int sched_getparam (pid_t pid, struct sched_param * param)
/* Check if the task to restart is the calling task */
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
if ((pid == 0) || (pid == rtcb->pid))
{
/* Return the priority if the calling task. */
diff --git a/nuttx/sched/sched_getscheduler.c b/nuttx/sched/sched_getscheduler.c
index 0d996ca27..4d0ed950a 100644
--- a/nuttx/sched/sched_getscheduler.c
+++ b/nuttx/sched/sched_getscheduler.c
@@ -100,13 +100,13 @@
int sched_getscheduler(pid_t pid)
{
- _TCB *tcb;
+ struct tcb_s *tcb;
/* Verify that the pid corresponds to a real task */
if (!pid)
{
- tcb = (_TCB*)g_readytorun.head;
+ tcb = (struct tcb_s*)g_readytorun.head;
}
else
{
diff --git a/nuttx/sched/sched_getsockets.c b/nuttx/sched/sched_getsockets.c
index ea988d6ff..17d1382ce 100644
--- a/nuttx/sched/sched_getsockets.c
+++ b/nuttx/sched/sched_getsockets.c
@@ -70,7 +70,7 @@
FAR struct socketlist *sched_getsockets(void)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
FAR struct task_group_s *group = rtcb->group;
DEBUGASSERT(group);
diff --git a/nuttx/sched/sched_getstreams.c b/nuttx/sched/sched_getstreams.c
index dab406e66..2e0dfecfc 100644
--- a/nuttx/sched/sched_getstreams.c
+++ b/nuttx/sched/sched_getstreams.c
@@ -69,7 +69,7 @@
FAR struct streamlist *sched_getstreams(void)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
FAR struct task_group_s *group = rtcb->group;
DEBUGASSERT(group);
diff --git a/nuttx/sched/sched_gettcb.c b/nuttx/sched/sched_gettcb.c
index 1e50ef50f..101f6d413 100644
--- a/nuttx/sched/sched_gettcb.c
+++ b/nuttx/sched/sched_gettcb.c
@@ -77,9 +77,9 @@
*
****************************************************************************/
-FAR _TCB *sched_gettcb(pid_t pid)
+FAR struct tcb_s *sched_gettcb(pid_t pid)
{
- FAR _TCB *ret = NULL;
+ FAR struct tcb_s *ret = NULL;
int hash_ndx;
/* Verify that the PID is within range */
diff --git a/nuttx/sched/sched_lock.c b/nuttx/sched/sched_lock.c
index 61a8a3bc8..90a39d27d 100644
--- a/nuttx/sched/sched_lock.c
+++ b/nuttx/sched/sched_lock.c
@@ -93,7 +93,7 @@
int sched_lock(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
/* Check for some special cases: (1) rtcb may be NULL only during
* early boot-up phases, and (2) sched_lock() should have no
diff --git a/nuttx/sched/sched_lockcount.c b/nuttx/sched/sched_lockcount.c
index 4dc7a8201..d1eccab40 100644
--- a/nuttx/sched/sched_lockcount.c
+++ b/nuttx/sched/sched_lockcount.c
@@ -91,7 +91,7 @@
int sched_lockcount(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
return (int)rtcb->lockcount;
}
diff --git a/nuttx/sched/sched_mergepending.c b/nuttx/sched/sched_mergepending.c
index 71d575c23..1364d2b1c 100644
--- a/nuttx/sched/sched_mergepending.c
+++ b/nuttx/sched/sched_mergepending.c
@@ -94,19 +94,19 @@
bool sched_mergepending(void)
{
- FAR _TCB *pndtcb;
- FAR _TCB *pndnext;
- FAR _TCB *rtrtcb;
- FAR _TCB *rtrprev;
+ FAR struct tcb_s *pndtcb;
+ FAR struct tcb_s *pndnext;
+ FAR struct tcb_s *rtrtcb;
+ FAR struct tcb_s *rtrprev;
bool ret = false;
/* Initialize the inner search loop */
- rtrtcb = (FAR _TCB*)g_readytorun.head;
+ rtrtcb = (FAR struct tcb_s*)g_readytorun.head;
/* Process every TCB in the g_pendingtasks list */
- for (pndtcb = (FAR _TCB*)g_pendingtasks.head; pndtcb; pndtcb = pndnext)
+ for (pndtcb = (FAR struct tcb_s*)g_pendingtasks.head; pndtcb; pndtcb = pndnext)
{
pndnext = pndtcb->flink;
diff --git a/nuttx/sched/sched_processtimer.c b/nuttx/sched/sched_processtimer.c
index 2224b7691..a065d007e 100644
--- a/nuttx/sched/sched_processtimer.c
+++ b/nuttx/sched/sched_processtimer.c
@@ -72,13 +72,13 @@
static void sched_process_timeslice(void)
{
#if CONFIG_RR_INTERVAL > 0
- _TCB *rtcb;
+ struct tcb_s *rtcb;
/* Check if the currently executing task uses round robin
* scheduling.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (struct tcb_s*)g_readytorun.head;
if ((rtcb->flags & TCB_FLAG_ROUND_ROBIN) != 0)
{
/* Yes, check if decrementing the timeslice counter
diff --git a/nuttx/sched/sched_releasetcb.c b/nuttx/sched/sched_releasetcb.c
index 02f7170c2..688c8bb93 100644
--- a/nuttx/sched/sched_releasetcb.c
+++ b/nuttx/sched/sched_releasetcb.c
@@ -93,7 +93,7 @@ static void sched_releasepid(pid_t pid)
*
************************************************************************/
-int sched_releasetcb(FAR _TCB *tcb)
+int sched_releasetcb(FAR struct tcb_s *tcb)
{
int ret = OK;
int i;
diff --git a/nuttx/sched/sched_removeblocked.c b/nuttx/sched/sched_removeblocked.c
index 8d5a127d2..c21f555ec 100644
--- a/nuttx/sched/sched_removeblocked.c
+++ b/nuttx/sched/sched_removeblocked.c
@@ -87,7 +87,7 @@
*
************************************************************************/
-void sched_removeblocked(FAR _TCB *btcb)
+void sched_removeblocked(FAR struct tcb_s *btcb)
{
tstate_t task_state = btcb->task_state;
diff --git a/nuttx/sched/sched_removereadytorun.c b/nuttx/sched/sched_removereadytorun.c
index 4982808e2..15dec43e0 100644
--- a/nuttx/sched/sched_removereadytorun.c
+++ b/nuttx/sched/sched_removereadytorun.c
@@ -90,7 +90,7 @@
*
****************************************************************************/
-bool sched_removereadytorun(FAR _TCB *rtcb)
+bool sched_removereadytorun(FAR struct tcb_s *rtcb)
{
bool ret = false;
diff --git a/nuttx/sched/sched_reprioritize.c b/nuttx/sched/sched_reprioritize.c
index bd316ec75..66a29c42b 100644
--- a/nuttx/sched/sched_reprioritize.c
+++ b/nuttx/sched/sched_reprioritize.c
@@ -102,7 +102,7 @@
*
****************************************************************************/
-int sched_reprioritize(FAR _TCB *tcb, int sched_priority)
+int sched_reprioritize(FAR struct tcb_s *tcb, int sched_priority)
{
/* This function is equivalent to sched_setpriority() BUT it also has the
* side effect of discarding all priority inheritance history. This is
diff --git a/nuttx/sched/sched_rrgetinterval.c b/nuttx/sched/sched_rrgetinterval.c
index 961c58ec5..0dd9ec040 100644
--- a/nuttx/sched/sched_rrgetinterval.c
+++ b/nuttx/sched/sched_rrgetinterval.c
@@ -107,7 +107,7 @@
int sched_rr_get_interval(pid_t pid, struct timespec *interval)
{
#if CONFIG_RR_INTERVAL > 0
- FAR _TCB *rrtcb;
+ FAR struct tcb_s *rrtcb;
/* If pid is zero, the timeslice for the calling process is written
* into 'interval.'
@@ -115,7 +115,7 @@ int sched_rr_get_interval(pid_t pid, struct timespec *interval)
if (!pid)
{
- rrtcb = (FAR _TCB*)g_readytorun.head;
+ rrtcb = (FAR struct tcb_s*)g_readytorun.head;
}
/* Return a special error code on invalid PID */
diff --git a/nuttx/sched/sched_self.c b/nuttx/sched/sched_self.c
index 9517e6306..901fb6e69 100644
--- a/nuttx/sched/sched_self.c
+++ b/nuttx/sched/sched_self.c
@@ -75,9 +75,9 @@
*
****************************************************************************/
-FAR _TCB *sched_self(void)
+FAR struct tcb_s *sched_self(void)
{
- return (FAR _TCB*)g_readytorun.head;
+ return (FAR struct tcb_s*)g_readytorun.head;
}
diff --git a/nuttx/sched/sched_setparam.c b/nuttx/sched/sched_setparam.c
index 6ea4e8f74..828f38101 100644
--- a/nuttx/sched/sched_setparam.c
+++ b/nuttx/sched/sched_setparam.c
@@ -1,7 +1,7 @@
/****************************************************************************
* sched/sched_setparam.c
*
- * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -107,9 +107,9 @@
int sched_setparam(pid_t pid, const struct sched_param *param)
{
- FAR _TCB *rtcb;
- FAR _TCB *tcb;
- int ret;
+ FAR struct tcb_s *rtcb;
+ FAR struct tcb_s *tcb;
+ int ret;
/* Verify that the requested priority is in the valid range */
@@ -127,7 +127,7 @@ int sched_setparam(pid_t pid, const struct sched_param *param)
/* Check if the task to reprioritize is the calling task */
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
if (pid == 0 || pid == rtcb->pid)
{
tcb = rtcb;
diff --git a/nuttx/sched/sched_setpriority.c b/nuttx/sched/sched_setpriority.c
index 6aa0789ea..4b5b9ccc1 100644
--- a/nuttx/sched/sched_setpriority.c
+++ b/nuttx/sched/sched_setpriority.c
@@ -1,7 +1,7 @@
/****************************************************************************
* sched/sched_setpriority.c
*
- * Copyright (C) 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -101,10 +101,10 @@
*
****************************************************************************/
-int sched_setpriority(FAR _TCB *tcb, int sched_priority)
+int sched_setpriority(FAR struct tcb_s *tcb, int sched_priority)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
- tstate_t task_state;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
+ tstate_t task_state;
irqstate_t saved_state;
/* Verify that the requested priority is in the valid range */
diff --git a/nuttx/sched/sched_setscheduler.c b/nuttx/sched/sched_setscheduler.c
index 7f7f345b4..682f50530 100644
--- a/nuttx/sched/sched_setscheduler.c
+++ b/nuttx/sched/sched_setscheduler.c
@@ -108,7 +108,7 @@
int sched_setscheduler(pid_t pid, int policy,
const struct sched_param *param)
{
- FAR _TCB *tcb;
+ FAR struct tcb_s *tcb;
#if CONFIG_RR_INTERVAL > 0
irqstate_t saved_state;
#endif
diff --git a/nuttx/sched/sched_unlock.c b/nuttx/sched/sched_unlock.c
index 5eafcfc9e..bb07b5b83 100644
--- a/nuttx/sched/sched_unlock.c
+++ b/nuttx/sched/sched_unlock.c
@@ -86,7 +86,7 @@
int sched_unlock(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
+ struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
/* Check for some special cases: (1) rtcb may be NULL only during
* early boot-up phases, and (2) sched_unlock() should have no
diff --git a/nuttx/sched/sched_verifytcb.c b/nuttx/sched/sched_verifytcb.c
index bcf097a5c..638acb361 100644
--- a/nuttx/sched/sched_verifytcb.c
+++ b/nuttx/sched/sched_verifytcb.c
@@ -77,7 +77,7 @@
*
****************************************************************************/
-bool sched_verifytcb(FAR _TCB *tcb)
+bool sched_verifytcb(FAR struct tcb_s *tcb)
{
/* Return true if the PID hashes to this TCB. */
diff --git a/nuttx/sched/sched_waitid.c b/nuttx/sched/sched_waitid.c
index 26804f344..e75cf4987 100644
--- a/nuttx/sched/sched_waitid.c
+++ b/nuttx/sched/sched_waitid.c
@@ -64,7 +64,7 @@
*****************************************************************************/
#ifdef CONFIG_SCHED_CHILD_STATUS
-static void exited_child(FAR _TCB *rtcb, FAR struct child_status_s *child,
+static void exited_child(FAR struct tcb_s *rtcb, FAR struct child_status_s *child,
FAR siginfo_t *info)
{
/* The child has exited. Return the saved exit status (and some fudged
@@ -153,8 +153,8 @@ static void exited_child(FAR _TCB *rtcb, FAR struct child_status_s *child,
int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options)
{
- FAR _TCB *rtcb = (FAR _TCB *)g_readytorun.head;
- FAR _TCB *ctcb;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s *)g_readytorun.head;
+ FAR struct tcb_s *ctcb;
#ifdef CONFIG_SCHED_CHILD_STATUS
FAR struct child_status_s *child;
bool retains;
diff --git a/nuttx/sched/sched_waitpid.c b/nuttx/sched/sched_waitpid.c
index e79dded4c..edd1f3a97 100644
--- a/nuttx/sched/sched_waitpid.c
+++ b/nuttx/sched/sched_waitpid.c
@@ -182,7 +182,7 @@
#ifndef CONFIG_SCHED_HAVE_PARENT
pid_t waitpid(pid_t pid, int *stat_loc, int options)
{
- FAR _TCB *ctcb;
+ FAR struct tcb_s *ctcb;
FAR struct task_group_s *group;
bool mystat;
int err;
@@ -276,8 +276,8 @@ errout:
#else
pid_t waitpid(pid_t pid, int *stat_loc, int options)
{
- FAR _TCB *rtcb = (FAR _TCB *)g_readytorun.head;
- FAR _TCB *ctcb;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s *)g_readytorun.head;
+ FAR struct tcb_s *ctcb;
#ifdef CONFIG_SCHED_CHILD_STATUS
FAR struct child_status_s *child;
bool retains;
diff --git a/nuttx/sched/sched_yield.c b/nuttx/sched/sched_yield.c
index b2e6493d0..4972668c7 100644
--- a/nuttx/sched/sched_yield.c
+++ b/nuttx/sched/sched_yield.c
@@ -90,7 +90,7 @@
int sched_yield(void)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
/* This equivalent to just resetting the task priority to its current value
* since this will cause the task to be rescheduled behind any other tasks
diff --git a/nuttx/sched/sem_holder.c b/nuttx/sched/sem_holder.c
index c850a3b5a..ab59ec8c8 100644
--- a/nuttx/sched/sem_holder.c
+++ b/nuttx/sched/sem_holder.c
@@ -1,7 +1,7 @@
/****************************************************************************
* sched/sem_holder.c
*
- * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009-2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -133,7 +133,8 @@ static inline FAR struct semholder_s *sem_allocholder(sem_t *sem)
* Name: sem_findholder
****************************************************************************/
-static FAR struct semholder_s *sem_findholder(sem_t *sem, FAR _TCB *htcb)
+static FAR struct semholder_s *sem_findholder(sem_t *sem,
+ FAR struct tcb_s *htcb)
{
FAR struct semholder_s *pholder;
@@ -162,7 +163,8 @@ static FAR struct semholder_s *sem_findholder(sem_t *sem, FAR _TCB *htcb)
* Name: sem_findorallocateholder
****************************************************************************/
-static inline FAR struct semholder_s *sem_findorallocateholder(sem_t *sem, FAR _TCB *htcb)
+static inline FAR struct semholder_s *
+sem_findorallocateholder(sem_t *sem, FAR struct tcb_s *htcb)
{
FAR struct semholder_s *pholder = sem_findholder(sem, htcb);
if (!pholder)
@@ -272,8 +274,8 @@ static int sem_recoverholders(FAR struct semholder_s *pholder, FAR sem_t *sem, F
static int sem_boostholderprio(FAR struct semholder_s *pholder,
FAR sem_t *sem, FAR void *arg)
{
- FAR _TCB *htcb = (FAR _TCB *)pholder->htcb;
- FAR _TCB *rtcb = (FAR _TCB*)arg;
+ FAR struct tcb_s *htcb = (FAR struct tcb_s *)pholder->htcb;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s *)arg;
/* Make sure that the holder thread is still active. If it exited without
* releasing its counts, then that would be a bad thing. But we can take no
@@ -376,7 +378,7 @@ static int sem_boostholderprio(FAR struct semholder_s *pholder,
static int sem_verifyholder(FAR struct semholder_s *pholder, FAR sem_t *sem, FAR void *arg)
{
#if 0 // Need to revisit this, but these assumptions seem to be untrue -- OR there is a bug???
- FAR _TCB *htcb = (FAR _TCB *)pholder->htcb;
+ FAR struct tcb_s *htcb = (FAR struct tcb_s *)pholder->htcb;
/* Called after a semaphore has been released (incremented), the semaphore
* could is non-negative, and there is no thread waiting for the count.
@@ -415,9 +417,9 @@ static int sem_dumpholder(FAR struct semholder_s *pholder, FAR sem_t *sem, FAR v
static int sem_restoreholderprio(FAR struct semholder_s *pholder, FAR sem_t *sem, FAR void *arg)
{
- FAR _TCB *htcb = (FAR _TCB *)pholder->htcb;
+ FAR struct tcb_s *htcb = (FAR struct tcb_s *)pholder->htcb;
#if CONFIG_SEM_NNESTPRIO > 0
- FAR _TCB *stcb = (FAR _TCB *)arg;
+ FAR struct tcb_s *stcb = (FAR struct tcb_s *)arg;
int rpriority;
int i;
int j;
@@ -546,7 +548,7 @@ static int sem_restoreholderprio(FAR struct semholder_s *pholder, FAR sem_t *sem
static int sem_restoreholderprioA(FAR struct semholder_s *pholder,
FAR sem_t *sem, FAR void *arg)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
if (pholder->htcb != rtcb)
{
return sem_restoreholderprio(pholder, sem, arg);
@@ -566,7 +568,7 @@ static int sem_restoreholderprioA(FAR struct semholder_s *pholder,
static int sem_restoreholderprioB(FAR struct semholder_s *pholder,
FAR sem_t *sem, FAR void *arg)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
if (pholder->htcb == rtcb)
{
(void)sem_restoreholderprio(pholder, sem, arg);
@@ -608,7 +610,8 @@ static int sem_restoreholderprioB(FAR struct semholder_s *pholder,
*
****************************************************************************/
-static inline void sem_restorebaseprio_irq(FAR _TCB *stcb, FAR sem_t *sem)
+static inline void sem_restorebaseprio_irq(FAR struct tcb_s *stcb,
+ FAR sem_t *sem)
{
/* Perfom the following actions only if a new thread was given a count.
* The thread that received the count should be the highest priority
@@ -668,9 +671,9 @@ static inline void sem_restorebaseprio_irq(FAR _TCB *stcb, FAR sem_t *sem)
*
****************************************************************************/
-static inline void sem_restorebaseprio_task(FAR _TCB *stcb, FAR sem_t *sem)
+static inline void sem_restorebaseprio_task(FAR struct tcb_s *stcb, FAR sem_t *sem)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
FAR struct semholder_s *pholder;
/* Perfom the following actions only if a new thread was given a count.
@@ -829,7 +832,7 @@ void sem_destroyholder(FAR sem_t *sem)
void sem_addholder(FAR sem_t *sem)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
FAR struct semholder_s *pholder;
/* Find or allocate a container for this new holder */
@@ -862,7 +865,7 @@ void sem_addholder(FAR sem_t *sem)
void sem_boostpriority(FAR sem_t *sem)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
/* Boost the priority of every thread holding counts on this semaphore
* that are lower in priority than the new thread that is waiting for a
@@ -891,7 +894,7 @@ void sem_boostpriority(FAR sem_t *sem)
void sem_releaseholder(FAR sem_t *sem)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
FAR struct semholder_s *pholder;
/* Find the container for this holder */
@@ -940,7 +943,7 @@ void sem_releaseholder(FAR sem_t *sem)
*
****************************************************************************/
-void sem_restorebaseprio(FAR _TCB *stcb, FAR sem_t *sem)
+void sem_restorebaseprio(FAR struct tcb_s *stcb, FAR sem_t *sem)
{
/* Check our assumptions */
@@ -985,7 +988,7 @@ void sem_restorebaseprio(FAR _TCB *stcb, FAR sem_t *sem)
****************************************************************************/
#ifndef CONFIG_DISABLE_SIGNALS
-void sem_canceled(FAR _TCB *stcb, FAR sem_t *sem)
+void sem_canceled(FAR struct tcb_s *stcb, FAR sem_t *sem)
{
/* Check our assumptions */
diff --git a/nuttx/sched/sem_internal.h b/nuttx/sched/sem_internal.h
index 434c551a4..27ecc7d33 100644
--- a/nuttx/sched/sem_internal.h
+++ b/nuttx/sched/sem_internal.h
@@ -1,7 +1,7 @@
/****************************************************************************
* sched/sem_internal.h
*
- * Copyright (C) 2007, 2009-2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2009-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -85,30 +85,31 @@ extern dq_queue_t g_nsems;
#ifdef __cplusplus
#define EXTERN extern "C"
-extern "C" {
+extern "C"
+{
#else
#define EXTERN extern
#endif
/* Common semaphore logic */
-EXTERN void weak_function sem_initialize(void);
-EXTERN void sem_waitirq(FAR _TCB *wtcb, int errcode);
-EXTERN FAR nsem_t *sem_findnamed(const char *name);
+void weak_function sem_initialize(void);
+void sem_waitirq(FAR struct tcb_s *wtcb, int errcode);
+FAR nsem_t *sem_findnamed(const char *name);
/* Special logic needed only by priority inheritance to manage collections of
* holders of semaphores.
*/
#ifdef CONFIG_PRIORITY_INHERITANCE
-EXTERN void sem_initholders(void);
-EXTERN void sem_destroyholder(FAR sem_t *sem);
-EXTERN void sem_addholder(FAR sem_t *sem);
-EXTERN void sem_boostpriority(FAR sem_t *sem);
-EXTERN void sem_releaseholder(FAR sem_t *sem);
-EXTERN void sem_restorebaseprio(FAR _TCB *stcb, FAR sem_t *sem);
+void sem_initholders(void);
+void sem_destroyholder(FAR sem_t *sem);
+void sem_addholder(FAR sem_t *sem);
+void sem_boostpriority(FAR sem_t *sem);
+void sem_releaseholder(FAR sem_t *sem);
+void sem_restorebaseprio(FAR struct tcb_s *stcb, FAR sem_t *sem);
# ifndef CONFIG_DISABLE_SIGNALS
-EXTERN void sem_canceled(FAR _TCB *stcb, FAR sem_t *sem);
+void sem_canceled(FAR struct tcb_s *stcb, FAR sem_t *sem);
# else
# define sem_canceled(stcb, sem)
# endif
diff --git a/nuttx/sched/sem_post.c b/nuttx/sched/sem_post.c
index 1c694b68c..598387249 100644
--- a/nuttx/sched/sem_post.c
+++ b/nuttx/sched/sem_post.c
@@ -1,7 +1,7 @@
/****************************************************************************
* sched/sem_post.c
*
- * Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009, 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -102,9 +102,9 @@
int sem_post(FAR sem_t *sem)
{
- FAR _TCB *stcb = NULL;
- int ret = ERROR;
+ FAR struct tcb_s *stcb = NULL;
irqstate_t saved_state;
+ int ret = ERROR;
/* Make sure we were supplied with a valid semaphore. */
@@ -146,7 +146,7 @@ int sem_post(FAR sem_t *sem)
* that we want.
*/
- for (stcb = (FAR _TCB*)g_waitingforsemaphore.head;
+ for (stcb = (FAR struct tcb_s*)g_waitingforsemaphore.head;
(stcb && stcb->waitsem != sem);
stcb = stcb->flink);
diff --git a/nuttx/sched/sem_timedwait.c b/nuttx/sched/sem_timedwait.c
index 6a4724406..df78a3997 100644
--- a/nuttx/sched/sem_timedwait.c
+++ b/nuttx/sched/sem_timedwait.c
@@ -93,7 +93,7 @@
static void sem_timeout(int argc, uint32_t pid)
{
- FAR _TCB *wtcb;
+ FAR struct tcb_s *wtcb;
irqstate_t flags;
/* Disable interrupts to avoid race conditions */
diff --git a/nuttx/sched/sem_trywait.c b/nuttx/sched/sem_trywait.c
index cbd8dae69..ce3e80b3a 100644
--- a/nuttx/sched/sem_trywait.c
+++ b/nuttx/sched/sem_trywait.c
@@ -96,9 +96,9 @@
int sem_trywait(FAR sem_t *sem)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
irqstate_t saved_state;
- int ret = ERROR;
+ int ret = ERROR;
/* This API should not be called from interrupt handlers */
diff --git a/nuttx/sched/sem_wait.c b/nuttx/sched/sem_wait.c
index 9dfbaa6c3..06884e595 100644
--- a/nuttx/sched/sem_wait.c
+++ b/nuttx/sched/sem_wait.c
@@ -1,7 +1,7 @@
/****************************************************************************
* sched/sem_wait.c
*
- * Copyright (C) 2007-2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -96,9 +96,9 @@
int sem_wait(FAR sem_t *sem)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
- int ret = ERROR;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
irqstate_t saved_state;
+ int ret = ERROR;
/* This API should not be called from interrupt handlers */
diff --git a/nuttx/sched/sem_waitirq.c b/nuttx/sched/sem_waitirq.c
index 3d3af18de..5c28a78a0 100644
--- a/nuttx/sched/sem_waitirq.c
+++ b/nuttx/sched/sem_waitirq.c
@@ -91,7 +91,7 @@
*
****************************************************************************/
-void sem_waitirq(FAR _TCB *wtcb, int errcode)
+void sem_waitirq(FAR struct tcb_s *wtcb, int errcode)
{
irqstate_t saved_state;
diff --git a/nuttx/sched/sig_action.c b/nuttx/sched/sig_action.c
index 5c00179dc..ac2c24cfb 100644
--- a/nuttx/sched/sig_action.c
+++ b/nuttx/sched/sig_action.c
@@ -168,7 +168,7 @@ static FAR sigactq_t *sig_allocateaction(void)
int sigaction(int signo, FAR const struct sigaction *act, FAR struct sigaction *oact)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
FAR sigactq_t *sigact;
/* Since sigactions can only be installed from the running thread of
diff --git a/nuttx/sched/sig_cleanup.c b/nuttx/sched/sig_cleanup.c
index 4dcc04f8b..a421f3a59 100644
--- a/nuttx/sched/sig_cleanup.c
+++ b/nuttx/sched/sig_cleanup.c
@@ -77,7 +77,7 @@
*
************************************************************************/
-void sig_cleanup(FAR _TCB *stcb)
+void sig_cleanup(FAR struct tcb_s *stcb)
{
FAR sigactq_t *sigact;
FAR sigq_t *sigq;
diff --git a/nuttx/sched/sig_deliver.c b/nuttx/sched/sig_deliver.c
index a1297fbc2..3f0adc6d5 100644
--- a/nuttx/sched/sig_deliver.c
+++ b/nuttx/sched/sig_deliver.c
@@ -83,7 +83,7 @@
*
****************************************************************************/
-void sig_deliver(FAR _TCB *stcb)
+void sig_deliver(FAR struct tcb_s *stcb)
{
FAR sigq_t *sigq;
FAR sigq_t *next;
diff --git a/nuttx/sched/sig_findaction.c b/nuttx/sched/sig_findaction.c
index 4115332b6..c36c8fbfb 100644
--- a/nuttx/sched/sig_findaction.c
+++ b/nuttx/sched/sig_findaction.c
@@ -72,7 +72,7 @@
*
************************************************************************/
-FAR sigactq_t *sig_findaction(FAR _TCB *stcb, int signo)
+FAR sigactq_t *sig_findaction(FAR struct tcb_s *stcb, int signo)
{
FAR sigactq_t *sigact = NULL;
diff --git a/nuttx/sched/sig_internal.h b/nuttx/sched/sig_internal.h
index 6c0641742..f9c672278 100644
--- a/nuttx/sched/sig_internal.h
+++ b/nuttx/sched/sig_internal.h
@@ -167,24 +167,24 @@ void sig_releaseaction(FAR sigactq_t *sigact);
/* sig_pending.c */
-sigset_t sig_pendingset(FAR _TCB *stcb);
+sigset_t sig_pendingset(FAR struct tcb_s *stcb);
/* In files of the same name */
FAR sigq_t *sig_allocatependingsigaction(void);
-void sig_cleanup(FAR _TCB *stcb);
-void sig_deliver(FAR _TCB *stcb);
-FAR sigactq_t *sig_findaction(FAR _TCB *stcb, int signo);
+void sig_cleanup(FAR struct tcb_s *stcb);
+void sig_deliver(FAR struct tcb_s *stcb);
+FAR sigactq_t *sig_findaction(FAR struct tcb_s *stcb, int signo);
int sig_lowest(FAR sigset_t *set);
#ifdef CONFIG_CAN_PASS_STRUCTS
int sig_mqnotempty(int tid, int signo, union sigval value);
#else
int sig_mqnotempty(int tid, int signo, FAR void *sival_ptr);
#endif
-int sig_received(FAR _TCB *stcb, FAR siginfo_t *info);
+int sig_received(FAR struct tcb_s *stcb, FAR siginfo_t *info);
void sig_releasependingsigaction(FAR sigq_t *sigq);
void sig_releasependingsignal(FAR sigpendq_t *sigpend);
-FAR sigpendq_t *sig_removependingsignal(FAR _TCB *stcb, int signo);
+FAR sigpendq_t *sig_removependingsignal(FAR struct tcb_s *stcb, int signo);
void sig_unmaskpendingsignal(void);
#endif /* __SCHED_SIG_INTERNAL_H */
diff --git a/nuttx/sched/sig_kill.c b/nuttx/sched/sig_kill.c
index b3d74d8a1..e9d2d7d5d 100644
--- a/nuttx/sched/sig_kill.c
+++ b/nuttx/sched/sig_kill.c
@@ -85,11 +85,11 @@
int kill(pid_t pid, int signo)
{
#ifdef CONFIG_SCHED_HAVE_PARENT
- FAR _TCB *rtcb = (FAR _TCB *)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s *)g_readytorun.head;
#endif
- FAR _TCB *stcb;
+ FAR struct tcb_s *stcb;
siginfo_t info;
- int ret = ERROR;
+ int ret = ERROR;
/* We do not support sending signals to process groups */
diff --git a/nuttx/sched/sig_mqnotempty.c b/nuttx/sched/sig_mqnotempty.c
index f7ae6fd0d..6eb434813 100644
--- a/nuttx/sched/sig_mqnotempty.c
+++ b/nuttx/sched/sig_mqnotempty.c
@@ -1,7 +1,7 @@
/****************************************************************************
* sched/sig_mqnotempty.c
*
- * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -89,11 +89,11 @@ int sig_mqnotempty (int pid, int signo, void *sival_ptr)
#endif
{
#ifdef CONFIG_SCHED_HAVE_PARENT
- FAR _TCB *rtcb = (FAR _TCB *)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s *)g_readytorun.head;
#endif
- FAR _TCB *stcb;
+ FAR struct tcb_s *stcb;
siginfo_t info;
- int ret = ERROR;
+ int ret = ERROR;
sched_lock();
diff --git a/nuttx/sched/sig_pending.c b/nuttx/sched/sig_pending.c
index eaabbff6b..d6f72cd99 100644
--- a/nuttx/sched/sig_pending.c
+++ b/nuttx/sched/sig_pending.c
@@ -89,8 +89,8 @@
int sigpending(FAR sigset_t *set)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
- int ret = ERROR;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
+ int ret = ERROR;
if (set)
{
@@ -109,11 +109,11 @@ int sigpending(FAR sigset_t *set)
*
****************************************************************************/
-sigset_t sig_pendingset(FAR _TCB *stcb)
+sigset_t sig_pendingset(FAR struct tcb_s *stcb)
{
- sigset_t sigpendset;
+ sigset_t sigpendset;
FAR sigpendq_t *sigpend;
- irqstate_t saved_state;
+ irqstate_t saved_state;
sigpendset = NULL_SIGNAL_SET;
diff --git a/nuttx/sched/sig_procmask.c b/nuttx/sched/sig_procmask.c
index c67159589..ea64f4685 100644
--- a/nuttx/sched/sig_procmask.c
+++ b/nuttx/sched/sig_procmask.c
@@ -112,7 +112,7 @@
int sigprocmask(int how, FAR const sigset_t *set, FAR sigset_t *oset)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
sigset_t oldsigprocmask;
irqstate_t saved_state;
int ret = OK;
diff --git a/nuttx/sched/sig_queue.c b/nuttx/sched/sig_queue.c
index db404238e..6dca15704 100644
--- a/nuttx/sched/sig_queue.c
+++ b/nuttx/sched/sig_queue.c
@@ -1,7 +1,7 @@
/****************************************************************************
* sched/sig_queue.c
*
- * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -112,11 +112,11 @@ int sigqueue(int pid, int signo, void *sival_ptr)
#endif
{
#ifdef CONFIG_SCHED_HAVE_PARENT
- FAR _TCB *rtcb = (FAR _TCB *)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s *)g_readytorun.head;
#endif
- FAR _TCB *stcb;
+ FAR struct tcb_s *stcb;
siginfo_t info;
- int ret = ERROR;
+ int ret = ERROR;
/* Sanity checks */
diff --git a/nuttx/sched/sig_received.c b/nuttx/sched/sig_received.c
index cf4d00165..4cfb10d06 100644
--- a/nuttx/sched/sig_received.c
+++ b/nuttx/sched/sig_received.c
@@ -81,7 +81,7 @@
*
************************************************************************/
-static int sig_queueaction(FAR _TCB *stcb, siginfo_t *info)
+static int sig_queueaction(FAR struct tcb_s *stcb, siginfo_t *info)
{
FAR sigactq_t *sigact;
FAR sigq_t *sigq;
@@ -134,7 +134,7 @@ static int sig_queueaction(FAR _TCB *stcb, siginfo_t *info)
*
************************************************************************/
-static FAR sigpendq_t *sig_findpendingsignal(FAR _TCB *stcb, int signo)
+static FAR sigpendq_t *sig_findpendingsignal(FAR struct tcb_s *stcb, int signo)
{
FAR sigpendq_t *sigpend = NULL;
irqstate_t saved_state;
@@ -234,7 +234,7 @@ static FAR sigpendq_t *sig_allocatependingsignal(void)
*
************************************************************************/
-static FAR sigpendq_t *sig_addpendingsignal(FAR _TCB *stcb,
+static FAR sigpendq_t *sig_addpendingsignal(FAR struct tcb_s *stcb,
siginfo_t *info)
{
FAR sigpendq_t *sigpend;
@@ -292,7 +292,7 @@ static FAR sigpendq_t *sig_addpendingsignal(FAR _TCB *stcb,
*
************************************************************************/
-int sig_received(FAR _TCB *stcb, siginfo_t *info)
+int sig_received(FAR struct tcb_s *stcb, siginfo_t *info)
{
irqstate_t saved_state;
int ret = ERROR;
diff --git a/nuttx/sched/sig_removependingsignal.c b/nuttx/sched/sig_removependingsignal.c
index c82bf983b..d1f2995e8 100644
--- a/nuttx/sched/sig_removependingsignal.c
+++ b/nuttx/sched/sig_removependingsignal.c
@@ -85,7 +85,7 @@
*
************************************************************************/
-FAR sigpendq_t *sig_removependingsignal(FAR _TCB *stcb, int signo)
+FAR sigpendq_t *sig_removependingsignal(FAR struct tcb_s *stcb, int signo)
{
FAR sigpendq_t *currsig;
FAR sigpendq_t *prevsig;
diff --git a/nuttx/sched/sig_suspend.c b/nuttx/sched/sig_suspend.c
index 09f47dee9..bc26aa35a 100644
--- a/nuttx/sched/sig_suspend.c
+++ b/nuttx/sched/sig_suspend.c
@@ -1,7 +1,7 @@
/****************************************************************************
* sched/sig_suspend.c
*
- * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -110,12 +110,12 @@
int sigsuspend(FAR const sigset_t *set)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
- sigset_t intersection;
- sigset_t saved_sigprocmask;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
+ sigset_t intersection;
+ sigset_t saved_sigprocmask;
FAR sigpendq_t *sigpend;
- irqstate_t saved_state;
- int unblocksigno;
+ irqstate_t saved_state;
+ int unblocksigno;
/* Several operations must be performed below: We must determine if any
* signal is pending and, if not, wait for the signal. Since signals can
diff --git a/nuttx/sched/sig_timedwait.c b/nuttx/sched/sig_timedwait.c
index f8c619b21..21e40f170 100644
--- a/nuttx/sched/sig_timedwait.c
+++ b/nuttx/sched/sig_timedwait.c
@@ -1,7 +1,7 @@
/****************************************************************************
* sched/sig_timedwait.c
*
- * Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009, 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -93,15 +93,15 @@
static void sig_timeout(int argc, uint32_t itcb)
{
/* On many small machines, pointers are encoded and cannot be simply cast
- * from uint32_t to _TCB*. The following union works around this
+ * from uint32_t to struct tcb_s*. The following union works around this
* (see wdogparm_t). This odd logic could be conditioned on
* CONFIG_CAN_CAST_POINTERS, but it is not too bad in any case.
*/
union
{
- FAR _TCB *wtcb;
- uint32_t itcb;
+ FAR struct tcb_s *wtcb;
+ uint32_t itcb;
} u;
u.itcb = itcb;
@@ -178,13 +178,13 @@ static void sig_timeout(int argc, uint32_t itcb)
int sigtimedwait(FAR const sigset_t *set, FAR struct siginfo *info,
FAR const struct timespec *timeout)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
- sigset_t intersection;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
+ sigset_t intersection;
FAR sigpendq_t *sigpend;
- WDOG_ID wdog;
- irqstate_t saved_state;
- int32_t waitticks;
- int ret = ERROR;
+ WDOG_ID wdog;
+ irqstate_t saved_state;
+ int32_t waitticks;
+ int ret = ERROR;
sched_lock(); /* Not necessary */
diff --git a/nuttx/sched/sig_unmaskpendingsignal.c b/nuttx/sched/sig_unmaskpendingsignal.c
index a7bcc7a29..c4d80de17 100644
--- a/nuttx/sched/sig_unmaskpendingsignal.c
+++ b/nuttx/sched/sig_unmaskpendingsignal.c
@@ -1,7 +1,7 @@
/************************************************************************
* sched/sig_unmaskpendingsignal.c
*
- * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -80,10 +80,10 @@
void sig_unmaskpendingsignal(void)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
- sigset_t unmaskedset;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
+ sigset_t unmaskedset;
FAR sigpendq_t *pendingsig;
- int signo;
+ int signo;
/* Prohibit any context switches until we are done with this.
* We may still be performing signal operations from interrupt
diff --git a/nuttx/sched/task_activate.c b/nuttx/sched/task_activate.c
index bae2856a1..c4449464c 100644
--- a/nuttx/sched/task_activate.c
+++ b/nuttx/sched/task_activate.c
@@ -87,7 +87,7 @@
*
****************************************************************************/
-int task_activate(FAR _TCB *tcb)
+int task_activate(FAR struct tcb_s *tcb)
{
irqstate_t flags = irqsave();
diff --git a/nuttx/sched/task_create.c b/nuttx/sched/task_create.c
index bcb9c77c0..976cca35b 100644
--- a/nuttx/sched/task_create.c
+++ b/nuttx/sched/task_create.c
@@ -106,14 +106,14 @@ static int thread_create(const char *name, uint8_t ttype, int priority,
main_t entry, FAR char * const argv[])
#endif
{
- FAR _TCB *tcb;
+ FAR struct tcb_s *tcb;
pid_t pid;
int errcode;
int ret;
/* Allocate a TCB for the new task. */
- tcb = (FAR _TCB*)kzalloc(sizeof(_TCB));
+ tcb = (FAR struct tcb_s*)kzalloc(sizeof(struct tcb_s));
if (!tcb)
{
errcode = ENOMEM;
diff --git a/nuttx/sched/task_delete.c b/nuttx/sched/task_delete.c
index ea0e251db..4a4e00d35 100644
--- a/nuttx/sched/task_delete.c
+++ b/nuttx/sched/task_delete.c
@@ -112,14 +112,14 @@
int task_delete(pid_t pid)
{
- FAR _TCB *rtcb;
- FAR _TCB *dtcb;
+ FAR struct tcb_s *rtcb;
+ FAR struct tcb_s *dtcb;
irqstate_t saved_state;
- int ret = ERROR;
+ int ret = ERROR;
/* Check if the task to delete is the calling task */
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
if (pid == 0 || pid == rtcb->pid)
{
/* If it is, then what we really wanted to do was exit. Note that we
diff --git a/nuttx/sched/task_deletecurrent.c b/nuttx/sched/task_deletecurrent.c
index e1e06acf6..d2fdaefd4 100644
--- a/nuttx/sched/task_deletecurrent.c
+++ b/nuttx/sched/task_deletecurrent.c
@@ -1,7 +1,7 @@
/****************************************************************************
* sched/task_deletecurrent.c
*
- * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009, 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -97,8 +97,8 @@
int task_deletecurrent(void)
{
- FAR _TCB *dtcb = (FAR _TCB*)g_readytorun.head;
- FAR _TCB *rtcb;
+ FAR struct tcb_s *dtcb = (FAR struct tcb_s*)g_readytorun.head;
+ FAR struct tcb_s *rtcb;
/* Remove the TCB of the current task from the ready-to-run list. A context
* switch will definitely be necessary -- that must be done by the
@@ -109,7 +109,7 @@ int task_deletecurrent(void)
*/
(void)sched_removereadytorun(dtcb);
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
/* We are now in a bad state -- the head of the ready to run task list
* does not correspond to the thread that is running. Disabling pre-
diff --git a/nuttx/sched/task_exithook.c b/nuttx/sched/task_exithook.c
index 22a46613e..20d1bd161 100644
--- a/nuttx/sched/task_exithook.c
+++ b/nuttx/sched/task_exithook.c
@@ -85,7 +85,7 @@
****************************************************************************/
#if defined(CONFIG_SCHED_ATEXIT) && !defined(CONFIG_SCHED_ONEXIT)
-static inline void task_atexit(FAR _TCB *tcb)
+static inline void task_atexit(FAR struct tcb_s *tcb)
{
FAR struct task_group_s *group = tcb->group;
@@ -145,7 +145,7 @@ static inline void task_atexit(FAR _TCB *tcb)
****************************************************************************/
#ifdef CONFIG_SCHED_ONEXIT
-static inline void task_onexit(FAR _TCB *tcb, int status)
+static inline void task_onexit(FAR struct tcb_s *tcb, int status)
{
FAR struct task_group_s *group = tcb->group;
@@ -289,7 +289,7 @@ static inline void task_groupexit(FAR struct task_group_s *group)
#ifdef CONFIG_SCHED_HAVE_PARENT
#ifdef HAVE_GROUP_MEMBERS
-static inline void task_sigchild(gid_t pgid, FAR _TCB *ctcb, int status)
+static inline void task_sigchild(gid_t pgid, FAR struct tcb_s *ctcb, int status)
{
FAR struct task_group_s *chgrp = ctcb->group;
FAR struct task_group_s *pgrp;
@@ -354,7 +354,7 @@ static inline void task_sigchild(gid_t pgid, FAR _TCB *ctcb, int status)
#else /* HAVE_GROUP_MEMBERS */
-static inline void task_sigchild(FAR _TCB *ptcb, FAR _TCB *ctcb, int status)
+static inline void task_sigchild(FAR struct tcb_s *ptcb, FAR struct tcb_s *ctcb, int status)
{
siginfo_t info;
@@ -414,7 +414,7 @@ static inline void task_sigchild(FAR _TCB *ptcb, FAR _TCB *ctcb, int status)
****************************************************************************/
#ifdef CONFIG_SCHED_HAVE_PARENT
-static inline void task_leavegroup(FAR _TCB *ctcb, int status)
+static inline void task_leavegroup(FAR struct tcb_s *ctcb, int status)
{
#ifdef HAVE_GROUP_MEMBERS
DEBUGASSERT(ctcb && ctcb->group);
@@ -428,7 +428,7 @@ static inline void task_leavegroup(FAR _TCB *ctcb, int status)
task_sigchild(ctcb->group->tg_pgid, ctcb, status);
sched_unlock();
#else
- FAR _TCB *ptcb;
+ FAR struct tcb_s *ptcb;
/* Keep things stationary throughout the following */
@@ -472,7 +472,7 @@ static inline void task_leavegroup(FAR _TCB *ctcb, int status)
****************************************************************************/
#if defined(CONFIG_SCHED_WAITPID) && !defined(CONFIG_SCHED_HAVE_PARENT)
-static inline void task_exitwakeup(FAR _TCB *tcb, int status)
+static inline void task_exitwakeup(FAR struct tcb_s *tcb, int status)
{
FAR struct task_group_s *group = tcb->group;
@@ -553,7 +553,7 @@ static inline void task_exitwakeup(FAR _TCB *tcb, int status)
*
****************************************************************************/
-void task_exithook(FAR _TCB *tcb, int status)
+void task_exithook(FAR struct tcb_s *tcb, int status)
{
/* Under certain conditions, task_exithook() can be called multiple times.
* A bit in the TCB was set the first time this function was called. If
diff --git a/nuttx/sched/task_getgroup.c b/nuttx/sched/task_getgroup.c
index fc5bd166e..d38977d40 100644
--- a/nuttx/sched/task_getgroup.c
+++ b/nuttx/sched/task_getgroup.c
@@ -93,7 +93,7 @@
FAR struct task_group_s *task_getgroup(pid_t pid)
{
- FAR _TCB *tcb = sched_gettcb(pid);
+ FAR struct tcb_s *tcb = sched_gettcb(pid);
if (tcb)
{
return tcb->group;
diff --git a/nuttx/sched/task_init.c b/nuttx/sched/task_init.c
index 4214393e1..13f7ac8f7 100644
--- a/nuttx/sched/task_init.c
+++ b/nuttx/sched/task_init.c
@@ -112,11 +112,11 @@
****************************************************************************/
#ifndef CONFIG_CUSTOM_STACK
-int task_init(FAR _TCB *tcb, const char *name, int priority,
+int task_init(FAR struct tcb_s *tcb, const char *name, int priority,
FAR uint32_t *stack, uint32_t stack_size,
main_t entry, FAR char * const argv[])
#else
-int task_init(FAR _TCB *tcb, const char *name, int priority,
+int task_init(FAR struct tcb_s *tcb, const char *name, int priority,
main_t entry, FAR char * const argv[])
#endif
{
diff --git a/nuttx/sched/task_reparent.c b/nuttx/sched/task_reparent.c
index 5bb62893f..f32d011e9 100644
--- a/nuttx/sched/task_reparent.c
+++ b/nuttx/sched/task_reparent.c
@@ -79,7 +79,7 @@ int task_reparent(pid_t ppid, pid_t chpid)
FAR struct task_group_s *chgrp;
FAR struct task_group_s *ogrp;
FAR struct task_group_s *pgrp;
- _TCB *tcb;
+ struct tcb_s *tcb;
gid_t ogid;
gid_t pgid;
irqstate_t flags;
@@ -210,9 +210,9 @@ int task_reparent(pid_t ppid, pid_t chpid)
#ifdef CONFIG_SCHED_CHILD_STATUS
FAR struct child_status_s *child;
#endif
- _TCB *ptcb;
- _TCB *chtcb;
- _TCB *otcb;
+ struct tcb_s *ptcb;
+ struct tcb_s *chtcb;
+ struct tcb_s *otcb;
pid_t opid;
irqstate_t flags;
int ret;
diff --git a/nuttx/sched/task_restart.c b/nuttx/sched/task_restart.c
index 6d9b84917..762cbec52 100644
--- a/nuttx/sched/task_restart.c
+++ b/nuttx/sched/task_restart.c
@@ -96,10 +96,10 @@
int task_restart(pid_t pid)
{
- FAR _TCB *rtcb;
- FAR _TCB *tcb;
- int status;
+ FAR struct tcb_s *rtcb;
+ FAR struct tcb_s *tcb;
irqstate_t state;
+ int status;
/* Make sure this task does not become ready-to-run while
* we are futzing with its TCB
@@ -109,7 +109,7 @@ int task_restart(pid_t pid)
/* Check if the task to restart is the calling task */
- rtcb = (FAR _TCB*)g_readytorun.head;
+ rtcb = (FAR struct tcb_s*)g_readytorun.head;
if ((pid == 0) || (pid == rtcb->pid))
{
/* Not implemented */
diff --git a/nuttx/sched/task_setup.c b/nuttx/sched/task_setup.c
index 649e97184..4c1b957f9 100644
--- a/nuttx/sched/task_setup.c
+++ b/nuttx/sched/task_setup.c
@@ -75,7 +75,7 @@ static const char g_noname[] = "";
* Private Function Prototypes
****************************************************************************/
-static int task_assignpid(FAR _TCB* tcb);
+static int task_assignpid(FAR struct tcb_s* tcb);
/****************************************************************************
* Private Functions
@@ -95,7 +95,7 @@ static int task_assignpid(FAR _TCB* tcb);
*
****************************************************************************/
-static int task_assignpid(FAR _TCB *tcb)
+static int task_assignpid(FAR struct tcb_s *tcb)
{
pid_t next_pid;
int hash_ndx;
@@ -168,9 +168,9 @@ static int task_assignpid(FAR _TCB *tcb)
****************************************************************************/
#ifdef CONFIG_SCHED_HAVE_PARENT
-static inline void task_saveparent(FAR _TCB *tcb, uint8_t ttype)
+static inline void task_saveparent(FAR struct tcb_s *tcb, uint8_t ttype)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
#if defined(HAVE_GROUP_MEMBERS) || defined(CONFIG_SCHED_CHILD_STATUS)
DEBUGASSERT(tcb && tcb->group && rtcb->group);
@@ -271,9 +271,9 @@ static inline void task_saveparent(FAR _TCB *tcb, uint8_t ttype)
****************************************************************************/
#ifdef CONFIG_PIC
-static inline void task_dupdspace(FAR _TCB *tcb)
+static inline void task_dupdspace(FAR struct tcb_s *tcb)
{
- FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
if (rtcb->dspace != NULL)
{
/* Copy the D-Space structure reference and increment the reference
@@ -318,7 +318,7 @@ static inline void task_dupdspace(FAR _TCB *tcb)
*
****************************************************************************/
-int task_schedsetup(FAR _TCB *tcb, int priority, start_t start, main_t main,
+int task_schedsetup(FAR struct tcb_s *tcb, int priority, start_t start, main_t main,
uint8_t ttype)
{
int ret;
@@ -414,7 +414,7 @@ int task_schedsetup(FAR _TCB *tcb, int priority, start_t start, main_t main,
*
****************************************************************************/
-int task_argsetup(FAR _TCB *tcb, const char *name, FAR char * const argv[])
+int task_argsetup(FAR struct tcb_s *tcb, const char *name, FAR char * const argv[])
{
int i;
diff --git a/nuttx/sched/task_start.c b/nuttx/sched/task_start.c
index 5a32a5dd8..5a66089c6 100644
--- a/nuttx/sched/task_start.c
+++ b/nuttx/sched/task_start.c
@@ -91,7 +91,7 @@
void task_start(void)
{
- FAR _TCB *tcb = (FAR _TCB*)g_readytorun.head;
+ FAR struct tcb_s *tcb = (FAR struct tcb_s*)g_readytorun.head;
int argc;
/* Execute the start hook if one has been registered */
diff --git a/nuttx/sched/task_starthook.c b/nuttx/sched/task_starthook.c
index 1cb29349f..cf725a854 100644
--- a/nuttx/sched/task_starthook.c
+++ b/nuttx/sched/task_starthook.c
@@ -90,7 +90,7 @@
*
****************************************************************************/
-void task_starthook(FAR _TCB *tcb, starthook_t starthook, FAR void *arg)
+void task_starthook(FAR struct tcb_s *tcb, starthook_t starthook, FAR void *arg)
{
DEBUGASSERT(tcb);
tcb->starthook = starthook;
diff --git a/nuttx/sched/task_vfork.c b/nuttx/sched/task_vfork.c
index ac86ddc56..f5d41bc8b 100644
--- a/nuttx/sched/task_vfork.c
+++ b/nuttx/sched/task_vfork.c
@@ -105,10 +105,10 @@
*
****************************************************************************/
-FAR _TCB *task_vforksetup(start_t retaddr)
+FAR struct tcb_s *task_vforksetup(start_t retaddr)
{
- _TCB *parent = (FAR _TCB *)g_readytorun.head;
- _TCB *child;
+ struct tcb_s *parent = (FAR struct tcb_s *)g_readytorun.head;
+ struct tcb_s *child;
int priority;
int ret;
@@ -116,7 +116,7 @@ FAR _TCB *task_vforksetup(start_t retaddr)
/* Allocate a TCB for the child task. */
- child = (FAR _TCB*)kzalloc(sizeof(_TCB));
+ child = (FAR struct tcb_s*)kzalloc(sizeof(struct tcb_s));
if (!child)
{
set_errno(ENOMEM);
@@ -203,10 +203,10 @@ errout_with_tcb:
*
****************************************************************************/
-pid_t task_vforkstart(FAR _TCB *child)
+pid_t task_vforkstart(FAR struct tcb_s *child)
{
#if CONFIG_TASK_NAME_SIZE > 0
- _TCB *parent = (FAR _TCB *)g_readytorun.head;
+ struct tcb_s *parent = (FAR struct tcb_s *)g_readytorun.head;
#endif
FAR const char *name;
pid_t pid;
@@ -317,7 +317,7 @@ pid_t task_vforkstart(FAR _TCB *child)
*
****************************************************************************/
-void task_vforkabort(FAR _TCB *child, int errcode)
+void task_vforkabort(FAR struct tcb_s *child, int errcode)
{
/* The TCB was added to the active task list by task_schedsetup() */
diff --git a/nuttx/sched/timer_settime.c b/nuttx/sched/timer_settime.c
index f09842ad4..d588939ab 100644
--- a/nuttx/sched/timer_settime.c
+++ b/nuttx/sched/timer_settime.c
@@ -95,7 +95,7 @@ static void timer_timeout(int argc, uint32_t itimer);
static void inline timer_sigqueue(FAR struct posix_timer_s *timer)
{
- FAR _TCB *tcb;
+ FAR struct tcb_s *tcb;
/* Get the TCB of the receiving task */
@@ -177,7 +177,7 @@ static void timer_timeout(int argc, uint32_t itimer)
{
#ifndef CONFIG_CAN_PASS_STRUCTS
/* On many small machines, pointers are encoded and cannot be simply cast from
- * uint32_t to _TCB*. The following union works around this (see wdogparm_t).
+ * uint32_t to struct tcb_s*. The following union works around this (see wdogparm_t).
*/
union
diff --git a/nuttx/syscall/syscall.csv b/nuttx/syscall/syscall.csv
index 2e1adb199..6716e9d6a 100644
--- a/nuttx/syscall/syscall.csv
+++ b/nuttx/syscall/syscall.csv
@@ -13,7 +13,7 @@
"dup2","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0","int","int","int"
"exit","stdlib.h","","void","int"
"fcntl","fcntl.h","CONFIG_NFILE_DESCRIPTORS > 0","int","int","int","..."
-"fs_fdopen","nuttx/fs/fs.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR struct file_struct*","int","int","FAR _TCB*"
+"fs_fdopen","nuttx/fs/fs.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR struct file_struct*","int","int","FAR struct tcb_s*"
"fsync","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_MOUNTPOINT)","int","int"
"get_errno","errno.h","","int"
"getenv","stdlib.h","!defined(CONFIG_DISABLE_ENVIRON)","FAR char*","FAR const char*"
--
cgit v1.2.3