RTEMS
Classes | Macros | Functions | Variables
threadqenqueue.c File Reference

Thread Queue Operations. More...

#include <rtems/score/threadqimpl.h>
#include <rtems/score/assert.h>
#include <rtems/score/threaddispatch.h>
#include <rtems/score/threadimpl.h>
#include <rtems/score/status.h>
#include <rtems/score/watchdogimpl.h>

Go to the source code of this file.

Classes

struct  Thread_queue_Links
 

Macros

#define THREAD_QUEUE_INTEND_TO_BLOCK   (THREAD_WAIT_CLASS_OBJECT | THREAD_WAIT_STATE_INTEND_TO_BLOCK)
 
#define THREAD_QUEUE_BLOCKED   (THREAD_WAIT_CLASS_OBJECT | THREAD_WAIT_STATE_BLOCKED)
 
#define THREAD_QUEUE_READY_AGAIN   (THREAD_WAIT_CLASS_OBJECT | THREAD_WAIT_STATE_READY_AGAIN)
 

Functions

static bool _Thread_queue_Link_equal (const void *left, const RBTree_Node *right)
 
static bool _Thread_queue_Link_less (const void *left, const RBTree_Node *right)
 
static void * _Thread_queue_Link_map (RBTree_Node *node)
 
static Thread_queue_Link_Thread_queue_Link_find (Thread_queue_Links *links, Thread_queue_Queue *source)
 
static bool _Thread_queue_Link_add (Thread_queue_Link *link, Thread_queue_Queue *source, Thread_queue_Queue *target)
 
static void _Thread_queue_Link_remove (Thread_queue_Link *link)
 
void _Thread_queue_Path_release_critical (Thread_queue_Context *queue_context)
 Releases the thread queue path in a critical section. More...
 
static void _Thread_queue_Path_append_deadlock_thread (Thread_Control *the_thread, Thread_queue_Context *queue_context)
 
bool _Thread_queue_Path_acquire_critical (Thread_queue_Queue *queue, Thread_Control *the_thread, Thread_queue_Context *queue_context)
 Does nothing. More...
 
void _Thread_queue_Enqueue_do_nothing_extra (Thread_queue_Queue *queue, Thread_Control *the_thread, Per_CPU_Control *cpu_self, Thread_queue_Context *queue_context)
 Does nothing. More...
 
void _Thread_queue_Deadlock_status (Thread_Control *the_thread)
 Sets the thread wait return code to STATUS_DEADLOCK. More...
 
void _Thread_queue_Deadlock_fatal (Thread_Control *the_thread)
 Results in an INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK fatal error. More...
 
void _Thread_queue_Enqueue (Thread_queue_Queue *queue, const Thread_queue_Operations *operations, Thread_Control *the_thread, Thread_queue_Context *queue_context)
 Blocks the thread and places it on the thread queue. More...
 
Status_Control _Thread_queue_Enqueue_sticky (Thread_queue_Queue *queue, const Thread_queue_Operations *operations, Thread_Control *the_thread, Thread_queue_Context *queue_context)
 Enqueues the thread on the thread queue and busy waits for dequeue. More...
 
static bool _Thread_queue_Make_ready_again (Thread_Control *the_thread)
 
bool _Thread_queue_Extract_locked (Thread_queue_Queue *queue, const Thread_queue_Operations *operations, Thread_Control *the_thread, Thread_queue_Context *queue_context)
 Extracts the thread from the thread queue, restores the default wait operations and restores the default thread lock. More...
 
void _Thread_queue_Unblock_critical (bool unblock, Thread_queue_Queue *queue, Thread_Control *the_thread, ISR_lock_Context *lock_context)
 Unblocks the thread which was on the thread queue before. More...
 
void _Thread_queue_Extract_critical (Thread_queue_Queue *queue, const Thread_queue_Operations *operations, Thread_Control *the_thread, Thread_queue_Context *queue_context)
 Extracts the thread from the thread queue and unblocks it. More...
 
void _Thread_queue_Extract (Thread_Control *the_thread)
 Extracts thread from thread queue. More...
 
void _Thread_queue_Surrender (Thread_queue_Queue *queue, Thread_queue_Heads *heads, Thread_Control *previous_owner, Thread_queue_Context *queue_context, const Thread_queue_Operations *operations)
 Surrenders the thread queue previously owned by the thread to the first enqueued thread. More...
 
void _Thread_queue_Surrender_sticky (Thread_queue_Queue *queue, Thread_queue_Heads *heads, Thread_Control *previous_owner, Thread_queue_Context *queue_context, const Thread_queue_Operations *operations)
 Surrenders the thread queue previously owned by the thread to the first enqueued thread. More...
 
Thread_Control_Thread_queue_Do_dequeue (Thread_queue_Control *the_thread_queue, const Thread_queue_Operations *operations)
 Dequeues the first thread waiting on the thread queue and returns it. More...
 

Variables

static Thread_queue_Links _Thread_queue_Links
 

Detailed Description

Thread Queue Operations.

Definition in file threadqenqueue.c.

Variable Documentation

◆ _Thread_queue_Links

Thread_queue_Links _Thread_queue_Links
static
Initial value:
= {
ISR_LOCK_INITIALIZER( "Thread Queue Links" ),
}
#define ISR_LOCK_INITIALIZER(_name)
Initializer for static initialization of ISR locks.
Definition: isrlock.h:146

Definition at line 56 of file threadqenqueue.c.