|
ICARUS OS (Intelligent Cooperative Architecture for Real-time Unified Systems) 0.1.0
Preemptive Real-Time Operating System for ARM Cortex-M7
|
ICARUS Supervisor Call (SVC) Definitions. More...
#include <stdint.h>Go to the source code of this file.
Macros | |
| #define | SVC_TASK_ACTIVE_SLEEP 0 |
| #define | SVC_TASK_BLOCKING_SLEEP 1 |
| #define | SVC_ENTER_CRITICAL 2 |
| #define | SVC_EXIT_CRITICAL 3 |
| #define | SVC_PIPE_INIT 4 |
| #define | SVC_PIPE_ENQUEUE 5 |
| #define | SVC_PIPE_DEQUEUE 6 |
| #define | SVC_OS_INIT 7 |
| #define | SVC_OS_START 8 |
| #define | SVC_OS_YIELD 9 |
| #define | SVC_OS_REGISTER_TASK 10 |
| #define | SVC_OS_GET_CURRENT_TASK_NAME 11 |
| #define | SVC_OS_GET_TICK_COUNT 12 |
| #define | SVC_OS_EXIT_TASK 13 |
| #define | SVC_OS_KILL_PROCESS 14 |
| #define | SVC_OS_TASK_SUICIDE 15 |
| #define | SVC_SEMAPHORE_INIT 16 |
| #define | SVC_SEMAPHORE_CONSUME 17 |
| #define | SVC_SEMAPHORE_FEED 18 |
| #define | SVC_SEMAPHORE_GET_COUNT 19 |
| #define | SVC_SEMAPHORE_GET_MAX_COUNT 20 |
| #define | SVC_PIPE_GET_COUNT 21 |
| #define | SVC_PIPE_GET_MAX_COUNT 22 |
| #define | SVC_TASK_BUSY_WAIT 23 |
| #define | SVC_OS_GET_RUNNING_TASK_COUNT 24 |
| #define | SVC_OS_GET_TASK_TICKS_REMAINING 25 |
| #define | SVC_KERNEL_GET_STACK 26 |
| #define | SVC_KERNEL_GET_DATA 27 |
| #define | SVC_KERNEL_PROTECTED_DATA 28 |
| #define | SVC_SEM_CAN_FEED 29 /* bool: count < max && engaged */ |
| #define | SVC_SEM_CAN_CONSUME 30 /* bool: count > 0 && engaged */ |
| #define | SVC_PIPE_CAN_ENQUEUE 31 /* bool: free >= bytes && engaged */ |
| #define | SVC_PIPE_CAN_DEQUEUE 32 /* bool: count >= bytes && engaged*/ |
| #define | SVC_SEM_INCREMENT 33 /* ++count, update tick */ |
| #define | SVC_SEM_DECREMENT 34 /* --count, update tick */ |
| #define | SVC_PIPE_WRITE_BYTES 35 /* write to buffer, update tick */ |
| #define | SVC_PIPE_READ_BYTES 36 /* read from buffer, update tick */ |
| #define | SVC_GET_TASK_NAME 37 /* const char*: task_list[i]->name */ |
| #define | SVC_GET_NUM_TASKS 38 /* uint8_t: num_created_tasks */ |
| #define | SVC_OS_IS_RUNNING 39 /* uint8_t: os_running flag */ |
| #define | SVC_CDC_RX_INIT 40 /* clear head/tail */ |
| #define | SVC_CDC_RX_READ_BYTE 41 /* bool: pop one byte if any */ |
| #define | SVC_CDC_RX_AVAILABLE 42 /* uint32_t: bytes available */ |
| #define | SVC_EVENT_INIT 43 /* clear ring + squelch */ |
| #define | SVC_OS_EVENT 44 /* emit one entry */ |
| #define | SVC_EVENT_SET_SQUELCH 45 /* set per-module threshold */ |
| #define | SVC_EVENT_GET_SQUELCH 46 /* read per-module threshold */ |
| #define | SVC_EVENT_DRAIN 47 /* copy entries into caller buf */ |
| #define | SVC_EVENT_GET_COUNT 48 /* uint32_t: ring fill */ |
| #define | SVC_TBL_INIT 49 /* clear registry */ |
| #define | SVC_TBL_REGISTER 50 /* add a descriptor */ |
| #define | SVC_TBL_LOAD 51 /* append bytes to staging */ |
| #define | SVC_TBL_ACTIVATE_PREPARE 52 /* validate + copy staging→tmp */ |
| #define | SVC_TBL_ACTIVATE_COMMIT 53 /* copy tmp→active */ |
| #define | SVC_TBL_DUMP 54 /* copy active→caller buf */ |
| #define | SVC_TBL_GET_DESCRIPTOR 55 /* return descriptor pointer */ |
| #define | SVC_TBL_COUNT 56 /* uint8_t: registered count */ |
| #define | SVC_OS_RESTART_TASK 57 /* restart killed/finished task */ |
| #define | SVC_SEMAPHORE_CONSUME_TIMEOUT 58 /* bool: acquire with timeout */ |
| #define | SVC_GET_TASK_STATE 59 /* icarus_task_state_t */ |
| #define | SVC_GET_TASK_DISPATCH_COUNT 60 /* uint32_t: dispatch counter */ |
| #define | SVC_GET_STACK_WATERMARK 61 /* uint32_t: min free words */ |
| #define | SVC_UPDATE_STACK_WATERMARK 62 /* void: scan + update */ |
| #define | SVC_CS_INIT 63 /* void: clear regions */ |
| #define | SVC_CS_SET_CALLBACK 64 /* void: set mismatch callback */ |
| #define | SVC_CS_ADD_REGION 65 /* bool: register + baseline CRC */ |
| #define | SVC_CS_ENABLE 66 /* bool: enable/disable region */ |
| #define | SVC_CS_REBASELINE 67 /* bool: recompute baseline */ |
| #define | SVC_CS_CHECK_ALL 68 /* uint8_t: scan all regions */ |
| #define | SVC_CS_GET_REGION 69 /* bool: read region descriptor */ |
| #define | SVC_CS_REGION_COUNT 70 |
| #define | SVC_BKPRAM_WRITE 71 /* bool: memcpy src→BKPRAM */ |
| #define | SVC_SB_INIT 72 /* void: clear routes */ |
| #define | SVC_SB_SUBSCRIBE 73 /* bool: add (msg,pipe) binding */ |
| #define | SVC_SB_UNSUBSCRIBE 74 /* bool: remove binding */ |
| #define | SVC_SB_PUBLISH 75 /* uint8_t: enqueue to all subs */ |
| #define | SVC_SB_SUBSCRIBER_COUNT 76 /* uint8_t: count for msg_id */ |
| #define | SVC_SB_ROUTE_COUNT 77 /* uint8_t: total route entries */ |
| #define | SVC_FS_INIT 78 /* void: clear table + data */ |
| #define | SVC_FS_CREATE 79 /* bool: allocate new file */ |
| #define | SVC_FS_OPEN 80 /* bool: open existing file */ |
| #define | SVC_FS_WRITE 81 /* bool: append to file */ |
| #define | SVC_FS_READ 82 /* uint16_t: read from offset */ |
| #define | SVC_FS_DELETE 83 /* bool: remove by name */ |
| #define | SVC_FS_LIST 84 /* uint8_t: enumerate files */ |
| #define | SVC_FS_STATS 85 /* void: fill stats struct */ |
Functions | |
| void | SVC_Handler_C (uint32_t *stack_frame) |
| C-level SVC dispatcher called from SVC_Handler assembly. | |
ICARUS Supervisor Call (SVC) Definitions.
Defines SVC numbers for MPU-protected kernel functions. These functions execute in privileged mode with controlled access to protected kernel data structures.
Organization:
Definition in file svc.h.
| #define SVC_CDC_RX_AVAILABLE 42 /* uint32_t: bytes available */ |
| #define SVC_CDC_RX_READ_BYTE 41 /* bool: pop one byte if any */ |
| #define SVC_CS_ADD_REGION 65 /* bool: register + baseline CRC */ |
| #define SVC_CS_GET_REGION 69 /* bool: read region descriptor */ |
| #define SVC_CS_SET_CALLBACK 64 /* void: set mismatch callback */ |
| #define SVC_EVENT_GET_SQUELCH 46 /* read per-module threshold */ |
| #define SVC_EVENT_SET_SQUELCH 45 /* set per-module threshold */ |
| #define SVC_GET_NUM_TASKS 38 /* uint8_t: num_created_tasks */ |
| #define SVC_GET_STACK_WATERMARK 61 /* uint32_t: min free words */ |
| #define SVC_GET_TASK_DISPATCH_COUNT 60 /* uint32_t: dispatch counter */ |
| #define SVC_GET_TASK_NAME 37 /* const char*: task_list[i]->name */ |
| #define SVC_GET_TASK_STATE 59 /* icarus_task_state_t */ |
| #define SVC_OS_IS_RUNNING 39 /* uint8_t: os_running flag */ |
| #define SVC_OS_RESTART_TASK 57 /* restart killed/finished task */ |
| #define SVC_PIPE_CAN_DEQUEUE 32 /* bool: count >= bytes && engaged*/ |
| #define SVC_PIPE_CAN_ENQUEUE 31 /* bool: free >= bytes && engaged */ |
| #define SVC_PIPE_READ_BYTES 36 /* read from buffer, update tick */ |
| #define SVC_PIPE_WRITE_BYTES 35 /* write to buffer, update tick */ |
| #define SVC_SB_ROUTE_COUNT 77 /* uint8_t: total route entries */ |
| #define SVC_SB_SUBSCRIBE 73 /* bool: add (msg,pipe) binding */ |
| #define SVC_SB_SUBSCRIBER_COUNT 76 /* uint8_t: count for msg_id */ |
| #define SVC_SEM_CAN_CONSUME 30 /* bool: count > 0 && engaged */ |
| #define SVC_SEMAPHORE_CONSUME_TIMEOUT 58 /* bool: acquire with timeout */ |
| #define SVC_TBL_ACTIVATE_PREPARE 52 /* validate + copy staging→tmp */ |
| #define SVC_TBL_GET_DESCRIPTOR 55 /* return descriptor pointer */ |
| #define SVC_UPDATE_STACK_WATERMARK 62 /* void: scan + update */ |
| void SVC_Handler_C | ( | uint32_t * | stack_frame | ) |
C-level SVC dispatcher called from SVC_Handler assembly.
| stack_frame | Pointer to exception stack frame |
C-level SVC dispatcher called from SVC_Handler assembly.
| stack_frame | Pointer to exception stack frame (R0-R3, R12, LR, PC, xPSR) |
Definition at line 50 of file svc.c.
References __cdc_rx_available(), __cdc_rx_init(), __cdc_rx_read_byte(), __cs_add_region(), __cs_check_all(), __cs_enable(), __cs_get_region(), __cs_init(), __cs_rebaseline(), __cs_region_count(), __cs_set_callback(), __enter_critical(), __event_drain(), __event_get_count(), __event_get_squelch(), __event_init(), __event_set_squelch(), __exit_critical(), __fs_create(), __fs_delete(), __fs_init(), __fs_list(), __fs_open(), __fs_read(), __fs_stats(), __fs_write(), __kernel_get_data(), __kernel_get_stack(), __kernel_protected_data(), __os_event(), __os_exit_task(), __os_get_current_task_name(), __os_get_num_created_tasks(), __os_get_running_task_count(), __os_get_stack_watermark(), __os_get_task_dispatch_count(), __os_get_task_name(), __os_get_task_state(), __os_get_task_ticks_remaining(), __os_get_tick_count(), __os_is_running(), __os_kill_process(), __os_register_task(), __os_restart_task(), __os_task_suicide(), __os_update_stack_watermark(), __os_yield(), __pipe_can_dequeue(), __pipe_can_enqueue(), __pipe_get_count(), __pipe_get_max_count(), __pipe_init(), __pipe_read_bytes(), __pipe_write_bytes(), __sb_init(), __sb_publish(), __sb_route_count(), __sb_subscribe(), __sb_subscriber_count(), __sb_unsubscribe(), __sem_can_consume(), __sem_can_feed(), __sem_decrement(), __sem_increment(), __semaphore_consume_timeout(), __semaphore_get_count(), __semaphore_get_max_count(), __semaphore_init(), __task_active_sleep(), __tbl_activate_commit(), __tbl_activate_prepare(), __tbl_count(), __tbl_dump(), __tbl_get_descriptor(), __tbl_init(), __tbl_load(), __tbl_register(), BSP_RAM_D3_BASE, BSP_RAM_D3_SIZE, SVC_BKPRAM_WRITE, SVC_CDC_RX_AVAILABLE, SVC_CDC_RX_INIT, SVC_CDC_RX_READ_BYTE, SVC_CS_ADD_REGION, SVC_CS_CHECK_ALL, SVC_CS_ENABLE, SVC_CS_GET_REGION, SVC_CS_INIT, SVC_CS_REBASELINE, SVC_CS_REGION_COUNT, SVC_CS_SET_CALLBACK, SVC_ENTER_CRITICAL, SVC_EVENT_DRAIN, SVC_EVENT_GET_COUNT, SVC_EVENT_GET_SQUELCH, SVC_EVENT_INIT, SVC_EVENT_SET_SQUELCH, SVC_EXIT_CRITICAL, SVC_FS_CREATE, SVC_FS_DELETE, SVC_FS_INIT, SVC_FS_LIST, SVC_FS_OPEN, SVC_FS_READ, SVC_FS_STATS, SVC_FS_WRITE, SVC_GET_NUM_TASKS, SVC_GET_STACK_WATERMARK, SVC_GET_TASK_DISPATCH_COUNT, SVC_GET_TASK_NAME, SVC_GET_TASK_STATE, SVC_KERNEL_GET_DATA, SVC_KERNEL_GET_STACK, SVC_KERNEL_PROTECTED_DATA, SVC_OS_EVENT, SVC_OS_EXIT_TASK, SVC_OS_GET_CURRENT_TASK_NAME, SVC_OS_GET_RUNNING_TASK_COUNT, SVC_OS_GET_TASK_TICKS_REMAINING, SVC_OS_GET_TICK_COUNT, SVC_OS_IS_RUNNING, SVC_OS_KILL_PROCESS, SVC_OS_REGISTER_TASK, SVC_OS_RESTART_TASK, SVC_OS_TASK_SUICIDE, SVC_OS_YIELD, SVC_PIPE_CAN_DEQUEUE, SVC_PIPE_CAN_ENQUEUE, SVC_PIPE_DEQUEUE, SVC_PIPE_ENQUEUE, SVC_PIPE_GET_COUNT, SVC_PIPE_GET_MAX_COUNT, SVC_PIPE_INIT, SVC_PIPE_READ_BYTES, SVC_PIPE_WRITE_BYTES, SVC_SB_INIT, SVC_SB_PUBLISH, SVC_SB_ROUTE_COUNT, SVC_SB_SUBSCRIBE, SVC_SB_SUBSCRIBER_COUNT, SVC_SB_UNSUBSCRIBE, SVC_SEM_CAN_CONSUME, SVC_SEM_CAN_FEED, SVC_SEM_DECREMENT, SVC_SEM_INCREMENT, SVC_SEMAPHORE_CONSUME, SVC_SEMAPHORE_CONSUME_TIMEOUT, SVC_SEMAPHORE_FEED, SVC_SEMAPHORE_GET_COUNT, SVC_SEMAPHORE_GET_MAX_COUNT, SVC_SEMAPHORE_INIT, SVC_TASK_ACTIVE_SLEEP, SVC_TASK_BLOCKING_SLEEP, SVC_TASK_BUSY_WAIT, SVC_TBL_ACTIVATE_COMMIT, SVC_TBL_ACTIVATE_PREPARE, SVC_TBL_COUNT, SVC_TBL_DUMP, SVC_TBL_GET_DESCRIPTOR, SVC_TBL_INIT, SVC_TBL_LOAD, SVC_TBL_REGISTER, and SVC_UPDATE_STACK_WATERMARK.