Add NSH command to create RAMDISK

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@884 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2008-09-06 13:29:14 +00:00
parent 9ba2e1ea57
commit 1361bd90f6
6 changed files with 26 additions and 26 deletions

View File

@ -78,21 +78,21 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
int i;
#endif
dbg(" TCB=%p name=%s\n", tcb, tcb->argv[0]);
sdbg(" TCB=%p name=%s\n", tcb, tcb->argv[0]);
#if CONFIG_NFILE_DESCRIPTORS > 0
if (tcb->filelist)
{
dbg(" filelist refcount=%d\n",
tcb->filelist->fl_crefs);
sdbg(" filelist refcount=%d\n",
tcb->filelist->fl_crefs);
for (i = 0; i < CONFIG_NFILE_DESCRIPTORS; i++)
{
struct inode *inode = tcb->filelist->fl_files[i].f_inode;
if (inode)
{
dbg(" fd=%d refcount=%d\n",
i, inode->i_crefs);
sdbg(" fd=%d refcount=%d\n",
i, inode->i_crefs);
}
}
}
@ -101,8 +101,8 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
#if CONFIG_NFILE_STREAMS > 0
if (tcb->streams)
{
dbg(" streamlist refcount=%d\n",
tcb->streams->sl_crefs);
sdbg(" streamlist refcount=%d\n",
tcb->streams->sl_crefs);
for (i = 0; i < CONFIG_NFILE_STREAMS; i++)
{
@ -110,11 +110,11 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
if (filep->fs_filedes >= 0)
{
#if CONFIG_STDIO_BUFFER_SIZE > 0
dbg(" fd=%d nbytes=%d\n",
filep->fs_filedes,
sdbg(" fd=%d nbytes=%d\n",
filep->fs_filedes,
filep->fs_bufpos - filep->fs_bufstart);
#else
dbg(" fd=%d\n", filep->fs_filedes);
sdbg(" fd=%d\n", filep->fs_filedes);
#endif
}
}
@ -148,10 +148,10 @@ void _exit(int status)
(void)irqsave();
lldbg("TCB=%p exitting\n", tcb);
slldbg("TCB=%p exitting\n", tcb);
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
lldbg("Other tasks:\n");
slldbg("Other tasks:\n");
sched_foreach(_up_dumponexit, NULL);
#endif
@ -164,7 +164,7 @@ void _exit(int status)
*/
tcb = (_TCB*)g_readytorun.head;
lldbg("New Active Task TCB=%p\n", tcb);
slldbg("New Active Task TCB=%p\n", tcb);
/* Then switch contexts */

View File

@ -75,12 +75,12 @@
static void up_calibratedelay(void)
{
int i;
lldbg("Beginning 100s delay\n");
slldbg("Beginning 100s delay\n");
for (i = 0; i < 100; i++)
{
up_mdelay(1000);
}
lldbg("End 100s delay\n");
slldbg("End 100s delay\n");
}
#else
# define up_calibratedelay()

View File

@ -76,7 +76,7 @@ void up_release_pending(void)
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
lldbg("From TCB=%p\n", rtcb);
slldbg("From TCB=%p\n", rtcb);
/* Merge the g_pendingtasks list into the g_readytorun task list */
@ -101,7 +101,7 @@ void up_release_pending(void)
*/
rtcb = (_TCB*)g_readytorun.head;
lldbg("New Active Task TCB=%p\n", rtcb);
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@ -121,7 +121,7 @@ void up_release_pending(void)
*/
rtcb = (_TCB*)g_readytorun.head;
lldbg("New Active Task TCB=%p\n", rtcb);
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */

View File

@ -97,7 +97,7 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority)
_TCB *rtcb = (_TCB*)g_readytorun.head;
boolean switch_needed;
lldbg("TCB=%p PRI=%d\n", tcb, priority);
slldbg("TCB=%p PRI=%d\n", tcb, priority);
/* Remove the tcb task from the ready-to-run list.
* sched_removereadytorun will return TRUE if we just
@ -149,7 +149,7 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority)
*/
rtcb = (_TCB*)g_readytorun.head;
lldbg("New Active Task TCB=%p\n", rtcb);
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@ -168,7 +168,7 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority)
*/
rtcb = (_TCB*)g_readytorun.head;
lldbg("New Active Task TCB=%p\n", rtcb);
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */

View File

@ -99,7 +99,7 @@ void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
{
/* Refuse to handle nested signal actions */
dbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
if (!tcb->xcp.sigdeliver)
{
@ -113,7 +113,7 @@ void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
* being delivered to the currently executing task.
*/
dbg("rtcb=0x%p current_regs=0x%p\n", g_readytorun.head, current_regs);
sdbg("rtcb=0x%p current_regs=0x%p\n", g_readytorun.head, current_regs);
if (tcb == (_TCB*)g_readytorun.head)
{

View File

@ -90,8 +90,8 @@ void up_sigdeliver(void)
up_ledon(LED_SIGNAL);
dbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
ASSERT(rtcb->xcp.sigdeliver != NULL);
/* Save the real return state on the stack. */
@ -124,7 +124,7 @@ void up_sigdeliver(void)
* (it is probably EINTR).
*/
dbg("Resuming\n");
sdbg("Resuming\n");
rtcb->pterrno = saved_errno;
/* Then restore the correct state for this thread of