#include <tinyara/config.h>
#include <sys/types.h>
#include <stdint.h>
#include <queue.h>
#include <signal.h>
#include <semaphore.h>
#include <pthread.h>
#include <mqueue.h>
#include <time.h>
#include <tinyara/irq.h>
#include <tinyara/mm/shm.h>
#include <tinyara/fs/fs.h>
#include <tinyara/net/net.h>
#include <arch/arch.h>
Go to the source code of this file.
|
union | entry_u |
| This is the entry point into the main thread of the task or into a created pthread within the task. More...
|
|
struct | child_status_s |
| This structure is used to maintin information about child tasks. pthreads work differently, they have join information. This is only for child tasks. More...
|
|
struct | dspace_s |
| This structure describes a reference counted D-Space region. This must be a separately allocated "break-away" structure that can be owned by a task and any pthreads created by the task. More...
|
|
struct | task_group_s |
| Structure for Task Group Information. More...
|
|
struct | tcb_s |
| This is the common part of the task control block (TCB). The TCB is the heart of the TinyAra task-control logic. Each task or thread is represented by a TCB that includes these common definitions. More...
|
|
struct | task_tcb_s |
| This is the particular form of the task control block (TCB) structure used by tasks (and kernel threads). There are two TCB forms: one for pthreads and one for tasks. Both share the common TCB fields (which must appear at the top of the structure) plus additional fields unique to tasks and threads. Having separate structures for tasks and pthreads adds some complexity, but saves memory in that it prevents pthreads from being burdened with the overhead required for tasks (and vice versa). More...
|
|
struct | pthread_tcb_s |
| This is the particular form of the task control block (TCB) structure used by pthreads. There are two TCB forms: one for pthreads and one for tasks. Both share the common TCB fields (which must appear at the top of the structure) plus additional fields unique to tasks and threads. Having separate structures for tasks and pthreads adds some complexity, but saves memory in that it prevents pthreads from being burdened with the overhead required for tasks (and vice versa). More...
|
|
|
FAR struct tcb_s * | sched_self (void) |
| returns the TCB of the currently running task (i.e., the caller) More...
|
|
void | sched_foreach (sched_foreach_t handler, FAR void *arg) |
| enumerate over each task and provide the TCB of each task or thread to a callback function. Interrupts will be disabled throughout this enumeration! More...
|
|
FAR struct tcb_s * | sched_gettcb (pid_t pid) |
| Give a task ID, look up the corresponding TCB. More...
|
|
#define CHILD_FLAG_EXITED (1 << 0) /* Bit 2: The child thread has exit'ed */ |
#define CHILD_FLAG_TTYPE_SHIFT (0) /* Bits 0-1: child thread type */ |
#define GROUP_FLAG_ADDRENV (1 << 1) /* Bit 1: Group has an address environment */ |
#define GROUP_FLAG_NOCLDWAIT (1 << 0) /* Bit 0: Do not retain child exit status */ |
#define GROUP_FLAG_PRIVILEGED (1 << 2) /* Bit 2: Group is privileged */ |
#define HAVE_GROUP_MEMBERS 1 |
#define HAVE_TASK_GROUP 1 |
#define INVALID_PROCESS_ID (pid_t)-1 |
#define MAX_LOCK_COUNT 127 |
#define NULL_TASK_PROCESS_ID (pid_t)0 |
#define TCB_FLAG_CANCEL_PENDING (1 << 3) /* Bit 3: Pthread cancel is pending */ |
#define TCB_FLAG_EXIT_PROCESSING (1 << 5) /* Bit 5: Exitting */ |
#define TCB_FLAG_NONCANCELABLE (1 << 2) /* Bit 2: Pthread is non-cancelable */ |
#define TCB_FLAG_ROUND_ROBIN (1 << 4) /* Bit 4: Round robin sched enabled */ |
#define TCB_FLAG_TTYPE_SHIFT (0) /* Bits 0-1: thread type */ |
typedef CODE void(* atexitfunc_t) (void) |
typedef CODE void(* onexitfunc_t) (int exitcode, FAR void *arg) |
typedef void(* sched_foreach_t) (FAR struct tcb_s *tcb, FAR void *arg) |
typedef CODE void(* start_t) (void) |
typedef CODE void(* starthook_t) (FAR void *arg) |
This is the type of the task_state field of the TCB. NOTE: the order and content of this enumeration is critical since there are some OS tables indexed by these values. The range of values is assumed to fit into a uint8_t in struct tcb_s.
Enumerator |
---|
TSTATE_TASK_INVALID |
|
TSTATE_TASK_PENDING |
|
TSTATE_TASK_READYTORUN |
|
TSTATE_TASK_RUNNING |
|
TSTATE_TASK_INACTIVE |
|
TSTATE_WAIT_SEM |
|
TSTATE_WAIT_SIG |
|
TSTATE_WAIT_MQNOTEMPTY |
|
TSTATE_WAIT_MQNOTFULL |
|
NUM_TASK_STATES |
|
Definition at line 187 of file sched.h.