Adding a variable to proc{} structure

165 views
Skip to first unread message

Ravi L

unread,
Sep 8, 2009, 11:21:50 AM9/8/09
to minix3
Hi,

I am implementing lottery scheduling in Minix. I have just added a new
variable 'tickets' to the end of the proc{} structure in the kernel/
proc.h.

struct proc {
.....
int tickets;
};

I get 'PM: FS died' error when I boot with new image (with my change).
And the OS gets stuck.

I read that when we change 'proc' structure we need to change kernel/
sconst.h also. But, I am not sure what to add there. Can anybody help
me here?

Thanks in advance.
--ravi

Evgeniy Ivanov

unread,
Sep 8, 2009, 1:44:59 PM9/8/09
to min...@googlegroups.com
Hello,

If you add new variable to the end of struct you don't have to change sconst.h, thus everything should work. Make sure you have rebuilt all things dependent on proc structure ("make clean hdboot" from src/tools directory). 
--
Evgeniy Ivanov

Ravi L

unread,
Sep 8, 2009, 1:54:55 PM9/8/09
to minix3
Thanks Erik,

make clean hdboot - works. I dont see any issues now. I am not sure
why 'make install' didn't work.

thanks
--ravi

Evgeniy Ivanov

unread,
Sep 8, 2009, 3:22:02 PM9/8/09
to min...@googlegroups.com
On Tue, Sep 8, 2009 at 9:54 PM, Ravi L <moury...@gmail.com> wrote:

Thanks Erik,

make clean hdboot - works. I dont see any issues now. I am not sure
why 'make install' didn't work.


You could inspect Makefile to check, what happens for target "install". AFAIK it shouldn't check for "pending" changes (source files changed), so it just takes what you have and installs it. When you clean, requirements for "install" are missing, so make compiles things that required.

Please, check carefully http://wiki.minix3.org/en/DevelopersGuide/RebuildingSystem


--
Evgeniy Ivanov
Reply all
Reply to author
Forward
0 new messages