2014-08-09 05:30:59 +08:00
|
|
|
/****************************************************************************
|
|
|
|
* sched/init/init.h
|
|
|
|
*
|
2024-09-11 19:45:11 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
2021-02-08 23:33:58 +08:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership. The
|
|
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance with the
|
|
|
|
* License. You may obtain a copy of the License at
|
2014-08-09 05:30:59 +08:00
|
|
|
*
|
2021-02-08 23:33:58 +08:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2014-08-09 05:30:59 +08:00
|
|
|
*
|
2021-02-08 23:33:58 +08:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2014-08-09 05:30:59 +08:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __SCHED_INIT_INIT_H
|
|
|
|
#define __SCHED_INIT_INIT_H
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Included Files
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Public Function Prototypes
|
|
|
|
****************************************************************************/
|
2016-02-11 03:49:27 +08:00
|
|
|
|
2014-08-09 05:30:59 +08:00
|
|
|
/****************************************************************************
|
2019-02-05 06:20:35 +08:00
|
|
|
* Name: nx_start
|
2014-08-09 05:30:59 +08:00
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* This function is called to initialize the operating system and to spawn
|
|
|
|
* the user initialization thread of execution. This is the initial entry
|
|
|
|
* point into NuttX
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
* None
|
|
|
|
*
|
2018-02-02 00:00:02 +08:00
|
|
|
* Returned Value:
|
2014-08-09 05:30:59 +08:00
|
|
|
* Does not return.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2019-02-05 06:20:35 +08:00
|
|
|
void nx_start(void);
|
2014-08-09 05:30:59 +08:00
|
|
|
|
2016-02-11 03:49:27 +08:00
|
|
|
/****************************************************************************
|
2019-02-05 06:20:35 +08:00
|
|
|
* Name: nx_smp_start
|
2016-02-11 03:49:27 +08:00
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* In an SMP configution, only one CPU is initially active (CPU 0). System
|
|
|
|
* initialization occurs on that single thread. At the completion of the
|
|
|
|
* initialization of the OS, just before beginning normal multitasking,
|
|
|
|
* the additional CPUs would be started by calling this function.
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Returned Value:
|
2018-09-14 20:55:45 +08:00
|
|
|
* Zero on success; a negated errno value on failure.
|
2016-02-11 03:49:27 +08:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifdef CONFIG_SMP
|
2019-02-05 06:20:35 +08:00
|
|
|
int nx_smp_start(void);
|
2016-02-11 03:49:27 +08:00
|
|
|
#endif
|
|
|
|
|
2016-02-13 23:04:54 +08:00
|
|
|
/****************************************************************************
|
2019-02-05 06:20:35 +08:00
|
|
|
* Name: nx_idle_trampoline
|
2016-02-13 23:04:54 +08:00
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* This is the common IDLE task for CPUs 1 through (CONFIG_SMP_NCPUS-1).
|
2019-02-05 06:20:35 +08:00
|
|
|
* It is equivalent to the CPU 0 IDLE logic in nx_start.c
|
2016-02-13 23:04:54 +08:00
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
* Standard task arguments.
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
* This function does not return.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifdef CONFIG_SMP
|
2019-02-05 06:20:35 +08:00
|
|
|
void nx_idle_trampoline(void);
|
2016-03-13 05:29:33 +08:00
|
|
|
#endif
|
|
|
|
|
2014-08-09 05:30:59 +08:00
|
|
|
/****************************************************************************
|
2019-02-05 06:20:35 +08:00
|
|
|
* Name: nx_bringup
|
2014-08-09 05:30:59 +08:00
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Start all initial system tasks. This does the "system bring-up" after
|
|
|
|
* the conclusion of basic OS initialization. These initial system tasks
|
|
|
|
* may include:
|
|
|
|
*
|
2024-03-01 03:21:23 +08:00
|
|
|
* - pg_worker: The page-fault worker thread (if CONFIG_LEGACY_PAGING is
|
|
|
|
* defined).
|
2014-08-09 05:30:59 +08:00
|
|
|
* - work_thread: The work thread. This general thread can be used to
|
|
|
|
* perform most any kind of queued work. Its primary
|
|
|
|
* function is to serve as the "bottom half" of device
|
|
|
|
* drivers.
|
|
|
|
*
|
|
|
|
* And the main application entry point:
|
|
|
|
* symbols:
|
|
|
|
*
|
2021-12-20 12:21:47 +08:00
|
|
|
* - INIT_ENTRYPOINT: This is the default user application entry point.
|
2014-08-09 05:30:59 +08:00
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2019-02-05 06:20:35 +08:00
|
|
|
int nx_bringup(void);
|
2014-08-09 05:30:59 +08:00
|
|
|
|
|
|
|
#endif /* __SCHED_INIT_INIT_H */
|