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

Files

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

Classes

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

Macros

#define INPUT_EVENTS   ( RTEMS_EVENT_5 | RTEMS_EVENT_23 )
 

Typedefs

typedef ReqRtemsEventSendReceive_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  ReqRtemsEventSendReceive_Pre_Id { ReqRtemsEventSendReceive_Pre_Id_InvId, ReqRtemsEventSendReceive_Pre_Id_Task, ReqRtemsEventSendReceive_Pre_Id_NA }
 
enum  ReqRtemsEventSendReceive_Pre_Send {
  ReqRtemsEventSendReceive_Pre_Send_Zero, ReqRtemsEventSendReceive_Pre_Send_Unrelated, ReqRtemsEventSendReceive_Pre_Send_Any, ReqRtemsEventSendReceive_Pre_Send_All,
  ReqRtemsEventSendReceive_Pre_Send_MixedAny, ReqRtemsEventSendReceive_Pre_Send_MixedAll, ReqRtemsEventSendReceive_Pre_Send_NA
}
 
enum  ReqRtemsEventSendReceive_Pre_ReceiverState {
  ReqRtemsEventSendReceive_Pre_ReceiverState_NotWaiting, ReqRtemsEventSendReceive_Pre_ReceiverState_Poll, ReqRtemsEventSendReceive_Pre_ReceiverState_Timeout, ReqRtemsEventSendReceive_Pre_ReceiverState_Lower,
  ReqRtemsEventSendReceive_Pre_ReceiverState_Equal, ReqRtemsEventSendReceive_Pre_ReceiverState_Higher, ReqRtemsEventSendReceive_Pre_ReceiverState_Other, ReqRtemsEventSendReceive_Pre_ReceiverState_Intend,
  ReqRtemsEventSendReceive_Pre_ReceiverState_NA
}
 
enum  ReqRtemsEventSendReceive_Pre_Satisfy { ReqRtemsEventSendReceive_Pre_Satisfy_All, ReqRtemsEventSendReceive_Pre_Satisfy_Any, ReqRtemsEventSendReceive_Pre_Satisfy_NA }
 
enum  ReqRtemsEventSendReceive_Post_SendStatus { ReqRtemsEventSendReceive_Post_SendStatus_Ok, ReqRtemsEventSendReceive_Post_SendStatus_InvId, ReqRtemsEventSendReceive_Post_SendStatus_NA }
 
enum  ReqRtemsEventSendReceive_Post_ReceiveStatus {
  ReqRtemsEventSendReceive_Post_ReceiveStatus_None, ReqRtemsEventSendReceive_Post_ReceiveStatus_Pending, ReqRtemsEventSendReceive_Post_ReceiveStatus_Timeout, ReqRtemsEventSendReceive_Post_ReceiveStatus_Satisfied,
  ReqRtemsEventSendReceive_Post_ReceiveStatus_Unsatisfied, ReqRtemsEventSendReceive_Post_ReceiveStatus_Blocked, ReqRtemsEventSendReceive_Post_ReceiveStatus_NA
}
 
enum  ReqRtemsEventSendReceive_Post_SenderPreemption { ReqRtemsEventSendReceive_Post_SenderPreemption_No, ReqRtemsEventSendReceive_Post_SenderPreemption_Yes, ReqRtemsEventSendReceive_Post_SenderPreemption_NA }
 

Functions

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 (Thread_Wait_flags flags)
 
static bool IntendsToBlockForEvent (Thread_Wait_flags flags)
 
static bool EventReadyAgain (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 ReqRtemsEventSendReceive_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 ReqRtemsEventSendReceive_Pre_Id_Prepare (ReqRtemsEventSendReceive_Context *ctx, ReqRtemsEventSendReceive_Pre_Id state)
 
static void ReqRtemsEventSendReceive_Pre_Send_Prepare (ReqRtemsEventSendReceive_Context *ctx, ReqRtemsEventSendReceive_Pre_Send state)
 
static void ReqRtemsEventSendReceive_Pre_ReceiverState_Prepare (ReqRtemsEventSendReceive_Context *ctx, ReqRtemsEventSendReceive_Pre_ReceiverState state)
 
static void ReqRtemsEventSendReceive_Pre_Satisfy_Prepare (ReqRtemsEventSendReceive_Context *ctx, ReqRtemsEventSendReceive_Pre_Satisfy state)
 
static void ReqRtemsEventSendReceive_Post_SendStatus_Check (ReqRtemsEventSendReceive_Context *ctx, ReqRtemsEventSendReceive_Post_SendStatus state)
 
static void ReqRtemsEventSendReceive_Post_ReceiveStatus_Check (ReqRtemsEventSendReceive_Context *ctx, ReqRtemsEventSendReceive_Post_ReceiveStatus state)
 
static void ReqRtemsEventSendReceive_Post_SenderPreemption_Check (ReqRtemsEventSendReceive_Context *ctx, ReqRtemsEventSendReceive_Post_SenderPreemption state)
 
static void ReqRtemsEventSendReceive_Setup (ReqRtemsEventSendReceive_Context *ctx)
 
static void ReqRtemsEventSendReceive_Setup_Wrap (void *arg)
 
static void ReqRtemsEventSendReceive_Teardown (ReqRtemsEventSendReceive_Context *ctx)
 
static void ReqRtemsEventSendReceive_Teardown_Wrap (void *arg)
 
static size_t ReqRtemsEventSendReceive_Scope (void *arg, char *buf, size_t n)
 
static void ReqRtemsEventSendReceive_Prepare (ReqRtemsEventSendReceive_Context *ctx)
 
static void ReqRtemsEventSendReceive_Action (ReqRtemsEventSendReceive_Context *ctx)
 
static void ReqRtemsEventSendReceive_Cleanup (ReqRtemsEventSendReceive_Context *ctx)
 
void ReqRtemsEventSendReceive_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 *))
 Runs the parameterized test case. More...
 

Variables

static ReqRtemsEventSendReceive_Context ReqRtemsEventSendReceive_Instance
 
static const char *const ReqRtemsEventSendReceive_PreDesc_Id []
 
static const char *const ReqRtemsEventSendReceive_PreDesc_Send []
 
static const char *const ReqRtemsEventSendReceive_PreDesc_ReceiverState []
 
static const char *const ReqRtemsEventSendReceive_PreDesc_Satisfy []
 
static const char *const *const ReqRtemsEventSendReceive_PreDesc []
 
static const T_interrupt_test_config InterruptConfig
 
static T_fixture ReqRtemsEventSendReceive_Fixture
 
static const uint8_t ReqRtemsEventSendReceive_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
 
ReqRtemsEventSendReceive_TransitionInfo []
 
static T_fixture_node ReqRtemsEventSendReceive_Node
 

Detailed Description

Function Documentation

◆ ReqRtemsEventSendReceive_Run()

void ReqRtemsEventSendReceive_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 
)

Runs the parameterized test case.

Parameters
sendis the event send handler.
receiveis the event receive handler.
get_pending_eventsis the get pending events handler.

Definition at line 2248 of file tr-event-send.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 506 of file tr-event-send.c.

◆ ReqRtemsEventSendReceive_Fixture

T_fixture ReqRtemsEventSendReceive_Fixture
static
Initial value:
= {
.setup = ReqRtemsEventSendReceive_Setup_Wrap,
.stop = NULL,
.teardown = ReqRtemsEventSendReceive_Teardown_Wrap,
.scope = ReqRtemsEventSendReceive_Scope,
.initial_context = &ReqRtemsEventSendReceive_Instance
}

Definition at line 872 of file tr-event-send.c.

◆ ReqRtemsEventSendReceive_PreDesc

const char* const* const ReqRtemsEventSendReceive_PreDesc[]
static
Initial value:
= {
ReqRtemsEventSendReceive_PreDesc_Id,
ReqRtemsEventSendReceive_PreDesc_Send,
ReqRtemsEventSendReceive_PreDesc_ReceiverState,
ReqRtemsEventSendReceive_PreDesc_Satisfy,
NULL
}

Definition at line 260 of file tr-event-send.c.

◆ ReqRtemsEventSendReceive_PreDesc_Id

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

Definition at line 226 of file tr-event-send.c.

◆ ReqRtemsEventSendReceive_PreDesc_ReceiverState

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

Definition at line 242 of file tr-event-send.c.

◆ ReqRtemsEventSendReceive_PreDesc_Satisfy

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

Definition at line 254 of file tr-event-send.c.

◆ ReqRtemsEventSendReceive_PreDesc_Send

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

Definition at line 232 of file tr-event-send.c.