Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
NuttX RTOS
Commits
22259401
Commit
22259401
authored
9 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
SMP: Add per-CPU initialization logic
parent
79c1fa5b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
arch
+1
-1
1 addition, 1 deletion
arch
include/nuttx/arch.h
+22
-0
22 additions, 0 deletions
include/nuttx/arch.h
sched/init/os_smpstart.c
+11
-4
11 additions, 4 deletions
sched/init/os_smpstart.c
with
34 additions
and
5 deletions
arch
@
e1ae334f
Subproject commit
9336bbac1c82d417d65d0a973359e4fad25e2dd1
Subproject commit
e1ae334ff043872b3678fc7fd48bea6125e8ea44
This diff is collapsed.
Click to expand it.
include/nuttx/arch.h
+
22
−
0
View file @
22259401
...
...
@@ -1753,6 +1753,28 @@ int up_cpu_index(void);
int
up_cpu_start
(
int
cpu
);
#endif
/****************************************************************************
* Name: up_cpu_initialize
*
* Description:
* After the CPU has been started (via up_cpu_start()) the system will
* call back into the architecture-specific code with this function on the
* thread of execution of the newly started CPU. This gives the
* architecture-specific a chance to perform ny initial, CPU-specific
* initialize on that thread.
*
* Input Parameters:
* None
*
* Returned Value:
* Zero on success; a negated errno value on failure.
*
****************************************************************************/
#ifdef CONFIG_SMP
int
up_cpu_initialize
(
void
);
#endif
/****************************************************************************
* Name: up_cpu_pause
*
...
...
This diff is collapsed.
Click to expand it.
sched/init/os_smpstart.c
+
11
−
4
View file @
22259401
...
...
@@ -80,11 +80,14 @@ static const char g_idlename[] = "CPUn Idle"
* Name: os_idle_trampoline
*
* Description:
* This is the common IDLE task for CPUs 1 through (CONFIG_SMP_NCPUS-1).
* It is equivalent to the CPU 0 IDLE logic in os_start.c
* This is the common start-up logic for the IDLE task for CPUs 1 through
* (CONFIG_SMP_NCPUS-1). Having a start-up function such as this for the
* IDLE is not really an architectural necessity. It is used only for
* symmetry with now other threads are started (see task_start() and
* pthread_start()).
*
* Input Parameters:
*
Standard task arguments
.
*
None
.
*
* Returned Value:
* This function does not return.
...
...
@@ -93,7 +96,11 @@ static const char g_idlename[] = "CPUn Idle"
void
os_idle_trampoline
(
void
)
{
/* Transfer control to the IDLE task */
/* Perform architecture-specific initialization for this CPU */
up_cpu_initialize
();
/* Then transfer control to the IDLE task */
(
void
)
os_idle_task
(
0
,
NULL
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment