a question about minix

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
itisiuk
Member
Member
Posts: 98
Joined: Mon Mar 24, 2008 1:46 pm

a question about minix

Post by itisiuk »

I’ve have been looking into the minix kernel to help me with my microkernel.

Declarations of this kind keep being made

Code: Select all

FORWARD _PROTOTYPE( void create_env, (struct proc *pp) );
FORWARD _PROTOTYPE( void k_printenv, (void) );
After a while I have found that

Code: Select all

#define FORWARD       static
And

Code: Select all

#define	_PROTOTYPE(function, params)	function params
does this mean for the above declarations

Code: Select all

static void create_env(struct proc *pp);
static void k_printenv(void);
why is this done this way, is it just a feature of the ack compiler??
xyzzy
Member
Member
Posts: 391
Joined: Wed Jul 25, 2007 8:45 am
Libera.chat IRC: aejsmith
Location: London, UK
Contact:

Re: a question about minix

Post by xyzzy »

IIRC OSDI said that's done so that it is easier to get Minix to compile with different C compilers that have different function declaration syntax - i.e. K&R vs. ANSI C.
itisiuk
Member
Member
Posts: 98
Joined: Mon Mar 24, 2008 1:46 pm

Re: a question about minix

Post by itisiuk »

Thanks i understand that a lot better now.

where did you find that info cos i had a good look through the minix website and couldnt find that.
xyzzy
Member
Member
Posts: 391
Joined: Wed Jul 25, 2007 8:45 am
Libera.chat IRC: aejsmith
Location: London, UK
Contact:

Re: a question about minix

Post by xyzzy »

Operating Systems: Design and Implementation - Third Edition. Page 132 to be precise :) I would recommend buying it - although I'm not a huge Minix fan, it's still quite an interesting book.
itisiuk
Member
Member
Posts: 98
Joined: Mon Mar 24, 2008 1:46 pm

Re: a question about minix

Post by itisiuk »

Cheers for that thanks.

im not a big fan of how minix is written however i like the general idea.
and im having massive trouble with my micro kernel.
thinking of going back to my monolithic kernel after one last try at a microkernel.
trying to get some ideas from plan 9 and minix on what i want to do with it and
how it should would.
Post Reply