2008-01-29 08:50:16 +08:00
|
|
|
/****************************************************************************
|
2014-08-09 06:44:08 +08:00
|
|
|
* sched/task/task.h
|
2007-03-12 06:19:01 +08:00
|
|
|
*
|
2014-08-09 06:44:08 +08:00
|
|
|
* Copyright (C) 2007-2014 Gregory Nutt. All rights reserved.
|
2012-07-15 03:30:31 +08:00
|
|
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
2007-03-12 06:19:01 +08:00
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
*
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in
|
|
|
|
* the documentation and/or other materials provided with the
|
|
|
|
* distribution.
|
2008-01-29 08:50:16 +08:00
|
|
|
* 3. Neither the name NuttX nor the names of its contributors may be
|
2007-03-12 06:19:01 +08:00
|
|
|
* used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
|
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
|
|
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
|
|
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
|
|
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
|
|
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
|
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*
|
2008-01-29 08:50:16 +08:00
|
|
|
****************************************************************************/
|
2007-03-12 06:19:01 +08:00
|
|
|
|
2014-08-09 06:44:08 +08:00
|
|
|
#ifndef __SCHED_TASK_TASK_H
|
|
|
|
#define __SCHED_TASK_TASK_H
|
|
|
|
|
2008-01-29 08:50:16 +08:00
|
|
|
/****************************************************************************
|
2007-03-12 06:19:01 +08:00
|
|
|
* Included Files
|
2008-01-29 08:50:16 +08:00
|
|
|
****************************************************************************/
|
2007-03-12 06:19:01 +08:00
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
2014-08-09 06:44:08 +08:00
|
|
|
#include <nuttx/compiler.h>
|
2009-12-15 02:39:29 +08:00
|
|
|
|
2014-08-09 06:44:08 +08:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <stdbool.h>
|
2012-07-15 03:30:31 +08:00
|
|
|
|
2014-08-09 06:44:08 +08:00
|
|
|
#include <nuttx/sched.h>
|
2007-03-12 06:19:01 +08:00
|
|
|
|
2008-01-29 08:50:16 +08:00
|
|
|
/****************************************************************************
|
2014-08-09 06:44:08 +08:00
|
|
|
* Pre-processor Definitions
|
2008-01-29 08:50:16 +08:00
|
|
|
****************************************************************************/
|
2007-03-12 06:19:01 +08:00
|
|
|
|
2008-01-29 08:50:16 +08:00
|
|
|
/****************************************************************************
|
2014-08-09 06:44:08 +08:00
|
|
|
* Public Type Definitions
|
2008-01-29 08:50:16 +08:00
|
|
|
****************************************************************************/
|
2007-03-12 06:19:01 +08:00
|
|
|
|
2008-01-29 08:50:16 +08:00
|
|
|
/****************************************************************************
|
2015-10-03 06:30:35 +08:00
|
|
|
* Public Data
|
2008-01-29 08:50:16 +08:00
|
|
|
****************************************************************************/
|
|
|
|
/****************************************************************************
|
2014-08-09 06:44:08 +08:00
|
|
|
* Public Function Prototypes
|
2008-01-29 08:50:16 +08:00
|
|
|
****************************************************************************/
|
2007-03-12 06:19:01 +08:00
|
|
|
|
2015-07-24 23:03:21 +08:00
|
|
|
struct tcb_s; /* Forward reference */
|
|
|
|
|
2014-09-04 03:47:11 +08:00
|
|
|
/* Task start-up */
|
|
|
|
|
This commit renames all internal OS functions defined under sched/task so that they begin with the prefix. For example, nxtask_exit() vs. task_exit().
Squashed commit of the following:
Trivial, cosmetic
sched/, arch/, and include: Rename task_vforkstart() as nxtask_vforkstart()
sched/, arch/, and include: Rename task_vforkabort() as nxtask_vforkabort()
sched/, arch/, and include: Rename task_vforksetup() as nxtask_vfork_setup()
sched/: Rename notify_cancellation() as nxnotify_cancellation()
sched/: Rename task_recover() to nxtask_recover()
sched/task, sched/pthread/, Documentation/: Rename task_argsetup() and task_terminate() to nxtask_argsetup() and nxtask_terminate(), respectively.
sched/task: Rename task_schedsetup() to nxtask_schedsetup()
sched/ (plus some binfmt/, include/, and arch/): Rename task_start() and task_starthook() to nxtask_start() and nxtask_starthook().
arch/ and sched/: Rename task_exit() and task_exithook() to nxtask_exit() and nxtask_exithook(), respectively.
sched/task: Rename all internal, static, functions to begin with the nx prefix.
2019-02-05 03:42:51 +08:00
|
|
|
void nxtask_start(void);
|
|
|
|
int nxtask_schedsetup(FAR struct task_tcb_s *tcb, int priority,
|
2014-08-09 06:44:08 +08:00
|
|
|
start_t start, main_t main, uint8_t ttype);
|
This commit renames all internal OS functions defined under sched/task so that they begin with the prefix. For example, nxtask_exit() vs. task_exit().
Squashed commit of the following:
Trivial, cosmetic
sched/, arch/, and include: Rename task_vforkstart() as nxtask_vforkstart()
sched/, arch/, and include: Rename task_vforkabort() as nxtask_vforkabort()
sched/, arch/, and include: Rename task_vforksetup() as nxtask_vfork_setup()
sched/: Rename notify_cancellation() as nxnotify_cancellation()
sched/: Rename task_recover() to nxtask_recover()
sched/task, sched/pthread/, Documentation/: Rename task_argsetup() and task_terminate() to nxtask_argsetup() and nxtask_terminate(), respectively.
sched/task: Rename task_schedsetup() to nxtask_schedsetup()
sched/ (plus some binfmt/, include/, and arch/): Rename task_start() and task_starthook() to nxtask_start() and nxtask_starthook().
arch/ and sched/: Rename task_exit() and task_exithook() to nxtask_exit() and nxtask_exithook(), respectively.
sched/task: Rename all internal, static, functions to begin with the nx prefix.
2019-02-05 03:42:51 +08:00
|
|
|
int nxtask_argsetup(FAR struct task_tcb_s *tcb, FAR const char *name,
|
2014-08-09 06:44:08 +08:00
|
|
|
FAR char * const argv[]);
|
2014-09-04 03:47:11 +08:00
|
|
|
|
|
|
|
/* Task exit */
|
|
|
|
|
This commit renames all internal OS functions defined under sched/task so that they begin with the prefix. For example, nxtask_exit() vs. task_exit().
Squashed commit of the following:
Trivial, cosmetic
sched/, arch/, and include: Rename task_vforkstart() as nxtask_vforkstart()
sched/, arch/, and include: Rename task_vforkabort() as nxtask_vforkabort()
sched/, arch/, and include: Rename task_vforksetup() as nxtask_vfork_setup()
sched/: Rename notify_cancellation() as nxnotify_cancellation()
sched/: Rename task_recover() to nxtask_recover()
sched/task, sched/pthread/, Documentation/: Rename task_argsetup() and task_terminate() to nxtask_argsetup() and nxtask_terminate(), respectively.
sched/task: Rename task_schedsetup() to nxtask_schedsetup()
sched/ (plus some binfmt/, include/, and arch/): Rename task_start() and task_starthook() to nxtask_start() and nxtask_starthook().
arch/ and sched/: Rename task_exit() and task_exithook() to nxtask_exit() and nxtask_exithook(), respectively.
sched/task: Rename all internal, static, functions to begin with the nx prefix.
2019-02-05 03:42:51 +08:00
|
|
|
int nxtask_exit(void);
|
|
|
|
int nxtask_terminate(pid_t pid, bool nonblocking);
|
|
|
|
void nxtask_exithook(FAR struct tcb_s *tcb, int status, bool nonblocking);
|
|
|
|
void nxtask_recover(FAR struct tcb_s *tcb);
|
2014-09-04 03:47:11 +08:00
|
|
|
|
2016-12-09 22:13:28 +08:00
|
|
|
/* Cancellation points */
|
|
|
|
|
|
|
|
#ifdef CONFIG_CANCELLATION_POINTS
|
This commit renames all internal OS functions defined under sched/task so that they begin with the prefix. For example, nxtask_exit() vs. task_exit().
Squashed commit of the following:
Trivial, cosmetic
sched/, arch/, and include: Rename task_vforkstart() as nxtask_vforkstart()
sched/, arch/, and include: Rename task_vforkabort() as nxtask_vforkabort()
sched/, arch/, and include: Rename task_vforksetup() as nxtask_vfork_setup()
sched/: Rename notify_cancellation() as nxnotify_cancellation()
sched/: Rename task_recover() to nxtask_recover()
sched/task, sched/pthread/, Documentation/: Rename task_argsetup() and task_terminate() to nxtask_argsetup() and nxtask_terminate(), respectively.
sched/task: Rename task_schedsetup() to nxtask_schedsetup()
sched/ (plus some binfmt/, include/, and arch/): Rename task_start() and task_starthook() to nxtask_start() and nxtask_starthook().
arch/ and sched/: Rename task_exit() and task_exithook() to nxtask_exit() and nxtask_exithook(), respectively.
sched/task: Rename all internal, static, functions to begin with the nx prefix.
2019-02-05 03:42:51 +08:00
|
|
|
void nxnotify_cancellation(FAR struct tcb_s *tcb);
|
2016-12-09 22:13:28 +08:00
|
|
|
#endif
|
|
|
|
|
2014-08-09 06:44:08 +08:00
|
|
|
#endif /* __SCHED_TASK_TASK_H */
|