mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 19:36:35 +08:00
Fixe to kernel build and syscalls.
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5738 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -110,12 +110,14 @@ static void dispatch_syscall(void)
|
|||||||
{
|
{
|
||||||
__asm__ __volatile__
|
__asm__ __volatile__
|
||||||
(
|
(
|
||||||
" push {r4}\n" /* Save R4 */
|
" push {r4, r5}\n" /* Save R4 and R5 */
|
||||||
|
" mov r5, lr\n" /* Save lr in R5 */
|
||||||
" ldr r4, =g_stublookup\n" /* R4=The base of the stub lookup table */
|
" ldr r4, =g_stublookup\n" /* R4=The base of the stub lookup table */
|
||||||
" lsl r0, r0, #2\n" /* R0=Offset of the stub for this syscall */
|
" lsl r0, r0, #2\n" /* R0=Offset of the stub for this syscall */
|
||||||
" ldr r4, [r4, r0]\n" /* R4=Address of the stub for this syscall */
|
" ldr r4, [r4, r0]\n" /* R4=Address of the stub for this syscall */
|
||||||
" blx r5\n" /* Call the stub (modifies R14) */
|
" blx r5\n" /* Call the stub (modifies lr) */
|
||||||
" pop {r4}\n" /* Restore R4 */
|
" mov lr, r5\n" /* Restore lr */
|
||||||
|
" pop {r4, r5}\n" /* Restore R4 and R5*/
|
||||||
" mov r2, r0\n" /* R2=Saves return value in R0 */
|
" mov r2, r0\n" /* R2=Saves return value in R0 */
|
||||||
" mov r0, #3\n" /* R0=SYS_syscall_return */
|
" mov r0, #3\n" /* R0=SYS_syscall_return */
|
||||||
" svc 0" /* Return from the syscall */
|
" svc 0" /* Return from the syscall */
|
||||||
@@ -321,7 +323,8 @@ int up_svcall(int irq, FAR void *context)
|
|||||||
current_regs[REG_R12], current_regs[REG_R13], current_regs[REG_R14], current_regs[REG_R15]);
|
current_regs[REG_R12], current_regs[REG_R13], current_regs[REG_R14], current_regs[REG_R15]);
|
||||||
#ifdef CONFIG_NUTTX_KERNEL
|
#ifdef CONFIG_NUTTX_KERNEL
|
||||||
svcdbg("xPSR: %08x BASEPRI: %08x EXEC_RETURN: %08x\n",
|
svcdbg("xPSR: %08x BASEPRI: %08x EXEC_RETURN: %08x\n",
|
||||||
current_regs[REG_XPSR], current_regs[REG_BASEPRI], current_regs[REG_EXC_RETURN]);
|
current_regs[REG_XPSR], current_regs[REG_BASEPRI],
|
||||||
|
current_regs[REG_EXC_RETURN]);
|
||||||
#else
|
#else
|
||||||
svcdbg("xPSR: %08x BASEPRI: %08x\n",
|
svcdbg("xPSR: %08x BASEPRI: %08x\n",
|
||||||
current_regs[REG_XPSR], current_regs[REG_BASEPRI]);
|
current_regs[REG_XPSR], current_regs[REG_BASEPRI]);
|
||||||
|
|||||||
@@ -112,9 +112,13 @@ static void dispatch_syscall(void)
|
|||||||
{
|
{
|
||||||
__asm__ __volatile__
|
__asm__ __volatile__
|
||||||
(
|
(
|
||||||
|
" push {r4}\n" /* Save R4 */
|
||||||
|
" mov r4, lr\n" /* Save lr in R4 */
|
||||||
" ldr ip, =g_stublookup\n" /* R12=The base of the stub lookup table */
|
" ldr ip, =g_stublookup\n" /* R12=The base of the stub lookup table */
|
||||||
" ldr ip, [ip, r0, lsl #2]\n" /* R12=The address of the stub for this syscall */
|
" ldr ip, [ip, r0, lsl #2]\n" /* R12=The address of the stub for this syscall */
|
||||||
" blx ip\n" /* Call the stub (modifies R14)*/
|
" blx ip\n" /* Call the stub (modifies lr)*/
|
||||||
|
" mov lr, r4\n" /* Restore lr */
|
||||||
|
" pop {r4}\n" /* Restore r4 */
|
||||||
" mov r2, r0\n" /* R2=Saved return value in R0 */
|
" mov r2, r0\n" /* R2=Saved return value in R0 */
|
||||||
" mov r0, #3\n" /* R0=SYS_syscall_return */
|
" mov r0, #3\n" /* R0=SYS_syscall_return */
|
||||||
" svc 0" /* Return from the syscall */
|
" svc 0" /* Return from the syscall */
|
||||||
@@ -152,7 +156,7 @@ int up_svcall(int irq, FAR void *context)
|
|||||||
regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11],
|
regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11],
|
||||||
regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]);
|
regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]);
|
||||||
#ifdef REG_EXC_RETURN
|
#ifdef REG_EXC_RETURN
|
||||||
svcdbg(" PSR: %08x LR: %08x\n", regs[REG_XPSR], current_regs[REG_EXC_RETURN]);
|
svcdbg(" PSR: %08x LR: %08x\n", regs[REG_XPSR], regs[REG_EXC_RETURN]);
|
||||||
#else
|
#else
|
||||||
svcdbg(" PSR: %08x\n", regs[REG_XPSR]);
|
svcdbg(" PSR: %08x\n", regs[REG_XPSR]);
|
||||||
#endif
|
#endif
|
||||||
@@ -265,7 +269,7 @@ int up_svcall(int irq, FAR void *context)
|
|||||||
rtcb->xcp.sysreturn = 0;
|
rtcb->xcp.sysreturn = 0;
|
||||||
|
|
||||||
/* The return value must be in R0-R1. dispatch_syscall() temporarily
|
/* The return value must be in R0-R1. dispatch_syscall() temporarily
|
||||||
* moved the value for R0 to R2.
|
* moved the value for R0 into R2.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
current_regs[REG_R0] = current_regs[REG_R2];
|
current_regs[REG_R0] = current_regs[REG_R2];
|
||||||
@@ -322,7 +326,12 @@ int up_svcall(int irq, FAR void *context)
|
|||||||
svcdbg(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
svcdbg(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||||
current_regs[REG_R8], current_regs[REG_R9], current_regs[REG_R10], current_regs[REG_R11],
|
current_regs[REG_R8], current_regs[REG_R9], current_regs[REG_R10], current_regs[REG_R11],
|
||||||
current_regs[REG_R12], current_regs[REG_R13], current_regs[REG_R14], current_regs[REG_R15]);
|
current_regs[REG_R12], current_regs[REG_R13], current_regs[REG_R14], current_regs[REG_R15]);
|
||||||
svcdbg(" PSR=%08x\n", current_regs[REG_XPSR]);
|
#ifdef REG_EXC_RETURN
|
||||||
|
svcdbg(" PSR: %08x LR: %08x\n",
|
||||||
|
current_regs[REG_XPSR], current_regs[REG_EXC_RETURN]);
|
||||||
|
#else
|
||||||
|
svcdbg(" PSR: %08x\n", current_regs[REG_XPSR]);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -300,10 +300,18 @@ void up_addregion(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef LPC17_AHB_HEAPBASE
|
#ifdef LPC17_AHB_HEAPBASE
|
||||||
|
#if defined(CONFIG_NUTTX_KERNEL) && defined(CONFIG_MM_KERNEL_HEAP)
|
||||||
|
|
||||||
/* Yes... Add the AHB SRAM heap region. */
|
/* Yes.. allow user-mode access to the AHB SRAM user heap memory */
|
||||||
|
|
||||||
|
lpc17_mpu_uheap((uintptr_t)LPC17_AHB_HEAPBASE, LPC17_AHB_HEAPSIZE);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Add the AHB SRAM user heap region. */
|
||||||
|
|
||||||
|
kumm_addregion((FAR void*)LPC17_AHB_HEAPBASE, LPC17_AHB_HEAPSIZE);
|
||||||
|
|
||||||
kmm_addregion((FAR void*)LPC17_AHB_HEAPBASE, LPC17_AHB_HEAPSIZE);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1546,7 +1546,7 @@ static void lpc17_widebus(FAR struct sdio_dev_s *dev, bool wide)
|
|||||||
|
|
||||||
static void lpc17_clock(FAR struct sdio_dev_s *dev, enum sdio_clock_e rate)
|
static void lpc17_clock(FAR struct sdio_dev_s *dev, enum sdio_clock_e rate)
|
||||||
{
|
{
|
||||||
uint32_t clock;
|
uint32_t clkcr;
|
||||||
|
|
||||||
switch (rate)
|
switch (rate)
|
||||||
{
|
{
|
||||||
@@ -1554,39 +1554,39 @@ static void lpc17_clock(FAR struct sdio_dev_s *dev, enum sdio_clock_e rate)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
case CLOCK_SDIO_DISABLED:
|
case CLOCK_SDIO_DISABLED:
|
||||||
clock = LPC17_CLCKCR_INIT;
|
clkcr = LPC17_CLCKCR_INIT;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Enable in initial ID mode clocking (<400KHz) */
|
/* Enable in initial ID mode clocking (<400KHz) */
|
||||||
|
|
||||||
case CLOCK_IDMODE:
|
case CLOCK_IDMODE:
|
||||||
clock = (LPC17_CLCKCR_INIT | SDCARD_CLOCK_CLKEN);
|
clkcr = (LPC17_CLCKCR_INIT | SDCARD_CLOCK_CLKEN);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Enable in MMC normal operation clocking */
|
/* Enable in MMC normal operation clocking */
|
||||||
|
|
||||||
case CLOCK_MMC_TRANSFER:
|
case CLOCK_MMC_TRANSFER:
|
||||||
clock = (SDCARD_CLOCK_MMCXFR | SDCARD_CLOCK_CLKEN);
|
clkcr = (SDCARD_CLOCK_MMCXFR | SDCARD_CLOCK_CLKEN);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* SD normal operation clocking (wide 4-bit mode) */
|
/* SD normal operation clocking (wide 4-bit mode) */
|
||||||
|
|
||||||
case CLOCK_SD_TRANSFER_4BIT:
|
case CLOCK_SD_TRANSFER_4BIT:
|
||||||
#ifndef CONFIG_SDIO_WIDTH_D1_ONLY
|
#ifndef CONFIG_SDIO_WIDTH_D1_ONLY
|
||||||
clock = (SDCARD_CLOCK_SDWIDEXFR | SDCARD_CLOCK_CLKEN);
|
clkcr = (SDCARD_CLOCK_SDWIDEXFR | SDCARD_CLOCK_CLKEN);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* SD normal operation clocking (narrow 1-bit mode) */
|
/* SD normal operation clocking (narrow 1-bit mode) */
|
||||||
|
|
||||||
case CLOCK_SD_TRANSFER_1BIT:
|
case CLOCK_SD_TRANSFER_1BIT:
|
||||||
clock = (SDCARD_CLOCK_SDXFR | SDCARD_CLOCK_CLKEN);
|
clkcr = (SDCARD_CLOCK_SDXFR | SDCARD_CLOCK_CLKEN);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the new clock frequency along with the clock enable/disable bit */
|
/* Set the new clock frequency along with the clock enable/disable bit */
|
||||||
|
|
||||||
lpc17_setclock(clock);
|
lpc17_setclock(clkcr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -124,4 +124,3 @@ void sdio_wrprotect(FAR struct sdio_dev_s *dev, bool wrprotect);
|
|||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_SDCARD_H */
|
#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_SDCARD_H */
|
||||||
|
|
||||||
|
|||||||
@@ -198,22 +198,22 @@ void up_allocate_kheap(FAR void **heap_start, size_t *heap_size)
|
|||||||
#if CONFIG_MM_REGIONS > 1
|
#if CONFIG_MM_REGIONS > 1
|
||||||
void up_addregion(void)
|
void up_addregion(void)
|
||||||
{
|
{
|
||||||
/* Add the region */
|
|
||||||
|
|
||||||
kmm_addregion((FAR void*)SAM3U_INTSRAM1_BASE, CONFIG_SAM3U_SRAM1_SIZE);
|
|
||||||
|
|
||||||
/* Allow user access to the heap memory */
|
/* Allow user access to the heap memory */
|
||||||
|
|
||||||
sam3u_mpu_uheap(SAM3U_INTSRAM1_BASE, CONFIG_SAM3U_SRAM1_SIZE);
|
sam3u_mpu_uheap(SAM3U_INTSRAM1_BASE, CONFIG_SAM3U_SRAM1_SIZE);
|
||||||
|
|
||||||
/* Add the region */
|
/* Add the region */
|
||||||
|
|
||||||
#if CONFIG_MM_REGIONS > 2
|
kumm_addregion((FAR void*)SAM3U_INTSRAM1_BASE, CONFIG_SAM3U_SRAM1_SIZE);
|
||||||
kmm_addregion((FAR void*)SAM3U_NFCSRAM_BASE, CONFIG_SAM3U_NFCSRAM_SIZE);
|
|
||||||
|
|
||||||
|
#if CONFIG_MM_REGIONS > 2
|
||||||
/* Allow user access to the heap memory */
|
/* Allow user access to the heap memory */
|
||||||
|
|
||||||
sam3u_mpu_uheap(SAM3U_NFCSRAM_BASE, CONFIG_SAM3U_NFCSRAM_SIZE);
|
sam3u_mpu_uheap(SAM3U_NFCSRAM_BASE, CONFIG_SAM3U_NFCSRAM_SIZE);
|
||||||
|
|
||||||
|
/* Add the region */
|
||||||
|
|
||||||
|
kumm_addregion((FAR void*)SAM3U_NFCSRAM_BASE, CONFIG_SAM3U_NFCSRAM_SIZE);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ OBJS = $(COBJS)
|
|||||||
# Targets:
|
# Targets:
|
||||||
|
|
||||||
all: $(TOPDIR)$(DELIM)nuttx_user.elf $(TOPDIR)$(DELIM)User.map
|
all: $(TOPDIR)$(DELIM)nuttx_user.elf $(TOPDIR)$(DELIM)User.map
|
||||||
.PHONY: depend clean distclean
|
.PHONY: nuttx_user.elf depend clean distclean
|
||||||
|
|
||||||
$(COBJS): %$(OBJEXT): %.c
|
$(COBJS): %$(OBJEXT): %.c
|
||||||
$(call COMPILE, $<, $@)
|
$(call COMPILE, $<, $@)
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ OBJS = $(COBJS)
|
|||||||
# Targets:
|
# Targets:
|
||||||
|
|
||||||
all: $(TOPDIR)$(DELIM)nuttx_user.elf $(TOPDIR)$(DELIM)User.map
|
all: $(TOPDIR)$(DELIM)nuttx_user.elf $(TOPDIR)$(DELIM)User.map
|
||||||
.PHONY: depend clean distclean
|
.PHONY: nuttx_user.elf depend clean distclean
|
||||||
|
|
||||||
$(COBJS): %$(OBJEXT): %.c
|
$(COBJS): %$(OBJEXT): %.c
|
||||||
$(call COMPILE, $<, $@)
|
$(call COMPILE, $<, $@)
|
||||||
|
|||||||
+18
-4
@@ -49,10 +49,12 @@
|
|||||||
|
|
||||||
/* Macro Name: ASSERT, ASSERTCODE, et al. */
|
/* Macro Name: ASSERT, ASSERTCODE, et al. */
|
||||||
|
|
||||||
#undef ASSERT
|
#undef ASSERT - Assert if the condition is not true
|
||||||
#undef ASSERTCODE
|
#undef ASSERTCODE - Assert with an error code if the condition is not true
|
||||||
#undef DEBUGASSERT
|
#undef VERIFY - Assert if a function returns a negative value
|
||||||
#undef PANIC
|
#undef DEBUGASSERT - Like ASSERT, but only if CONFIG_DEBUG is defined
|
||||||
|
#undef DEBUGVERIFY - Like VERIFY, but only if CONFIG_DEBUG is defined
|
||||||
|
#undef PANIC - Unconditional error with code
|
||||||
|
|
||||||
#ifdef CONFIG_HAVE_FILENAME
|
#ifdef CONFIG_HAVE_FILENAME
|
||||||
|
|
||||||
@@ -62,11 +64,17 @@
|
|||||||
# define ASSERTCODE(f, code) \
|
# define ASSERTCODE(f, code) \
|
||||||
{ if (!(f)) up_assert_code((const uint8_t *)__FILE__, (int)__LINE__, code); }
|
{ if (!(f)) up_assert_code((const uint8_t *)__FILE__, (int)__LINE__, code); }
|
||||||
|
|
||||||
|
# define VERIFY(f) \
|
||||||
|
{ if ((f) < 0) up_assert((const uint8_t *)__FILE__, (int)__LINE__); }
|
||||||
|
|
||||||
# ifdef CONFIG_DEBUG
|
# ifdef CONFIG_DEBUG
|
||||||
# define DEBUGASSERT(f) \
|
# define DEBUGASSERT(f) \
|
||||||
{ if (!(f)) up_assert((const uint8_t *)__FILE__, (int)__LINE__); }
|
{ if (!(f)) up_assert((const uint8_t *)__FILE__, (int)__LINE__); }
|
||||||
|
# define DEBUGVERIFY(f) \
|
||||||
|
{ if ((f) < 0) up_assert((const uint8_t *)__FILE__, (int)__LINE__); }
|
||||||
# else
|
# else
|
||||||
# define DEBUGASSERT(f)
|
# define DEBUGASSERT(f)
|
||||||
|
# define DEBUGVERIFY(f) ((void)(f))
|
||||||
# endif /* CONFIG_DEBUG */
|
# endif /* CONFIG_DEBUG */
|
||||||
|
|
||||||
# define PANIC(code) \
|
# define PANIC(code) \
|
||||||
@@ -79,11 +87,17 @@
|
|||||||
# define ASSERTCODE(f, code) \
|
# define ASSERTCODE(f, code) \
|
||||||
{ if (!(f)) up_assert_code(code); }
|
{ if (!(f)) up_assert_code(code); }
|
||||||
|
|
||||||
|
# define VERIFY(f) \
|
||||||
|
{ if ((f) < 0) up_assert(); }
|
||||||
|
|
||||||
# ifdef CONFIG_DEBUG
|
# ifdef CONFIG_DEBUG
|
||||||
# define DEBUGASSERT(f) \
|
# define DEBUGASSERT(f) \
|
||||||
{ if (!(f)) up_assert(); }
|
{ if (!(f)) up_assert(); }
|
||||||
|
# define DEBUGVERIFY(f) \
|
||||||
|
{ if ((f) < 0) up_assert(); }
|
||||||
# else
|
# else
|
||||||
# define DEBUGASSERT(f)
|
# define DEBUGASSERT(f)
|
||||||
|
# define DEBUGVERIFY(f) ((void)(f))
|
||||||
# endif /* CONFIG_DEBUG */
|
# endif /* CONFIG_DEBUG */
|
||||||
|
|
||||||
# define PANIC(code) \
|
# define PANIC(code) \
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
#include <assert.h>
|
||||||
#include <nuttx/mm.h>
|
#include <nuttx/mm.h>
|
||||||
|
|
||||||
#if !defined(CONFIG_NUTTX_KERNEL) || !defined(__KERNEL__)
|
#if !defined(CONFIG_NUTTX_KERNEL) || !defined(__KERNEL__)
|
||||||
|
|||||||
@@ -225,6 +225,10 @@ int group_allocate(FAR struct task_tcb_s *tcb)
|
|||||||
ret = env_dup(group);
|
ret = env_dup(group);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
|
#if CONFIG_NFILE_STREAMS > 0 && defined(CONFIG_NUTTX_KERNEL) && \
|
||||||
|
defined(CONFIG_MM_KERNEL_HEAP)
|
||||||
|
kufree(group->tg_streamlist);
|
||||||
|
#endif
|
||||||
kfree(group);
|
kfree(group);
|
||||||
tcb->cmn.group = NULL;
|
tcb->cmn.group = NULL;
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
@@ -80,14 +80,14 @@
|
|||||||
|
|
||||||
int group_setupidlefiles(FAR struct task_tcb_s *tcb)
|
int group_setupidlefiles(FAR struct task_tcb_s *tcb)
|
||||||
{
|
{
|
||||||
#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0
|
#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||||
FAR struct task_group_s *group = tcb->cmn.group;
|
FAR struct task_group_s *group = tcb->cmn.group;
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_DEV_CONSOLE)
|
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_DEV_CONSOLE)
|
||||||
int fd;
|
int fd;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0
|
#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||||
DEBUGASSERT(group);
|
DEBUGASSERT(group);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+6
-5
@@ -39,8 +39,9 @@
|
|||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <debug.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include <debug.h>
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/compiler.h>
|
#include <nuttx/compiler.h>
|
||||||
@@ -463,28 +464,28 @@ void os_start(void)
|
|||||||
/* Allocate the IDLE group and suppress child status. */
|
/* Allocate the IDLE group and suppress child status. */
|
||||||
|
|
||||||
#ifdef HAVE_TASK_GROUP
|
#ifdef HAVE_TASK_GROUP
|
||||||
(void)group_allocate(&g_idletcb);
|
DEBUGVERIFY(group_allocate(&g_idletcb));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Create stdout, stderr, stdin on the IDLE task. These will be
|
/* Create stdout, stderr, stdin on the IDLE task. These will be
|
||||||
* inherited by all of the threads created by the IDLE task.
|
* inherited by all of the threads created by the IDLE task.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(void)group_setupidlefiles(&g_idletcb);
|
DEBUGVERIFY(group_setupidlefiles(&g_idletcb));
|
||||||
|
|
||||||
/* Complete initialization of the IDLE group. Suppress retention
|
/* Complete initialization of the IDLE group. Suppress retention
|
||||||
* of child status in the IDLE group.
|
* of child status in the IDLE group.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_TASK_GROUP
|
#ifdef HAVE_TASK_GROUP
|
||||||
(void)group_initialize(&g_idletcb);
|
DEBUGVERIFY(group_initialize(&g_idletcb));
|
||||||
g_idletcb.cmn.group->tg_flags = GROUP_FLAG_NOCLDWAIT;
|
g_idletcb.cmn.group->tg_flags = GROUP_FLAG_NOCLDWAIT;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Bring Up the System ****************************************************/
|
/* Bring Up the System ****************************************************/
|
||||||
/* Create initial tasks and bring-up the system */
|
/* Create initial tasks and bring-up the system */
|
||||||
|
|
||||||
(void)os_bringup();
|
DEBUGVERIFY(os_bringup());
|
||||||
|
|
||||||
/* The IDLE Loop **********************************************************/
|
/* The IDLE Loop **********************************************************/
|
||||||
/* When control is return to this point, the system is idle. */
|
/* When control is return to this point, the system is idle. */
|
||||||
|
|||||||
Reference in New Issue
Block a user