mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 16:53:33 +08:00
Fixed ARM vfork; re-enabled vfork OS test
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5490 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -51,12 +51,6 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Disabled this test for now. There are some issues with the vfork
|
|
||||||
* implementation.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#undef CONFIG_ARCH_HAVE_VFORK
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
vfork:
|
vfork:
|
||||||
/* Create a stack frame */
|
/* Create a stack frame */
|
||||||
|
|
||||||
mov r0, sp /* Save the value of the stack frame on entry */
|
mov r0, sp /* Save the value of the stack on entry */
|
||||||
sub sp, sp, #VFORK_SIZEOF /* Allocate the structure on the stack */
|
sub sp, sp, #VFORK_SIZEOF /* Allocate the structure on the stack */
|
||||||
|
|
||||||
/* Save the volatile registers */
|
/* Save the volatile registers */
|
||||||
@@ -128,6 +128,7 @@ vfork:
|
|||||||
|
|
||||||
/* Release the stack data and return the value returned by up_vfork */
|
/* Release the stack data and return the value returned by up_vfork */
|
||||||
|
|
||||||
|
ldr lr, [sp, #VFORK_LR_OFFSET]
|
||||||
add sp, sp, #VFORK_SIZEOF
|
add sp, sp, #VFORK_SIZEOF
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
.size vfork, .-vfork
|
.size vfork, .-vfork
|
||||||
|
|||||||
@@ -105,7 +105,7 @@
|
|||||||
vfork:
|
vfork:
|
||||||
/* Create a stack frame */
|
/* Create a stack frame */
|
||||||
|
|
||||||
mov r0, sp /* Save the value of the stack frame on entry */
|
mov r0, sp /* Save the value of the stack on entry */
|
||||||
sub sp, sp, #VFORK_SIZEOF /* Allocate the structure on the stack */
|
sub sp, sp, #VFORK_SIZEOF /* Allocate the structure on the stack */
|
||||||
|
|
||||||
/* Save the volatile registers */
|
/* Save the volatile registers */
|
||||||
@@ -131,6 +131,7 @@ vfork:
|
|||||||
|
|
||||||
/* Release the stack data and return the value returned by up_vfork */
|
/* Release the stack data and return the value returned by up_vfork */
|
||||||
|
|
||||||
|
ldr lr, [sp, #VFORK_LR_OFFSET]
|
||||||
add sp, sp, #VFORK_SIZEOF
|
add sp, sp, #VFORK_SIZEOF
|
||||||
bx lr
|
bx lr
|
||||||
.size vfork, .-vfork
|
.size vfork, .-vfork
|
||||||
|
|||||||
@@ -124,7 +124,7 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
pid_t up_vfork(struct vfork_s *context)
|
pid_t up_vfork(const struct vfork_s *context)
|
||||||
{
|
{
|
||||||
_TCB *parent = (FAR _TCB *)g_readytorun.head;
|
_TCB *parent = (FAR _TCB *)g_readytorun.head;
|
||||||
_TCB *child;
|
_TCB *child;
|
||||||
|
|||||||
Reference in New Issue
Block a user