2014-08-08 23:30:59 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* sched/init/init.h
|
|
|
|
*
|
2024-09-11 13:45:11 +02:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
2021-02-08 16:33:58 +01: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-08 23:30:59 +02:00
|
|
|
*
|
2021-02-08 16:33:58 +01:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2014-08-08 23:30:59 +02:00
|
|
|
*
|
2021-02-08 16:33:58 +01: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-08 23:30:59 +02:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __SCHED_INIT_INIT_H
|
|
|
|
#define __SCHED_INIT_INIT_H
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Included Files
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Public Function Prototypes
|
|
|
|
****************************************************************************/
|
2016-02-10 20:49:27 +01:00
|
|
|
|
2014-08-08 23:30:59 +02:00
|
|
|
/****************************************************************************
|
2019-02-04 23:20:35 +01:00
|
|
|
* Name: nx_start
|
2014-08-08 23:30:59 +02: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-01 17:00:02 +01:00
|
|
|
* Returned Value:
|
2014-08-08 23:30:59 +02:00
|
|
|
* Does not return.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2019-02-04 23:20:35 +01:00
|
|
|
void nx_start(void);
|
2014-08-08 23:30:59 +02:00
|
|
|
|
2016-02-10 20:49:27 +01:00
|
|
|
/****************************************************************************
|
2019-02-04 23:20:35 +01:00
|
|
|
* Name: nx_smp_start
|
2016-02-10 20:49:27 +01: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 14:55:45 +02:00
|
|
|
* Zero on success; a negated errno value on failure.
|
2016-02-10 20:49:27 +01:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifdef CONFIG_SMP
|
2019-02-04 23:20:35 +01:00
|
|
|
int nx_smp_start(void);
|
2016-02-10 20:49:27 +01:00
|
|
|
#endif
|
|
|
|
|
2016-02-13 16:04:54 +01:00
|
|
|
/****************************************************************************
|
2019-02-04 23:20:35 +01:00
|
|
|
* Name: nx_idle_trampoline
|
2016-02-13 16:04:54 +01:00
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* This is the common IDLE task for CPUs 1 through (CONFIG_SMP_NCPUS-1).
|
2019-02-04 23:20:35 +01:00
|
|
|
* It is equivalent to the CPU 0 IDLE logic in nx_start.c
|
2016-02-13 16:04:54 +01:00
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
* Standard task arguments.
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
* This function does not return.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifdef CONFIG_SMP
|
2019-02-04 23:20:35 +01:00
|
|
|
void nx_idle_trampoline(void);
|
2016-03-12 22:29:33 +01:00
|
|
|
#endif
|
|
|
|
|
2014-08-08 23:30:59 +02:00
|
|
|
/****************************************************************************
|
2019-02-04 23:20:35 +01:00
|
|
|
* Name: nx_bringup
|
2014-08-08 23:30:59 +02: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-02-29 20:21:23 +01:00
|
|
|
* - pg_worker: The page-fault worker thread (if CONFIG_LEGACY_PAGING is
|
|
|
|
* defined).
|
2014-08-08 23:30:59 +02: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 05:21:47 +01:00
|
|
|
* - INIT_ENTRYPOINT: This is the default user application entry point.
|
2014-08-08 23:30:59 +02:00
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2019-02-04 23:20:35 +01:00
|
|
|
int nx_bringup(void);
|
2014-08-08 23:30:59 +02:00
|
|
|
|
|
|
|
#endif /* __SCHED_INIT_INIT_H */
|