RTEMS
Public Attributes | List of all members
Thread_Wait_information Struct Reference

Information required to manage a thread while it is blocked. More...

#include <thread.h>

Public Attributes

uint32_t count
 
void * return_argument
 
Thread_Wait_information_Object_argument_type return_argument_second
 
uint32_t option
 
uint32_t return_code
 
Atomic_Uint flags
 This field contains several flags used to control the wait class and state of a thread in case fine-grained locking is used.
 
struct {
   ISR_lock_Control   Default
 Thread wait default lock.
 
   Chain_Control   Pending_requests
 The pending thread wait lock acquire or tranquilize requests in case the thread is enqueued on a thread queue.
 
   Thread_queue_Gate   Tranquilizer
 Tranquilizer gate used by _Thread_Wait_tranquilize(). More...
 
Lock
 Thread wait lock control block. More...
 
Thread_queue_Link Link
 Thread queue link provided for use by the thread wait lock owner to build a thread queue path.
 
Thread_queue_Queuequeue
 The current thread queue. More...
 
const Thread_queue_Operationsoperations
 The current thread queue operations. More...
 
Thread_queue_Headsspare_heads
 

Detailed Description

Information required to manage a thread while it is blocked.

This contains the information required to manage a thread while it is blocked and to return information to it.

Definition at line 391 of file thread.h.

Member Data Documentation

◆ count

uint32_t Thread_Wait_information::count

This field is used to return an integer while when blocked.

Definition at line 400 of file thread.h.

◆ Lock

struct { ... } Thread_Wait_information::Lock

Thread wait lock control block.

Parts of the thread wait information are protected by the thread wait default lock and additionally a thread queue lock in case the thread is enqueued on a thread queue.

The thread wait lock mechanism protects the following thread variables

  • POSIX_API_Control::Attributes,
  • Scheduler_Node::Wait,
  • Thread_Control::Wait::Lock::Pending_requests,
  • Thread_Control::Wait::queue, and
  • Thread_Control::Wait::operations.
See also
_Thread_Wait_acquire(), _Thread_Wait_release(), _Thread_Wait_claim(), _Thread_Wait_restore_default() and _Thread_Wait_tranquilize().

◆ operations

const Thread_queue_Operations* Thread_Wait_information::operations

The current thread queue operations.

This field is protected by the thread lock wait default lock.

See also
_Thread_Wait_claim().

Definition at line 491 of file thread.h.

◆ option

uint32_t Thread_Wait_information::option

This field contains any options in effect on this blocking operation.

Definition at line 407 of file thread.h.

◆ queue

Thread_queue_Queue* Thread_Wait_information::queue

The current thread queue.

If this field is NULL the thread is not enqueued on a thread queue. This field is protected by the thread wait default lock.

See also
_Thread_Wait_claim().

Definition at line 482 of file thread.h.

◆ return_argument

void* Thread_Wait_information::return_argument

This field is for a pointer to a user return argument.

Definition at line 402 of file thread.h.

◆ return_argument_second

Thread_Wait_information_Object_argument_type Thread_Wait_information::return_argument_second

This field is for a pointer to a second user return argument.

Definition at line 405 of file thread.h.

◆ return_code

uint32_t Thread_Wait_information::return_code

This field will contain the return status from a blocking operation.

Note
The following assumes that all API return codes can be treated as an uint32_t.

Definition at line 413 of file thread.h.

◆ Tranquilizer

Thread_queue_Gate Thread_Wait_information::Tranquilizer

Tranquilizer gate used by _Thread_Wait_tranquilize().

This gate is closed by _Thread_Wait_claim(). In case there are no pending requests during a _Thread_Wait_restore_default(), then this gate is opened immediately, otherwise it is placed on the pending request chain and opened by _Thread_Wait_remove_request_locked() as the last gate on the chain to signal overall request completion.

Definition at line 464 of file thread.h.


The documentation for this struct was generated from the following file: