|
HeMPS
8.0
|
Kernel slave is the system slave used to execute user's tasks. More...
#include "kernel_slave.h"#include "../../../include/kernel_pkg.h"#include "../../include/api.h"#include "../../include/plasma.h"#include "../../include/services.h"#include "../../modules/task_location.h"#include "../../modules/packet.h"#include "../../modules/communication.h"#include "../../modules/pending_service.h"#include "../../modules/local_scheduler.h"#include "../../modules/utils.h"#include "../../modules/task_migration.h"
Functions | |
| void | send_task_terminated (TCB *terminated_task) |
| void | send_task_allocated (TCB *allocated_task) |
| void | send_message_delivery (int producer_task, int consumer_task, int consumer_PE, Message *msg_ptr) |
| void | send_task_real_time_change (TCB *tcb_ptr) |
| void | send_slack_time_report () |
| void | send_update_task_location (unsigned int target_proc, unsigned int task_id, unsigned int new_task_location) |
| void | send_message_request (int producer_task, int consumer_task, unsigned int producer_PE, unsigned int sourcePE) |
| void | write_local_msg_to_task (TCB *task_tcb_ptr, int msg_lenght, int *msg_data) |
| int | Syscall (unsigned int service, unsigned int arg0, unsigned int arg1, unsigned int arg2) |
| int | handle_packet (volatile ServiceHeader *p) |
| void | Scheduler () |
| void | OS_InterruptServiceRoutine (unsigned int status) |
| unsigned int | OS_InterruptMaskClear (unsigned int Mask) |
| unsigned int | OS_InterruptMaskSet (unsigned int Mask) |
| void | OS_Idle () |
| int | main () |
Variables | |
| unsigned int | net_address |
| Store the current XY address. | |
| unsigned int | schedule_after_syscall |
| Signals the syscall function (assembly implemented) to call the scheduler after the syscall. | |
| unsigned int | cluster_master_address |
| Store the cluster master XY address. | |
| unsigned int | last_idle_time |
| Store the last idle time duration. | |
| unsigned int | total_slack_time |
| Store the total of the processor idle time. | |
| TCB | idle_tcb |
| TCB pointer used to run idle task. | |
| TCB * | current |
| TCB pointer used to store the current task executing into processor. | |
| Message | msg_write_pipe |
| Message variable which is used to copy a message and send it by the NoC. | |
Kernel slave is the system slave used to execute user's tasks.
HEMPS VERSION - 8.0 - support for RT applications
Distribution: June 2016
Edited by: Marcelo Ruaro - contact: marcelo.ruaro@acad.pucrs.br
Research group: GAPH-PUCRS - contact: fernando.moraes@pucrs.br
kernel_slave is the core of the OS running into the slave processors. Its job is to runs the user's task. It communicates whit the kernel_master to receive new tasks and also notifying its finish. The kernel_slave file uses several modules that implement specific functions
| int handle_packet | ( | volatile ServiceHeader * | p | ) |
Handles a new packet from NoC
| void OS_Idle | ( | ) |
Idle function
| unsigned int OS_InterruptMaskClear | ( | unsigned int | Mask | ) |
Clear a interruption mask
| Mask | Interruption mask clear |
| unsigned int OS_InterruptMaskSet | ( | unsigned int | Mask | ) |
Set a interruption mask
| Mask | Interruption mask set |
| void OS_InterruptServiceRoutine | ( | unsigned int | status | ) |
Function called by assembly (into interruption handler). Implements the routine to handle interruption in HeMPS
| status | Status of the interruption. Signal the interruption type |
| void Scheduler | ( | ) |
Generic task scheduler call
| void send_message_delivery | ( | int | producer_task, |
| int | consumer_task, | ||
| int | consumer_PE, | ||
| Message * | msg_ptr | ||
| ) |
Assembles and sends a MESSAGE_DELIVERY packet to a consumer task located into a slave processor
| producer_task | ID of the task that produce the message (Send()) |
| consumer_task | ID of the task that consume the message (Receive()) |
| msg_ptr | Message pointer |
| void send_message_request | ( | int | producer_task, |
| int | consumer_task, | ||
| unsigned int | producer_PE, | ||
| unsigned int | sourcePE | ||
| ) |
| void send_slack_time_report | ( | ) |
Assembles and sends a SLACK_TIME_REPORT packet to the master kernel
| void send_task_allocated | ( | TCB * | allocated_task | ) |
Assembles and sends a TASK_ALLOCATED packet to the master kernel
| allocated_task | Allocated task TCB pointer |
| void send_task_real_time_change | ( | TCB * | tcb_ptr | ) |
Assembles and sends a REAL_TIME_CHANGE packet to the master kernel
| tcb_ptr | TCB pointer of the task that change its real-time parameters |
| void send_task_terminated | ( | TCB * | terminated_task | ) |
Assembles and sends a TASK_TERMINATED packet to the master kernel
| terminated_task | Terminated task TCB pointer |
| void send_update_task_location | ( | unsigned int | target_proc, |
| unsigned int | task_id, | ||
| unsigned int | new_task_location | ||
| ) |
Assembles and sends a UPDATE_TASK_LOCATION packet to a slave processor. Useful because task migration
| target_proc | Target slave processor which the packet will be sent |
| task_id | Task ID that have its location updated |
| new_task_location | New location (slave processor address) of the task |
| int Syscall | ( | unsigned int | service, |
| unsigned int | arg0, | ||
| unsigned int | arg1, | ||
| unsigned int | arg2 | ||
| ) |
Syscall handler. It is called when a task calls a function defined into the api.h file
| service | Service of the syscall |
| arg0 | Generic argument |
| arg1 | Generic argument |
| arg2 | Generic argument |
1.8.11