Discussion:
s_runQueue
(too old to reply)
zhe
2005-03-02 05:08:07 UTC
Permalink
The s_runQueue in kthread.c is a static struct, but in the scheduling
syscall I need to use the s_runQueue, are we allowed to make the s_runQueue
globle?

thx
Zhe
Iulian Neamtiu
2005-03-02 14:53:50 UTC
Permalink
Feel free to do that. In general, feel free to modify the kernel in any
way you want (unless we mention explicitly that you're not allowed to
change a specific part, which we don't do very often).

Iulian
Post by zhe
The s_runQueue in kthread.c is a static struct, but in the scheduling
syscall I need to use the s_runQueue, are we allowed to make the s_runQueue
globle?
thx
Zhe
Drew Chen
2005-03-02 17:22:42 UTC
Permalink
trying to do just that, making s_runQueue global, i get an error when compiling in
my Sys_SetSchedulingPolicy() that says
" undefined reference to `s_runQueue' "

i made it an extern global in kthread.h but is there some thing that causes
problems with externs and static vars, or externs and arrays?

-drew
Drew Chen
2005-03-02 17:30:23 UTC
Permalink
ok. nvm. i answered my own question by googling extern static,

i came up with this

http://www.eskimo.com/~scs/cclass/krnotes/sx7f.html

i hope this page helps you all.
it clarified alot about the inner workings of C for me.

Loading...