GeMRTOS
Related Functions
Resource Class Reference

Related Functions

(Note that these are not member functions.)

Friends And Related Function Documentation

◆ gk_check_consume()

INT32 gk_check_consume ( GS_ECB pevent)
related

Transfer message from the resource to the consumer.

gk_check_consume

Parameters
[in]peventPointer to the ECB associated as consumer to the Message Queue
Returns
G_TRUE when message read, G_FALSE otherwise

Definition at line 285 of file mq.c.

◆ gk_MQ_send()

INT32 gk_MQ_send ( G_RCB prcb,
void *  pmsg,
INT32  msg_length,
gt_time  timeout 
)
related

Sends a message to all the consumers. The function returns when the message was delivered to all the consumer or the timeout expires.

gk_MQ_send

Parameters
[in]prcbPointer to the RCB of the Message Queue
[in]pmsgPointer to the message to send
[in]msg_lengthLenght of the message to send
[in]timeoutTimeout to send the message
Returns
G_TRUE when successful, G_FALSE otherwise

Definition at line 99 of file mq.c.

◆ gk_RCB_GetFree()

G_RCB* gk_RCB_GetFree ( void  )
related

Unlinks an RCB from the RCBFL list and returns its pointer or NULL if no free RCB is available.

gk_RCB_GetFree

Returns
Pointer to the RCB or NULL when no RCB available
Todo:
ystem signal should be implmented when no free RCB is available

TCBs linked list for debugging

Definition at line 155 of file gemrtos_core.c.

◆ gk_RCBFL_Link()

INT32 gk_RCBFL_Link ( G_RCB presource)
related

Links the RCB of a resource to Free List.

gk_RCBFL_Link

Parameters
[in]presourcePointer to the RCB of the resource
Returns
G_TRUE if successfull, G_FALSE otherwise
Todo:
Return G_FALSE when it is not unused

RCBs linked list for debugging

Definition at line 851 of file listfunctions.c.

◆ gk_RCBGEL_Link()

GS_ECB* gk_RCBGEL_Link ( G_RCB presource,
GS_ECB pevent 
)
related

Links ECB to RCB granted list and return pointer to the ECB linked.

gk_RCBGEL_Link

Parameters
[in]presourcePointer to the RCB of the resource
[in]peventPointer to the ECB of the event. If NULL the a free ECB is chosen
Returns
Pointer to ECB, NULL if no ECB is available
Todo:
Check priority for different structures
See also
Event

Definition at line 935 of file listfunctions.c.

◆ gk_RCBWEL_Link()

GS_ECB* gk_RCBWEL_Link ( G_RCB presource,
GS_ECB pevent 
)
related

Links an event ECB to the resource waiting list of RCB. If no ECB is given then a new ECB is obtained and the priority of the resource is given as the priority of the event.

gk_RCBWEL_Link

Parameters
[in]presourcePointer to the RCB of the resource
[in]peventPointer to the ECB of the event, NULL if an event should be return
Returns
Return a pointer to the ECB of the event
Todo:
Considered when no free ECB are available
See also
Event

Definition at line 1054 of file listfunctions.c.

◆ gk_RESOURCE_ECB_KILL_CALLBACK()

void gk_RESOURCE_ECB_KILL_CALLBACK ( GS_ECB pevent)
related

This function is called when a resource event is kill. It has to resolve according the event type.

gk_RESOURCE_ECB_KILL_CALLBACK

Parameters
[in]peventPointer to the ECB of the event related

Definition at line 896 of file grtosuserfunctions.c.

◆ gk_TASK_IS_BLOCKED()

INT32 gk_TASK_IS_BLOCKED ( GS_TCB ptcb)
related

Returns G_TRUE when TCB is blocked waiting for a resource.

gk_TASK_IS_BLOCKED

Parameters
[in]ptcbPointer to TCB
Returns
G_TRUE when BLOCKED, G_FALSE otherwise
Todo:
Implement for different resources

Definition at line 2046 of file listfunctions.c.

◆ gk_timeout_ECB_MQ_consume()

INT32 gk_timeout_ECB_MQ_consume ( GS_ECB peventime)
related

This function is called from the timed IRQ when a consume timeout G_ECBType_MESSAGE_CONSUME_WAIT happens.

gk_timeout_ECB_MQ_consume

Parameters
[in]peventimeDescription for peventime
Returns
G_TRUE when successful, G_FALSE otherwise

Definition at line 386 of file mq.c.

◆ gk_timeout_ECB_MQ_send()

INT32 gk_timeout_ECB_MQ_send ( GS_ECB peventime)
related

This function is called from the timed IRQ when a send timeout G_ECBType_MESSAGE_SEND_WAIT happens.

gk_timeout_ECB_MQ_send

Parameters
[in]peventimePointer to the timed ECB happened
Returns
G_TRUE when successful, G_FALSE otherwise

Definition at line 371 of file mq.c.

◆ gu_queue_consume()

GS_ECB* gu_queue_consume ( G_RCB presource,
void *  pbuffer,
INT32  buffer_length,
gt_time  timeout 
)
related

Creates an ECB to consume from a Message Queue.

gu_queue_consume

Parameters
[in]presourcePointer of the G_RCB of the Message Queue
[in]pbufferPointer to the buffer to store the messages consumed
[in]buffer_lengthLength of the buffer
[in]timeoutTimeout for consuming
Returns
Pointer to the ECB associated to the Message Queue for consuming

The Message Queue should be created with gu_queue_create and the reading with gu_MQ_receive

Definition at line 229 of file mq.c.

◆ gu_sem_wait()

INT32 gu_sem_wait ( t_semaphore_resource presource,
gt_priority  waiting_priority,
gt_priority  RCBGrantedPriority,
gt_time  RCBWaitingTimeout,
gt_time  RCBGrantedTimeout,
int  blocking 
)
related

Lock the semaphore (get the semaphore) if it is avaible, otherwise waits for grant it.

gu_sem_wait

Parameters
[in]presourcePointer to the semaphore t_semaphore_resource
[in]waiting_prioritypriority to wait for the semaphore to be granted
[in]RCBGrantedPriorityPriority when semaphore is granted
[in]RCBWaitingTimeoutTimeout for waiting for the semaphore (0, no waiting for semaphore)
[in]RCBGrantedTimeoutTimeout for granted (0, no timeout when it is granted)
[in]blockingIf G_TRUE the blocks the executing waiting for the resource
Returns
G_TRUE if semaphore is granted, G_FALSE otherwise

Definition at line 109 of file sem.c.

◆ OPTIMEZE_CODE()

OPTIMEZE_CODE ( )
related

Receive the next message from the Message Queue.

gu_MQ_receive

Parameters
[in]peventPointer to the ECB associated to the Message Queue
Returns
G_TRUE when successful, G_FALSE otherwise

The ECB should be associated previously with the gu_queue_consume function

Definition at line 34 of file mq.c.

◆ RCB_IsValid()

INT32 RCB_IsValid ( void *  prcb)
related

Returns G_TRUE is pointer points to RCB.

RCB_IsValid

Parameters
[in]prcbPointer to the RCB of the resource
Returns
G_TRUE if pointer to SCB, G_FALSE otherwise
Todo:
Find a way to determine validity when it is not an array

Definition at line 142 of file monitor.c.


The documentation for this class was generated from the following files: