coperating-systemsystemsystem-callsminix

Adding new System Call in Minix


I am trying to create a new system call in Minix 3.3. At first i just want to create simple printmsg() call that will write "Hello World" on screen.
I looked various tutorials on internet and still couldn't find out solution.

When I test my system call in user program _syscall(PM_PROC_NR, PM_PRINTMSG, &m); I don't get any errors but no printf is displayed.

So, is it possible to printf messages from system calls since i had to add <stdio.h> myself in misc.c or i missed some steps. I forgot to mention that i go in /usr/src/releasetools and type make services and make install respectively to recompile kernel.


Solution

  • I figured out what was the problem, so i will post answer if someone needs this in future. I did everything well in this example but i failed to compile kernel.
    The location was correct which is usr/src/releasetools, but command needed is make hdboot. Also i figured out my PC somehow wasnt working well with this virtual machines and i had many errors while compiling even though i didn't change anything. When i switched to laptop everything worked fine.
    My conclusion is sometimes there is just something wrong on your machine so you should try and test problems on different ones