从内核到控制台的Minix打印 [英] Minix print from kernel to console

查看:128
本文介绍了从内核到控制台的Minix打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试更改Minix中的计划,并希望从/kernel/proc.c打印到标准输出. Printf不能在内核内部使用.我正在使用Minix 3.1.2.

I am trying to change the scheduling in Minix and want to print from /kernel/proc.c to standard output. Printf cannot be used inside kernel. I am using Minix 3.1.2.

我想向其中添加代码

sched()

功能,以便将消息打印到控制台.

function in order to print messages to console.

我该怎么做?

推荐答案

调用printk(const char *fmt, ...).

这篇关于从内核到控制台的Minix打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆