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
|
|
|
*
|
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
|
2007-03-12 06:19:01 +08:00
|
|
|
*
|
2021-02-08 23:33:58 +08:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2007-03-12 06:19:01 +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.
|
2007-03-12 06:19:01 +08:00
|
|
|
*
|
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
|
|
|
* 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);
|
2020-05-16 23:06:29 +08:00
|
|
|
int nxtask_setup_scheduler(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);
|
2020-05-16 23:06:29 +08:00
|
|
|
int nxtask_setup_arguments(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 */
|
|
|
|
|
2020-06-07 00:41:47 +08:00
|
|
|
bool nxnotify_cancellation(FAR struct tcb_s *tcb);
|
2016-12-09 22:13:28 +08:00
|
|
|
|
2014-08-09 06:44:08 +08:00
|
|
|
#endif /* __SCHED_TASK_TASK_H */
|