RTEMS
Files | Classes | Macros | Typedefs | Enumerations | Functions | Variables
spec:/rtems/event/req/send-receive

Files

file  tr-event-send-receive.c
 
file  tr-event-send-receive.h
 

Classes

struct  RtemsEventReqSendReceive_Context
 Test context for spec:/rtems/event/req/send-receive test case. More...
 

Macros

#define INPUT_EVENTS   ( RTEMS_EVENT_5 | RTEMS_EVENT_23 )
 
#define WORKER_ATTRIBUTES   RTEMS_DEFAULT_ATTRIBUTES
 
#define MAX_TLS_SIZE   RTEMS_ALIGN_UP( 64, RTEMS_TASK_STORAGE_ALIGNMENT )
 

Typedefs

typedef RtemsEventReqSendReceive_Context Context
 

Enumerations

enum  Priorities {
  PRIO_HIGH = 1, PRIO_NORMAL, PRIO_LOW, PRIO_OTHER,
  PRIO_HIGH = 1, PRIO_NORMAL, PRIO_LOW, PRIO_OTHER
}
 
enum  SenderTypes {
  SENDER_NONE, SENDER_SELF, SENDER_SELF_2, SENDER_WORKER,
  SENDER_INTERRUPT, SENDER_NONE, SENDER_SELF, SENDER_SELF_2,
  SENDER_WORKER, SENDER_INTERRUPT
}
 
enum  ReceiveTypes {
  RECEIVE_SKIP, RECEIVE_NORMAL, RECEIVE_INTERRUPT, RECEIVE_SKIP,
  RECEIVE_NORMAL, RECEIVE_INTERRUPT
}
 
enum  ReceiveConditionStates {
  RECEIVE_COND_UNKNOWN, RECEIVE_COND_SATSIFIED, RECEIVE_COND_UNSATISFIED, RECEIVE_COND_UNKNOWN,
  RECEIVE_COND_SATSIFIED, RECEIVE_COND_UNSATISFIED
}
 
enum  RtemsEventReqSendReceive_Pre_Id { RtemsEventReqSendReceive_Pre_Id_InvId, RtemsEventReqSendReceive_Pre_Id_Task, RtemsEventReqSendReceive_Pre_Id_NA }
 
enum  RtemsEventReqSendReceive_Pre_Send {
  RtemsEventReqSendReceive_Pre_Send_Zero, RtemsEventReqSendReceive_Pre_Send_Unrelated, RtemsEventReqSendReceive_Pre_Send_Any, RtemsEventReqSendReceive_Pre_Send_All,
  RtemsEventReqSendReceive_Pre_Send_MixedAny, RtemsEventReqSendReceive_Pre_Send_MixedAll, RtemsEventReqSendReceive_Pre_Send_NA
}
 
enum  RtemsEventReqSendReceive_Pre_ReceiverState {
  RtemsEventReqSendReceive_Pre_ReceiverState_NotWaiting, RtemsEventReqSendReceive_Pre_ReceiverState_Poll, RtemsEventReqSendReceive_Pre_ReceiverState_Timeout, RtemsEventReqSendReceive_Pre_ReceiverState_Lower,
  RtemsEventReqSendReceive_Pre_ReceiverState_Equal, RtemsEventReqSendReceive_Pre_ReceiverState_Higher, RtemsEventReqSendReceive_Pre_ReceiverState_Other, RtemsEventReqSendReceive_Pre_ReceiverState_Intend,
  RtemsEventReqSendReceive_Pre_ReceiverState_NA
}
 
enum  RtemsEventReqSendReceive_Pre_Satisfy { RtemsEventReqSendReceive_Pre_Satisfy_All, RtemsEventReqSendReceive_Pre_Satisfy_Any, RtemsEventReqSendReceive_Pre_Satisfy_NA }
 
enum  RtemsEventReqSendReceive_Post_SendStatus { RtemsEventReqSendReceive_Post_SendStatus_Ok, RtemsEventReqSendReceive_Post_SendStatus_InvId, RtemsEventReqSendReceive_Post_SendStatus_NA }
 
enum  RtemsEventReqSendReceive_Post_ReceiveStatus {
  RtemsEventReqSendReceive_Post_ReceiveStatus_None, RtemsEventReqSendReceive_Post_ReceiveStatus_Pending, RtemsEventReqSendReceive_Post_ReceiveStatus_Timeout, RtemsEventReqSendReceive_Post_ReceiveStatus_Satisfied,
  RtemsEventReqSendReceive_Post_ReceiveStatus_Unsatisfied, RtemsEventReqSendReceive_Post_ReceiveStatus_Blocked, RtemsEventReqSendReceive_Post_ReceiveStatus_NA
}
 
enum  RtemsEventReqSendReceive_Post_SenderPreemption { RtemsEventReqSendReceive_Post_SenderPreemption_No, RtemsEventReqSendReceive_Post_SenderPreemption_Yes, RtemsEventReqSendReceive_Post_SenderPreemption_NA }
 

Functions

 RTEMS_ALIGNED (RTEMS_TASK_STORAGE_ALIGNMENT)
 
static rtems_id CreateWakeupSema (void)
 
static void DeleteWakeupSema (rtems_id id)
 
static void Wait (rtems_id id)
 
static void Wakeup (rtems_id id)
 
static bool BlockedForEvent (Context *ctx, Thread_Wait_flags flags)
 
static bool IntendsToBlockForEvent (Context *ctx, Thread_Wait_flags flags)
 
static bool EventReadyAgain (Context *ctx, Thread_Wait_flags flags)
 
static bool IsSatisfiedFlags (Context *ctx)
 
static bool IsSatisfiedState (Context *ctx)
 
static void SendAction (Context *ctx)
 
static void Send (Context *ctx, bool(*is_satsified)(Context *))
 
static void Worker (rtems_task_argument arg)
 
static rtems_event_set GetPendingEvents (Context *ctx)
 
static void RtemsEventReqSendReceive_Cleanup (Context *ctx)
 
static void InterruptPrepare (void *arg)
 
static void InterruptAction (void *arg)
 
static void InterruptContinue (Context *ctx)
 
static T_interrupt_test_state Interrupt (void *arg)
 
static void RtemsEventReqSendReceive_Pre_Id_Prepare (RtemsEventReqSendReceive_Context *ctx, RtemsEventReqSendReceive_Pre_Id state)
 
static void RtemsEventReqSendReceive_Pre_Send_Prepare (RtemsEventReqSendReceive_Context *ctx, RtemsEventReqSendReceive_Pre_Send state)
 
static void RtemsEventReqSendReceive_Pre_ReceiverState_Prepare (RtemsEventReqSendReceive_Context *ctx, RtemsEventReqSendReceive_Pre_ReceiverState state)
 
static void RtemsEventReqSendReceive_Pre_Satisfy_Prepare (RtemsEventReqSendReceive_Context *ctx, RtemsEventReqSendReceive_Pre_Satisfy state)
 
static void RtemsEventReqSendReceive_Post_SendStatus_Check (RtemsEventReqSendReceive_Context *ctx, RtemsEventReqSendReceive_Post_SendStatus state)
 
static void RtemsEventReqSendReceive_Post_ReceiveStatus_Check (RtemsEventReqSendReceive_Context *ctx, RtemsEventReqSendReceive_Post_ReceiveStatus state)
 
static void RtemsEventReqSendReceive_Post_SenderPreemption_Check (RtemsEventReqSendReceive_Context *ctx, RtemsEventReqSendReceive_Post_SenderPreemption state)
 
static void RtemsEventReqSendReceive_Setup (RtemsEventReqSendReceive_Context *ctx)
 
static void RtemsEventReqSendReceive_Setup_Wrap (void *arg)
 
static void RtemsEventReqSendReceive_Teardown (RtemsEventReqSendReceive_Context *ctx)
 
static void RtemsEventReqSendReceive_Teardown_Wrap (void *arg)
 
static size_t RtemsEventReqSendReceive_Scope (void *arg, char *buf, size_t n)
 
static void RtemsEventReqSendReceive_Prepare (RtemsEventReqSendReceive_Context *ctx)
 
static void RtemsEventReqSendReceive_Action (RtemsEventReqSendReceive_Context *ctx)
 
void RtemsEventReqSendReceive_Run (rtems_status_code(*send)(rtems_id, rtems_event_set), rtems_status_code(*receive)(rtems_event_set, rtems_option, rtems_interval, rtems_event_set *), rtems_event_set( *get_pending_events)(Thread_Control *), unsigned int wait_class, int waiting_for_event)
 Runs the parameterized test case. More...
 

Variables

static RtemsEventReqSendReceive_Context RtemsEventReqSendReceive_Instance
 
static const char *const RtemsEventReqSendReceive_PreDesc_Id []
 
static const char *const RtemsEventReqSendReceive_PreDesc_Send []
 
static const char *const RtemsEventReqSendReceive_PreDesc_ReceiverState []
 
static const char *const RtemsEventReqSendReceive_PreDesc_Satisfy []
 
static const char *const *const RtemsEventReqSendReceive_PreDesc []
 
static const T_interrupt_test_config InterruptConfig
 
static T_fixture RtemsEventReqSendReceive_Fixture
 
static const uint8_t RtemsEventReqSendReceive_TransitionMap [][3]
 
struct {
   uint8_t   Skip: 1
 
   uint8_t   Pre_Id_NA: 1
 
   uint8_t   Pre_Send_NA: 1
 
   uint8_t   Pre_ReceiverState_NA: 1
 
   uint8_t   Pre_Satisfy_NA: 1
 
RtemsEventReqSendReceive_TransitionInfo []
 
static T_fixture_node RtemsEventReqSendReceive_Node
 

Detailed Description

Function Documentation

◆ RtemsEventReqSendReceive_Run()

void RtemsEventReqSendReceive_Run ( rtems_status_code(*)(rtems_id, rtems_event_set send,
rtems_status_code(*)(rtems_event_set, rtems_option, rtems_interval, rtems_event_set *)  receive,
rtems_event_set(*)(Thread_Control *)  get_pending_events,
unsigned int  wait_class,
int  waiting_for_event 
)

Runs the parameterized test case.

Parameters
sendis the event send handler.
receiveis the event receive handler.
get_pending_eventsis the get pending events handler.
wait_classis the thread wait class.
waiting_for_eventis the thread waiting for event state.

Definition at line 2285 of file tr-event-send-receive.c.

Variable Documentation

◆ InterruptConfig

const T_interrupt_test_config InterruptConfig
static
Initial value:
= {
.prepare = InterruptPrepare,
.action = InterruptAction,
.interrupt = Interrupt,
.max_iteration_count = 10000
}

Definition at line 553 of file tr-event-send-receive.c.

◆ RtemsEventReqSendReceive_Fixture

T_fixture RtemsEventReqSendReceive_Fixture
static
Initial value:
= {
.setup = RtemsEventReqSendReceive_Setup_Wrap,
.stop = NULL,
.teardown = RtemsEventReqSendReceive_Teardown_Wrap,
.scope = RtemsEventReqSendReceive_Scope,
.initial_context = &RtemsEventReqSendReceive_Instance
}

Definition at line 909 of file tr-event-send-receive.c.

◆ RtemsEventReqSendReceive_PreDesc

const char* const* const RtemsEventReqSendReceive_PreDesc[]
static
Initial value:
= {
RtemsEventReqSendReceive_PreDesc_Id,
RtemsEventReqSendReceive_PreDesc_Send,
RtemsEventReqSendReceive_PreDesc_ReceiverState,
RtemsEventReqSendReceive_PreDesc_Satisfy,
NULL
}

Definition at line 286 of file tr-event-send-receive.c.

◆ RtemsEventReqSendReceive_PreDesc_Id

const char* const RtemsEventReqSendReceive_PreDesc_Id[]
static
Initial value:
= {
"InvId",
"Task",
"NA"
}

Definition at line 252 of file tr-event-send-receive.c.

◆ RtemsEventReqSendReceive_PreDesc_ReceiverState

const char* const RtemsEventReqSendReceive_PreDesc_ReceiverState[]
static
Initial value:
= {
"NotWaiting",
"Poll",
"Timeout",
"Lower",
"Equal",
"Higher",
"Other",
"Intend",
"NA"
}

Definition at line 268 of file tr-event-send-receive.c.

◆ RtemsEventReqSendReceive_PreDesc_Satisfy

const char* const RtemsEventReqSendReceive_PreDesc_Satisfy[]
static
Initial value:
= {
"All",
"Any",
"NA"
}

Definition at line 280 of file tr-event-send-receive.c.

◆ RtemsEventReqSendReceive_PreDesc_Send

const char* const RtemsEventReqSendReceive_PreDesc_Send[]
static
Initial value:
= {
"Zero",
"Unrelated",
"Any",
"All",
"MixedAny",
"MixedAll",
"NA"
}

Definition at line 258 of file tr-event-send-receive.c.