Re: can anyone tell me which function to call to pause the kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux