kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: fser@code-libre.org (François)
To: kernelnewbies@lists.kernelnewbies.org
Subject: can anyone tell me which function to call to pause the kernel
Date: Thu, 12 May 2016 17:26:27 +0200	[thread overview]
Message-ID: <5734A0A3.8080503@code-libre.org> (raw)
In-Reply-To: <57349965.5070707@gmail.com>

On 05/12/2016 04:55 PM, walkerlala wrote:
> I successfully insert some function into the kernel code and make it 
> execute when the kernel start up, but I just can't make the kernel stop 
> executing. Are there any functions which can pause the kernel so that I 
> prompt the user, and let the user input a command(maybe a comment to 
> display the current time. Something like a shell would do) and interact ?

I don't think you can actually stop the kernel. The linux kernel is
multi-threads and events driven, so I doubt you can stop and restart it
that easily.

BUT

if you want to interract with userland, you can implement a syscall on
your own, or create a proc device (for instance) to let user read /
write data to the kernel.

For instance, you could create a proc entry called gettime, and when
user reads it (ie: cat /proc/gettime) you would provide a proper answer.

Hope this help.

Fran?ois

  reply	other threads:[~2016-05-12 15:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-12 14:55 can anyone tell me which function to call to pause the kernel walkerlala
2016-05-12 15:26 ` François [this message]
2016-05-15 17:36 ` Mulyadi Santosa
     [not found]   ` <57391618.7090506@gmail.com>
2016-05-17 11:41     ` Mulyadi Santosa
2016-05-17 12:29       ` walkerlala
2016-05-17 15:21         ` Valdis.Kletnieks at vt.edu
2016-05-18  4:53           ` walkerlala

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=5734A0A3.8080503@code-libre.org \
    --to=fser@code-libre.org \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).