9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: dusan3sic@gmail.com
To: 9fans <9fans@9fans.net>
Subject: [9fans] print() in kernel space doesn't work like I would think
Date: Thu, 31 Aug 2023 11:43:58 -0400	[thread overview]
Message-ID: <16934966380.ebCb.544220@composer.9fans.topicbox.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1088 bytes --]

I was editing plan9's realtime scheduler in /sys/src/9/port/edf.c and was trying to add a print to log something, but print didn't show anywhere(or I am looking at the wrong place). It has some prints in source code already, with this define.
#define DPRINT  if(Dontprint){}else print
And with Dontprint set to 0

I was expecting the output to be at boot time, in boot screen where it asks for bootargs, but it wasn't there. I thought it was either the wrong place I am looking at or it prints after I start the gui so I don't get to see it. 

Then i tried other prints,  iprint() seemed really cool and usefull but it does nothing. It builds ok, but doesn't output anything on serial (on Qemu serial window). Also, it didn't work in some user space program I made to test it. 

All I want is to have a normal log system so I can log things on screen.
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Te1d00dae663114b2-M7023d44f6d581fa0bf266fef
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 1946 bytes --]

             reply	other threads:[~2023-08-31 15:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31 15:43 dusan3sic [this message]
2023-08-31 15:48 ` Steve Simon
2023-08-31 16:27 ` ori
2023-08-31 16:31   ` ori
2023-08-31 16:46     ` dusan3sic
2023-08-31 16:58       ` dusan3sic
2023-08-31 17:25         ` dusan3sic
2023-08-31 17:34           ` ori
2023-09-01 10:59             ` dusan3sic
2023-08-31 19:42           ` ori
2023-08-31 16:53     ` dusan3sic
2023-08-31 17:20       ` ori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16934966380.ebCb.544220@composer.9fans.topicbox.com \
    --to=dusan3sic@gmail.com \
    --cc=9fans@9fans.net \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).