MCPcopy Create free account

hub / github.com/Simple-XX/SimpleKernel / functions

Functions1,141 in github.com/Simple-XX/SimpleKernel

↓ 414 callersFunctionInfo
src/include/kernel_log.hpp:182
↓ 277 callersFunctionErr
src/include/kernel_log.hpp:200
↓ 208 callersMethodEnqueue
* @brief 将任务加入就绪队列 * @param task 任务控制块指针 * * 新加入的任务的 vruntime 设置为当前 min_vruntime,防止饥饿。 */
src/task/include/cfs_scheduler.hpp:58
↓ 173 callersMethodPickNext
* @brief 选择下一个要运行的任务 * @return TaskControlBlock* 下一个任务,如果队列为空则返回 nullptr * * 选择 vruntime 最小的任务,实现完全公平调度。 */
src/task/include/cfs_scheduler.hpp:103
↓ 104 callersFunctionsys_exit
src/syscall.cpp:97
↓ 103 callersMethodAddTask
src/task/task_manager.cpp:94
↓ 93 callersMethodGetQueueSize
* @brief 获取就绪队列大小 * @return size_t 队列中的任务数量 */
src/task/include/cfs_scheduler.hpp:126
↓ 84 callersFunctionsys_sleep
src/syscall.cpp:112
↓ 70 callersMethodReceive
* @brief 向 FSM 发送消息 * @param msg 要发送的消息 * @pre 调用者持有保护此 TCB 的锁(如 cpu_sched.lock) * @post cached_state_ 以 release 语义更新,跨核可见 */
src/task/include/task_fsm.hpp:170
↓ 69 callersFunctionDebug
src/include/kernel_log.hpp:173
↓ 48 callersMethodUnLock
src/task/mutex.cpp:74
↓ 45 callersMethodIsEmpty
* @brief 判断队列是否为空 * @return bool 队列为空返回 true */
src/task/include/cfs_scheduler.hpp:134
↓ 45 callersMethodmessage
src/include/expected.hpp:352
↓ 43 callersMethodDequeue
* @brief 从就绪队列中移除指定任务 * @param task 要移除的任务控制块指针 */
src/task/include/cfs_scheduler.hpp:85
↓ 43 callersMethodGetStats
* @brief 获取调度器统计信息 * @return 统计信息结构体 */
src/task/include/scheduler_base.hpp:144
↓ 43 callersMethodsize
* @brief Get an approximate size of the queue * * Note: This is an approximation and may not be accurate in concurrent * scenarios. * *
3rd/MPMCQueue/include/MPMCQueue.hpp:132
↓ 41 callersMethodGetCurrentTask
* @brief 获取当前任务 * @return TaskControlBlock* 当前正在运行的任务 */
src/task/include/task_manager.hpp:117
↓ 41 callersMethodLock
src/task/mutex.cpp:11
↓ 36 callersFunctionstrncpy
复制指定长度的字符串
src/libc/sk_string.c:85
↓ 35 callersFunctionmemset
设置内存块
src/libc/sk_string.c:40
↓ 35 callersFunctionstrcmp
比较字符串
src/libc/sk_string.c:109
↓ 34 callersFunctionGetCurrentCoreId
使用线程 ID 映射到核心 ID(用于测试多核场景)
tests/unit_test/mocks/cpu_io.h:26
↓ 34 callersFunctionGetInterruptStatus
tests/unit_test/mocks/cpu_io.h:48
↓ 33 callersFunctionWrite
src/filesystem/vfs/write.cpp:13
↓ 31 callersFunctionPause
tests/unit_test/mocks/cpu_io.h:20
↓ 29 callersFunctionRead
src/filesystem/vfs/read.cpp:13
↓ 28 callersMethodGetStatus
src/task/task_control_block.cpp:88
↓ 25 callersFunctionWarn
src/include/kernel_log.hpp:191
↓ 23 callersFunctionGetVfsState
src/filesystem/vfs/vfs.cpp:17
↓ 23 callersMethodWait
src/task/wait.cpp:13
↓ 22 callersMethodOnTick
* @brief 每个 tick 更新任务的 vruntime * @param current 当前运行的任务 * @return bool 返回 true 表示需要抢占当前任务 * * CFS 核心逻辑: * 1. 更新当前任务的 vruntime(考虑权重)
src/task/include/cfs_scheduler.hpp:147
↓ 21 callersFunctionstrlen
获取字符串长度
src/libc/sk_string.c:134
↓ 20 callersFunctionRawPut
绕过队列直接输出至串口(用于 panic 路径)
src/include/kernel_log.hpp:211
↓ 19 callersMethodGetMapping
src/memory/virtual_memory.cpp:141
↓ 18 callersMethodDestroyPageDirectory
src/memory/virtual_memory.cpp:160
↓ 15 callersFunctionGetUserPagePermissions
获取用户页面权限
tests/unit_test/mocks/cpu_io.h:79
↓ 15 callersMethodMapPage
src/memory/virtual_memory.cpp:74
↓ 15 callersMethodOnPreempted
* @brief 任务被抢占时调用 * @param task 被抢占的任务 * * 被抢占的任务需要重新入队,保持其 vruntime。 */
src/task/include/cfs_scheduler.hpp:176
↓ 15 callersFunctionaligned_alloc
tests/unit_test/virtual_memory_test.cpp:65
↓ 14 callersMethodBindThreadToCore
tests/unit_test/mocks/test_environment_state.cpp:66
↓ 14 callersMethodSetCurrentThreadEnvironment
tests/unit_test/mocks/test_environment_state.cpp:18
↓ 14 callersMethodpush
* @brief Attempt to enqueue an item * * @param item The item to enqueue * @return true if the item was successfully enqueued * @return fal
3rd/MPMCQueue/include/MPMCQueue.hpp:65
↓ 13 callersMethodReadConfigU32
src/device/virtio/transport/pci.hpp:50
↓ 13 callersFunctionaligned_free
src/memory/memory.cpp:96
↓ 13 callersMethodempty
* @brief Check if the queue is empty (approximate) * * Note: This is an approximation and may not be accurate in concurrent * scenarios. *
3rd/MPMCQueue/include/MPMCQueue.hpp:147
↓ 13 callersMethodpop
* @brief Attempt to dequeue an item * * @param item Reference to store the dequeued item * @return true if an item was successfully dequeued
3rd/MPMCQueue/include/MPMCQueue.hpp:87
↓ 12 callersFunctionGetCurrentCore
@brief 获取当前核心的 PerCpu 数据
src/include/per_cpu.hpp:55
↓ 12 callersMethodJoinThreadGroup
src/task/task_control_block.cpp:92
↓ 12 callersFunctionOpen
src/filesystem/vfs/open.cpp:14
↓ 12 callersFunctionputchar_
tests/integration_test/opensbi_test/main.cpp:12
↓ 11 callersFunctionClose
src/filesystem/vfs/close.cpp:15
↓ 11 callersMethodGetMemory
* @brief 获取内存信息 * @return Expected<std::pair<uint64_t, size_t>> 内存信息<地址,长度> * @pre fdt_header_ 不为空 * @post 返回第一个 reg 条目的 base 和 size */
src/include/kernel_fdt.hpp:92
↓ 11 callersMethodGetRootInode
src/filesystem/ramfs/ramfs.cpp:165
↓ 11 callersFunctionfree
src/memory/memory.cpp:69
↓ 11 callersFunctionmemcmp
比较内存块
src/libc/sk_string.c:49
↓ 11 callersFunctionmemcpy
复制内存块
src/libc/sk_string.c:12
↓ 10 callersMethodCreate
src/filesystem/ramfs/ramfs.cpp:188
↓ 10 callersFunctionEnableInterrupt
tests/unit_test/mocks/cpu_io.h:34
↓ 10 callersFunctionFresultToErrorCode
* @brief 将 FatFS FRESULT 映射到内核 ErrorCode * @details 区分常见错误类别,避免将所有错误笼统归入 kFsCorrupted */
src/filesystem/fatfs/fatfs.cpp:23
↓ 10 callersFunctionaligned_alloc
src/memory/memory.cpp:89
↓ 9 callersMethodGet
src/arch/riscv64/plic/plic.cpp:80
↓ 9 callersFunctionGetMountTable
src/filesystem/vfs/mount.cpp:234
↓ 9 callersMethodRegisterInterruptFunc
src/arch/riscv64/interrupt.cpp:65
↓ 8 callersMethodGetCoreCount
tests/unit_test/mocks/test_environment_state.cpp:61
↓ 8 callersMethodGetThreadGroupSize
src/task/task_control_block.cpp:106
↓ 8 callersFunctionHandleException
* @brief 通用异常处理辅助函数 * @param exception_msg 异常类型描述 * @param context 中断上下文 * @param print_regs 要打印的寄存器数量 (0, 4, 或 8) */
src/arch/aarch64/interrupt_main.cpp:25
↓ 8 callersMethodIsValid
src/device/virtio/transport/pci.hpp:18
↓ 8 callersFunctionLookup
src/filesystem/vfs/lookup.cpp:14
↓ 8 callersMethodLookup
src/filesystem/vfs/mount.cpp:158
↓ 8 callersMethodMount
tests/unit_test/vfs_test.cpp:57
↓ 8 callersFunctionstrrchr
反向查找字符在字符串中的首次出现
src/libc/sk_string.c:163
↓ 7 callersMethodClearCurrentThreadEnvironment
tests/unit_test/mocks/test_environment_state.cpp:22
↓ 7 callersMethodGetCurrentCoreEnv
tests/unit_test/mocks/test_environment_state.cpp:99
↓ 7 callersMethodInitializeCores
tests/unit_test/mocks/test_environment_state.cpp:31
↓ 7 callersMethodIsLockedByCurrentCore
* @brief 检查当前 core 是否获得此锁 * @return true 是 * @return false 否 */
src/include/spinlock.hpp:115
↓ 7 callersMethodOnTimeSliceExpired
* @brief 时间片耗尽处理:当任务时间片用完时调用 * * 用于支持自定义时间片处理(如 MLFQ 的优先级降级) * * @param task 时间片耗尽的任务 * @return true 表示任务需要重新入队 * @return false 表示任务
src/task/include/scheduler_base.hpp:100
↓ 7 callersFunctionPutStr
通过 etl_putchar 输出字符串(空指针安全)
src/include/kernel_log.hpp:82
↓ 7 callersMethodReadConfigU8
src/device/virtio/transport/pci.hpp:44
↓ 7 callersMethodResetStats
* @brief 重置统计信息 */
src/task/include/scheduler_base.hpp:149
↓ 7 callersMethodSetStatus
src/device/virtio/transport/pci.hpp:23
↓ 7 callersFunctionWmb
tests/unit_test/mocks/cpu_io.h:58
↓ 7 callersFunctionisdigit
src/libc/sk_ctype.c:19
↓ 7 callersFunctionmalloc
src/memory/memory.cpp:62
↓ 6 callersMethodClonePageDirectory
src/memory/virtual_memory.cpp:178
↓ 6 callersMethodGetMinVruntime
* @brief 获取当前 min_vruntime * @return uint64_t 最小虚拟运行时间 */
src/task/include/cfs_scheduler.hpp:187
↓ 6 callersMethodGetStatus
src/device/virtio/transport/pci.hpp:22
↓ 6 callersFunctionIsPageTableEntryValid
页表项操作函数
tests/unit_test/mocks/cpu_io.h:170
↓ 6 callersMethodMapMMIO
src/memory/virtual_memory.cpp:56
↓ 6 callersMethodOnScheduled
* @brief 任务开始运行时调用 (从 Ready 变为 Running) * * @param task 即将运行的任务 */
src/task/include/scheduler_base.hpp:138
↓ 6 callersMethodSchedule
src/task/schedule.cpp:36
↓ 6 callersMethodUnmount
tests/unit_test/vfs_test.cpp:63
↓ 6 callersFunctionstrchr
查找字符在字符串中的首次出现
src/libc/sk_string.c:152
↓ 6 callersFunctionstrnlen
获取指定字符串长度
src/libc/sk_string.c:143
↓ 6 callersFunctionsys_kill
src/syscall.cpp:332
↓ 6 callersFunctionsys_sched_getaffinity
src/syscall.cpp:267
↓ 6 callersFunctionsys_yield
src/syscall.cpp:107
↓ 5 callersMethodFree
tests/unit_test/virtual_memory_test.cpp:38
↓ 5 callersMethodGetData
* @brief 获取资源数据 * @return uint64_t 资源数据 */
src/task/include/resource_id.hpp:91
↓ 5 callersMethodGetTypeName
* @brief 获取类型名称(用于调试) * @return const char* 资源类型名称 */
src/task/include/resource_id.hpp:99
↓ 5 callersFunctionInit
src/filesystem/vfs/vfs.cpp:80
next →1–100 of 1,141, ranked by callers