struct Thread

Defined at line 1141 of file ../../zircon/kernel/include/kernel/thread.h

Forward declarations.

Public Methods

void Thread (uint32_t prio)

Defined at line 18 of file ../../src/zircon/testing/mutex_pi_exerciser/thread.cc

int thread (void * mutex_ptr)

Defined at line 20 of file ../../sdk/lib/c/pthread/pthread-getsetname-test.cc

zx_status_t InitializeProfileResource ()

static

Defined at line 23 of file ../../src/zircon/testing/mutex_pi_exerciser/thread.cc

void Thread ()

TODO(kulakowski) Are these needed?

Default constructor/destructor declared to be not-inline in order to

avoid circular include dependencies involving Thread, WaitQueue, and

OwnedWaitQueue.

Defined at line 26 of file ../../sdk/lib/c/pthread/pthread-getsetname-test.cc

void ~Thread ()

Defined at line 31 of file ../../sdk/lib/c/pthread/pthread-getsetname-test.cc

void Thread (Thread && )

Defined at line 32 of file ../../src/zircon/testing/mutex_pi_exerciser/thread.h

void Thread (const Thread & )

Defined at line 32 of file ../../src/zircon/testing/mutex_pi_exerciser/thread.h

Thread & operator= (Thread && )

Defined at line 32 of file ../../src/zircon/testing/mutex_pi_exerciser/thread.h

Thread & operator= (const Thread & )

Defined at line 32 of file ../../src/zircon/testing/mutex_pi_exerciser/thread.h

uint32_t prio ()

Defined at line 35 of file ../../src/zircon/testing/mutex_pi_exerciser/thread.h

thrd_t operator unsigned long ()

Defined at line 36 of file ../../sdk/lib/c/pthread/pthread-getsetname-test.cc

zx_status_t WaitForReset ()

Defined at line 39 of file ../../src/zircon/testing/mutex_pi_exerciser/thread.h

zx_status_t Start (Thunk thunk)

Defined at line 71 of file ../../src/zircon/testing/mutex_pi_exerciser/thread.cc

void Thread (ktl::string_view name)

The default constructor leaves the object in a state equivalent to before

construction, and is only used for special cases that get re-constructed

via placement new using this signature.

Defined at line 242 of file ../../zircon/kernel/kernel/thread.cc

Thread * Create (const char * name, thread_start_routine entry, void * arg, int priority)

Creates a thread with |name| that will execute |entry| at |priority|. |arg|

will be passed to |entry| when executed, the return value of |entry| will be

passed to Exit().

This call allocates a thread and places it in the global thread list. This

memory will be freed by either Join() or Detach(), one of these

MUST be called.

The thread will not be scheduled until Resume() is called.

Defined at line 464 of file ../../zircon/kernel/kernel/thread.cc

Thread * Create (const char * name, thread_start_routine entry, void * arg, const SchedulerState::BaseProfile & profile)

Defined at line 469 of file ../../zircon/kernel/kernel/thread.cc

Thread * CreateEtc (Thread * t, const char * name, thread_start_routine entry, void * arg, const SchedulerState::BaseProfile & profile, thread_trampoline_routine alt_trampoline)

Create a new thread

This function creates a new thread. The thread is initially suspended, so you

need to call thread_resume() to execute it.

Thread priority is an integer from 0 (lowest) to 31 (highest). Some standard

priorities are defined in

<kernel

/thread.h>:

HIGHEST_PRIORITY

DPC_PRIORITY

HIGH_PRIORITY

DEFAULT_PRIORITY

LOW_PRIORITY

IDLE_PRIORITY

LOWEST_PRIORITY

Parameters

t If not nullptr, use the supplied Thread
name Name of thread
entry Entry point of thread
arg Arbitrary argument passed to entry(). It can be null. in which case |user_thread| will be used.
priority Execution priority for the thread.
alt_trampoline If not nullptr, an alternate trampoline for the thread to start on.

Returns

Pointer to thread object, or nullptr on failure.

Defined at line 375 of file ../../zircon/kernel/kernel/thread.cc

void Resume ()

Make a suspended thread executable.

This function is called to start a thread which has just been

created with thread_create() or which has been suspended with

thread_suspend(). It can not fail.

Defined at line 481 of file ../../zircon/kernel/kernel/thread.cc

void Forget ()

Remove this thread from the scheduler, discarding

its execution state.

This is almost certainly not the function you want. In the general case,

this is incredibly unsafe.

This will free any resources allocated by thread_create.

Defined at line 929 of file ../../zircon/kernel/kernel/thread.cc

zx_status_t RestrictedKick ()

Defined at line 700 of file ../../zircon/kernel/kernel/thread.cc

zx_status_t Detach ()

Marks a thread as detached, in this state its memory will be released once

execution is done.

Defined at line 850 of file ../../zircon/kernel/kernel/thread.cc

zx_status_t DetachAndResume ()

Defined at line 540 of file ../../zircon/kernel/kernel/thread.cc

zx_status_t Join (int * retcode, zx_instant_mono_t deadline)

Waits |deadline| time for a thread to complete execution then releases its memory.

Defined at line 766 of file ../../zircon/kernel/kernel/thread.cc

zx_status_t CheckKillOrSuspendSignal ()

Checks whether the kill or suspend signal has been raised. If kill has been

raised, then `ZX_ERR_INTERNAL_INTR_KILLED` will be returned. If suspend has

been raised, then `ZX_ERR_INTERNAL_INTR_RETRY` will be returned. Otherwise,

`ZX_OK` will be returned.

Defined at line 1263 of file ../../zircon/kernel/kernel/thread.cc

void EraseFromListsLocked ()

Erase this thread from all global lists, where applicable.

Defined at line 759 of file ../../zircon/kernel/kernel/thread.cc

cpu_mask_t SetCpuAffinity (cpu_mask_t affinity)

Get/set the mask of valid CPUs that thread may run on. If a new mask

is set, the thread will be migrated to satisfy the new constraint.

Affinity comes in two flavours:

* "hard affinity", which will always be respected by the scheduler.

The scheduler will panic if it can't satisfy this affinity.

* "soft affinity" indicating where the thread should ideally be scheduled.

The scheduler will respect the mask unless there are no other

options (e.g., the soft affinity and hard affinity don't contain

any common CPUs).

If the two masks conflict, the hard affinity wins.

Setting the affinity mask returns the previous value to make pinning and

restoring operations simpler and more efficient.

See scheduler.h for the declaration of the affinity setters.

Defined at line 1128 of file ../../zircon/kernel/kernel/thread.cc

cpu_mask_t GetCpuAffinity ()

Defined at line 1133 of file ../../zircon/kernel/kernel/thread.cc

cpu_mask_t SetSoftCpuAffinity (cpu_mask_t affinity)

Defined at line 1139 of file ../../zircon/kernel/kernel/thread.cc

cpu_mask_t GetSoftCpuAffinity ()

Defined at line 1144 of file ../../zircon/kernel/kernel/thread.cc

void SetMigrateFn (MigrateFn migrate_fn)

Defined at line 1154 of file ../../zircon/kernel/kernel/thread.cc

void SetMigrateFnLocked (MigrateFn migrate_fn)

Defined at line 1160 of file ../../zircon/kernel/kernel/thread.cc

void CallMigrateFnLocked (MigrateStage stage)

Defined at line 1190 of file ../../zircon/kernel/kernel/thread.cc

void AssertIsCurrentThread ()

Defined at line 1198 of file ../../zircon/kernel/include/kernel/thread.h

fbl::NullLock & get_scheduler_variable_lock ()

Returns the lock that protects the thread's internal state, particularly with respect to

scheduling.

Defined at line 1204 of file ../../zircon/kernel/include/kernel/thread.h

::lockdep::LockDep<Thread, SpinLock, 1815, ::lockdep::internal::DefaultLockFlags<>::value> & get_list_lock ()

Defined at line 1207 of file ../../zircon/kernel/include/kernel/thread.h

ThreadDispatcher * user_thread ()

Get the associated ThreadDispatcher.

Defined at line 1210 of file ../../zircon/kernel/include/kernel/thread.h

const ThreadDispatcher * user_thread ()

Defined at line 1211 of file ../../zircon/kernel/include/kernel/thread.h

zx_koid_t pid ()

Returns the koid of the associated ProcessDispatcher for user threads or

ZX_KOID_INVLID for kernel threads.

Defined at line 1215 of file ../../zircon/kernel/include/kernel/thread.h

zx_koid_t tid ()

Returns the koid of the associated ThreadDispatcher for user threads or an

independent koid for kernel threads.

Defined at line 1219 of file ../../zircon/kernel/include/kernel/thread.h

fxt::ThreadRef<fxt::RefType::kInline> fxt_ref ()

Return the pid/tid of the thread as a tracing thread reference.

Defined at line 1222 of file ../../zircon/kernel/include/kernel/thread.h

fxt::ThreadRef<fxt::RefType::kInline> operator ThreadRef ()

Implicit conversion to a tracing thread reference.

Defined at line 1225 of file ../../zircon/kernel/include/kernel/thread.h

zx_status_t Suspend ()

Defined at line 1229 of file ../../zircon/kernel/include/kernel/thread.h

void CallMigrateFnForCpu (cpu_num_t cpu)

Call |migrate_fn| for each thread that was last run on the current CPU.

Note: no locks should be held during this operation, and interrupts need to

be disabled.

Defined at line 1229 of file ../../zircon/kernel/kernel/thread.cc

void Kill ()

Deliver a kill signal to a thread.

Defined at line 1239 of file ../../zircon/kernel/include/kernel/thread.h

void SetContextSwitchFn (ContextSwitchFn context_switch_fn)

Defined at line 1242 of file ../../zircon/kernel/kernel/thread.cc

void SetContextSwitchFnLocked (ContextSwitchFn context_switch_fn)

Defined at line 1248 of file ../../zircon/kernel/kernel/thread.cc

void set_name (ktl::string_view name)

This may truncate |name|, so that it (including a trailing NUL

byte) fit in ZX_MAX_NAME_LEN bytes.

Defined at line 235 of file ../../zircon/kernel/kernel/thread.cc

void * recursive_object_deletion_list ()

Defined at line 1260 of file ../../zircon/kernel/include/kernel/thread.h

void set_recursive_object_deletion_list (void * ptr)

Defined at line 1261 of file ../../zircon/kernel/include/kernel/thread.h

void CallContextSwitchFnLocked ()

Call |context_switch_fn| for this thread.

Defined at line 1336 of file ../../zircon/kernel/include/kernel/thread.h

void SignalSampleStack (Timer * t, zx_instant_mono_t , void * per_cpu_state)

Request a thread to check if it should sample its backtrace. When the thread returns to

usermode, it will take a sample of its userstack if sampling is enabled.

Defined at line 1337 of file ../../zircon/kernel/kernel/thread.cc

void SignalCheckRestartableSequenceIfNeeded ()

Defined at line 1342 of file ../../zircon/kernel/include/kernel/thread.h

void set_rseq_accessor (page_map::Accessor<zx_rseq_t> accessor)

Defined at line 1349 of file ../../zircon/kernel/include/kernel/thread.h

bool IsSignaled ()

Return true if thread has been signaled.

Defined at line 1364 of file ../../zircon/kernel/include/kernel/thread.h

bool IsIdle ()

Defined at line 1365 of file ../../zircon/kernel/include/kernel/thread.h

bool IsUserStateSavedLocked ()

Returns true if this Thread's user state has been saved.

Caller must hold the thread's lock.

Defined at line 1370 of file ../../zircon/kernel/include/kernel/thread.h

thread_state state ()

Accessors into Thread state. When the conversion to all-private

members is complete (bug 54383), we can revisit the overall

Thread API.

Defined at line 1526 of file ../../zircon/kernel/include/kernel/thread.h

SchedulerQueueState::Disposition disposition ()

Defined at line 1527 of file ../../zircon/kernel/include/kernel/thread.h

void set_running ()

The scheduler can set threads to be running, or to be ready to run.

Defined at line 1532 of file ../../zircon/kernel/include/kernel/thread.h

void set_ready ()

Defined at line 1533 of file ../../zircon/kernel/include/kernel/thread.h

void set_blocked ()

While wait queues can set threads to be blocked.

Defined at line 1535 of file ../../zircon/kernel/include/kernel/thread.h

void set_blocked_read_lock ()

Defined at line 1536 of file ../../zircon/kernel/include/kernel/thread.h

void set_sleeping ()

The thread can set itself to be sleeping.

Defined at line 1540 of file ../../zircon/kernel/include/kernel/thread.h

void set_death ()

Defined at line 1541 of file ../../zircon/kernel/include/kernel/thread.h

void set_suspended ()

Defined at line 1542 of file ../../zircon/kernel/include/kernel/thread.h

bool detatched ()

Accessors for specific flags_ bits.

Defined at line 1545 of file ../../zircon/kernel/include/kernel/thread.h

void set_detached (bool value)

Defined at line 1546 of file ../../zircon/kernel/include/kernel/thread.h

bool free_struct ()

Defined at line 1553 of file ../../zircon/kernel/include/kernel/thread.h

void set_free_struct (bool value)

Defined at line 1554 of file ../../zircon/kernel/include/kernel/thread.h

bool idle ()

Defined at line 1561 of file ../../zircon/kernel/include/kernel/thread.h

void set_idle (bool value)

Defined at line 1562 of file ../../zircon/kernel/include/kernel/thread.h

bool vcpu ()

Defined at line 1569 of file ../../zircon/kernel/include/kernel/thread.h

void set_vcpu (bool value)

Defined at line 1570 of file ../../zircon/kernel/include/kernel/thread.h

unsigned int flags ()

Access to the entire flags_ value, for diagnostics.

Defined at line 1579 of file ../../zircon/kernel/include/kernel/thread.h

uint32_t signals ()

Only these three methods directly access the signals_ member.

TODO(https://fxbug.dev/42077109): Write down memory order requirements for accessing signals_.

Defined at line 1583 of file ../../zircon/kernel/include/kernel/thread.h

void set_signals (uint32_t bits)

Defined at line 1584 of file ../../zircon/kernel/include/kernel/thread.h

void clear_signals (uint32_t bits)

Defined at line 1585 of file ../../zircon/kernel/include/kernel/thread.h

bool has_migrate_fn ()

Defined at line 1587 of file ../../zircon/kernel/include/kernel/thread.h

bool migrate_pending ()

Defined at line 1588 of file ../../zircon/kernel/include/kernel/thread.h

TaskState & task_state ()

Defined at line 1590 of file ../../zircon/kernel/include/kernel/thread.h

const TaskState & task_state ()

Defined at line 1591 of file ../../zircon/kernel/include/kernel/thread.h

PreemptionState & preemption_state ()

Defined at line 1593 of file ../../zircon/kernel/include/kernel/thread.h

const PreemptionState & preemption_state ()

Defined at line 1594 of file ../../zircon/kernel/include/kernel/thread.h

SchedulerState & scheduler_state ()

Defined at line 1596 of file ../../zircon/kernel/include/kernel/thread.h

const SchedulerState & scheduler_state ()

Defined at line 1597 of file ../../zircon/kernel/include/kernel/thread.h

SchedulerQueueState & scheduler_queue_state ()

Defined at line 1601 of file ../../zircon/kernel/include/kernel/thread.h

const SchedulerQueueState & scheduler_queue_state ()

Defined at line 1604 of file ../../zircon/kernel/include/kernel/thread.h

WaitQueueCollection::ThreadState & wait_queue_state ()

Defined at line 1608 of file ../../zircon/kernel/include/kernel/thread.h

const WaitQueueCollection::ThreadState & wait_queue_state ()

Defined at line 1611 of file ../../zircon/kernel/include/kernel/thread.h

RestrictedState * restricted_state ()

Defined at line 1620 of file ../../zircon/kernel/include/kernel/thread.h

void set_restricted_state (ktl::unique_ptr<RestrictedState> restricted_state)

Defined at line 1621 of file ../../zircon/kernel/include/kernel/thread.h

arch_thread & arch ()

Defined at line 1625 of file ../../zircon/kernel/include/kernel/thread.h

const arch_thread & arch ()

Defined at line 1626 of file ../../zircon/kernel/include/kernel/thread.h

KernelStack & stack ()

Defined at line 1628 of file ../../zircon/kernel/include/kernel/thread.h

const KernelStack & stack ()

Defined at line 1629 of file ../../zircon/kernel/include/kernel/thread.h

VmAspace * aspace ()

Defined at line 1666 of file ../../zircon/kernel/include/kernel/thread.h

const VmAspace * aspace ()

Defined at line 1667 of file ../../zircon/kernel/include/kernel/thread.h

VmAspace * switch_aspace (VmAspace * aspace)

Defined at line 1668 of file ../../zircon/kernel/include/kernel/thread.h

VmAspace * active_aspace ()

Returns the currently active address space, which is the address space currently hosting

page tables for the thread.

The active address space should be used only when context switching. It should not be used for

resolving faults, as it may be a unified aspace that does not keep track of its own mappings.

Kernel-only thread -- This will return nullptr, unless a caller has explicitly set aspace_

using `switch_aspace`, which is done by a few kernel unittests.

User thread -- If the thread is in Restricted Mode, this will return the restricted aspace.

Otherwise, it will return the process's normal aspace.

Note, the normal aspace is, by definition, the aspace that's active when a thread is in Normal

Mode. All threads not in Restricted Mode are said to be in Normal Mode. See

`ProcessDispatcher::normal_aspace()` for more information.

Defined at line 1689 of file ../../zircon/kernel/include/kernel/thread.h

const VmAspace * active_aspace ()

Defined at line 1690 of file ../../zircon/kernel/include/kernel/thread.h

const char * name ()

Defined at line 1692 of file ../../zircon/kernel/include/kernel/thread.h

Linebuffer & linebuffer ()

Defined at line 1697 of file ../../zircon/kernel/include/kernel/thread.h

const Canary & canary ()

Defined at line 1700 of file ../../zircon/kernel/include/kernel/thread.h

uint64_t lock_flow_id ()

Returns the last flow id allocated by TakeNextLockFlowId() for this thread.

Defined at line 1711 of file ../../zircon/kernel/include/kernel/thread.h

uint64_t TakeNextLockFlowId ()

Returns a unique flow id for lock contention tracing. The same value is

returned by lock_flow_id() until another id is allocated for this thread

by calling this method again.

Defined at line 1716 of file ../../zircon/kernel/include/kernel/thread.h

void RecomputeEffectiveProfile ()

Defined at line 1718 of file ../../zircon/kernel/include/kernel/thread.h

SchedulerState::EffectiveProfile SnapshotEffectiveProfileLocked ()

Defined at line 1722 of file ../../zircon/kernel/include/kernel/thread.h

SchedulerState::BaseProfile SnapshotBaseProfileLocked ()

Defined at line 1730 of file ../../zircon/kernel/include/kernel/thread.h

ThreadStallState memory_stall_state ()

Defined at line 1737 of file ../../zircon/kernel/include/kernel/thread.h

void set_memory_stall_state (ThreadStallState value)

Defined at line 1740 of file ../../zircon/kernel/include/kernel/thread.h

Thread * CreateIdleThread (cpu_num_t cpu_num)

Create an idle thread for a secondary CPU

Defined at line 2077 of file ../../zircon/kernel/kernel/thread.cc

void ReviveIdlePowerThread (cpu_num_t cpu_num)

Revive the idle/power thread for the given CPU so that it starts fresh after

halting while taking the CPU offline. Most state is preserved, including

stack memory locations (useful for debugging) and accumulated runtime stats.

Defined at line 2101 of file ../../zircon/kernel/kernel/thread.cc

void Dump (bool full)

Dump the information of a single thread. If |full| is true then a multi-line verbose dump of

much information is performed, otherwise a single short summary line is dumped.

Defined at line 2261 of file ../../zircon/kernel/kernel/thread.cc

void DumpAll (const char * match_owner, bool full)

Finds all threads whose |OwnerName| is the same as |match_owner|, or just all thread if

|match_owner| is nullptr, and call |Dump| on them.

Defined at line 2284 of file ../../zircon/kernel/kernel/thread.cc

void DumpTid (zx_koid_t tid, bool full)

Finds a thread whose |tid()| matches the provided |tid| and calls |Dump| on it.

Defined at line 2289 of file ../../zircon/kernel/kernel/thread.cc

void DumpDuringPanic (bool full)

Same stuff, but skip the locks when we are panic'ing

Defined at line 1954 of file ../../zircon/kernel/include/kernel/thread.h

void DumpAllDuringPanic (const char * match_owner, bool full)

Defined at line 1958 of file ../../zircon/kernel/include/kernel/thread.h

void DumpTidDuringPanic (zx_koid_t tid, bool full)

Defined at line 1964 of file ../../zircon/kernel/include/kernel/thread.h

void SecondaryCpuInitEarly ()

Create a thread around the current execution context, preserving |t|'s stack

Prior to calling, |t->stack| must be properly constructed. See |vm_allocate_kstack|.

Defined at line 2012 of file ../../zircon/kernel/kernel/thread.cc

void SetUsermodeThread (fbl::RefPtr<ThreadDispatcher> user_thread)

Set the pointer to the user-mode thread, this will receive callbacks:

ThreadDispatcher::Exiting()

ThreadDispatcher::Suspending() / Resuming()

This also caches the assocatiated koids of the thread and process

dispatchers associated with the given ThreadDispatcher.

Defined at line 1938 of file ../../zircon/kernel/kernel/thread.cc

void SetBaseProfile (const SchedulerState::BaseProfile & profile)

Change the base profile of current thread

Changes the base profile of the thread to the base profile supplied by the

users, dealing with any side effects in the process.

Parameters

profile The base profile to apply to the thread.

Defined at line 1925 of file ../../zircon/kernel/kernel/thread.cc

void CheckRestartableSequence (GeneralRegsSource source, void * gregs)

Defined at line 2116 of file ../../zircon/kernel/kernel/thread.cc

void OwnerName (char (&)[32] out_name)

Return the name of the "owner" of the thread.

Returns "kernel" if there is no owner.

Defined at line 2166 of file ../../zircon/kernel/kernel/thread.cc

zx_duration_mono_t Runtime ()

Return the number of nanoseconds a thread has been running for.

This takes the thread's lock to ensure there are no races while calculating

the runtime of the thread.

Defined at line 1861 of file ../../zircon/kernel/kernel/thread.cc

cpu_num_t LastCpu ()

Get the last CPU the given thread was run on, or INVALID_CPU if the

thread has never run.

Defined at line 1878 of file ../../zircon/kernel/kernel/thread.cc

cpu_num_t LastCpuLocked ()

Get the last CPU the given thread was run on, or INVALID_CPU if the

thread has never run.

Defined at line 1887 of file ../../zircon/kernel/kernel/thread.cc

void SleepHandler (Timer * timer, zx_instant_mono_t now, void * arg)

Callback for the Timer used for SleepEtc.

Defined at line 1724 of file ../../zircon/kernel/kernel/thread.cc

void HandleSleep (Timer * timer, zx_instant_mono_t now)

Defined at line 1730 of file ../../zircon/kernel/kernel/thread.cc

void UpdateRuntimeStats (thread_state new_state)

Called by the scheduler to update runtime stats.

Defined at line 2336 of file ../../zircon/kernel/kernel/thread.cc

fbl::RefPtr<VmAspace> GetAspaceRef ()

Rules for the aspace_ member.

1) Raw VmAspace pointers held by Thread object are guaranteed to always be

"alive" from a C++ perspective (the object has not been destructed, and

the memory is still alive). The actual VmAspace object is a ref-counted

object which is guaranteed to be alive because:

1a) It is a member of a thread's process (the main aspace, as well as the

restricted mode aspace), and a thread's process object cannot be

destroyed while the thread is still alive. Or --

1b) It is a special statically allocated aspace object, such as the EFI

address space, or the kernel address space.

2) Only the current thread is permitted to mutate its own aspace_ member.

The only exception to this is during initialization, before the thread

is running, by VmAspace::AttachToThread.

3) The currently running thread is allowed to access its own currently

assigned aspace without needing any locks.

4) Any other thread who wishes to access a thread's aspace must do so via

either GetAspaceRef or GetAspaceRefLocked, which will return a RefPtr to

the thread's current aspace as long as the thread has not entered the

THREAD_DEATH state.

5) Other threads who access a thread's aspace via GetAspaceRef cannot

assume that either the thread or the aspace is still alive after the

thread's lock is dropped. At best, they know that the RefPtr is keeping

the VmAspace object alive from a C++ perspective, nothing more.

6) The scheduler and low level context switch routines are allowed to

directly access the aspace_ of both the old and new threads involved in the

context switch. Neither one is currently really running (the aspace_

members cannot change), and both threads have to be alive enough that

their process is still alive, and therefore so is their aspace_ (see

#1). Note; it is possible that the old thread involved in a context

switch is in the process of dying, but we know that its process cannot

exit (destroying its aspace in the process) until after it has context

switched for the last time.

Defined at line 2342 of file ../../zircon/kernel/kernel/thread.cc

fbl::RefPtr<VmAspace> GetAspaceRefLocked ()

Defined at line 2347 of file ../../zircon/kernel/kernel/thread.cc

void GetBacktrace (Backtrace & out_bt)

Generate a backtrace for |this| thread.

|this| must be blocked, sleeping or suspended (i.e. not running).

|out_bt| will be reset() prior to be filled in and if a backtrace cannot be

obtained, it will be left empty.

Defined at line 2428 of file ../../zircon/kernel/kernel/thread.cc

SchedulerState::EffectiveProfile SnapshotEffectiveProfile ()

Defined at line 2451 of file ../../zircon/kernel/kernel/thread.cc

SchedulerState::BaseProfile SnapshotBaseProfile ()

Defined at line 2458 of file ../../zircon/kernel/kernel/thread.cc

Enumerations

enum MigrateStage
Name Value
Save 0
Restore 1
Exiting 2

Defined at line 1288 of file ../../zircon/kernel/include/kernel/thread.h

Records

Friends

class ThreadDumper
class ScopedThreadExceptionContext
class OwnedWaitQueue
void Thread (Thread * )
Thread * Thread ()