This file contains the definition related to message scheduling. More...
#include <stddef.h>#include "co_int.h"#include "co_bool.h"#include "dbg_assert.h"#include "compiler.h"#include "ke_config.h"#include "co_list.h"Go to the source code of this file.
Data Structures | |
| struct | ke_msg |
| Message structure. More... | |
Defines | |
| #define | KE_BUILD_ID(type, index) ( (ke_task_id_t)(((index) << 8)|(type)) ) |
| Builds the task identifier from the type and the index of that task. | |
| #define | KE_TYPE_GET(ke_task_id) ((ke_task_id) & 0xFF) |
| Retrieves task type from task id. | |
| #define | KE_IDX_GET(ke_task_id) (((ke_task_id) >> 8) & 0xFF) |
| Retrieves task index number from task id. | |
| #define | KE_MSG_ALLOC(id, dest, src, param_str) (struct param_str*) ke_msg_alloc(id, dest, src, sizeof(struct param_str)) |
| Convenient wrapper to ke_msg_alloc(). | |
| #define | KE_MSG_ALLOC_VAR(id, dest, src, param_str, var_len) (struct param_str*) ke_msg_alloc(id, dest, src, sizeof(struct param_str) + var_len) |
| Convenient wrapper to ke_msg_alloc(), for variable size message parameter structures. | |
| #define | KE_MSG_FREE(param_ptr) ke_msg_free(ke_param2msg((param_ptr))) |
| Convenient wrapper to ke_msg_free(). | |
Typedefs | |
| typedef uint16_t | ke_task_id_t |
| Task Identifier. Composed by the task type and the task index. | |
| typedef uint16_t | ke_state_t |
| Task State. | |
| typedef uint16_t | ke_msg_id_t |
| Message Identifier. | |
Enumerations | |
| enum | ke_msg_status_tag { KE_MSG_CONSUMED = 0, KE_MSG_NO_FREE, KE_MSG_SAVED } |
Status returned by a task when handling a message. More... | |
Functions | |
| __INLINE struct ke_msg * | ke_param2msg (void const *param_ptr) |
| Convert a parameter pointer to a message pointer. | |
| __INLINE void * | ke_msg2param (struct ke_msg const *msg) |
| Convert a message pointer to a parameter pointer. | |
| void * | ke_msg_alloc (ke_msg_id_t const id, ke_task_id_t const dest_id, ke_task_id_t const src_id, uint16_t const param_len) |
| Allocate memory for a message. | |
| void | ke_msg_send (void const *param_ptr) |
| Message sending. | |
| void | ke_msg_send_basic (ke_msg_id_t const id, ke_task_id_t const dest_id, ke_task_id_t const src_id) |
| Basic message sending. | |
| void | ke_msg_forward (void const *param_ptr, ke_task_id_t const dest_id, ke_task_id_t const src_id) |
| Message forwarding. | |
| void | ke_msg_forward_and_change_id (void const *param_ptr, ke_msg_id_t const msg_id, ke_task_id_t const dest_id, ke_task_id_t const src_id) |
| Message forwarding. | |
| void | ke_msg_free (struct ke_msg const *msg) |
| Free allocated message. | |
This file contains the definition related to message scheduling.
Copyright (C) RivieraWaves 2011-2019
Definition in file ke_msg.h.
1.6.1