----- Original Message ----
From: pradeep singh <2500.pradeep@xxxxxxxxx>
To: kanishk rastogi <kanishk_rastogi85@xxxxxxxxx>
Sent: Friday, May 4, 2007 10:38:58 AM
Subject: Re: Re Where should I declare the global variable
From: pradeep singh <2500.pradeep@xxxxxxxxx>
To: kanishk rastogi <kanishk_rastogi85@xxxxxxxxx>
Sent: Friday, May 4, 2007 10:38:58 AM
Subject: Re: Re Where should I declare the global variable
rusty i cannot see your message. :-(
did you send an empty message??
~rautela
On 5/4/07, kanishk rastogi <kanishk_rastogi85@xxxxxxxxx> wrote:
>
>
>
>
>
> ----- Original Message ----
> From: Irfan Ahmed <ahm_irf@xxxxxxxxx>
> To: kernelnewbies@xxxxxxxxxxxx
> Sent: Friday, May 4, 2007 9:13:02 AM
> Subject: Where should I declare the global variable
>
>
> Hi,
>
>
> I am need to use one global variable in two files.
> One is ~/net/ipv6/tcp_ipv6.c where I have defined the global variable as
> extern int global_fd;
> Second is my custom system call code. Its code is as follows
> __________
> #include<linux/linkage.h>
> #include<linux/kernel.h>
>
> int global_fd;
>
> asmlinkage int sys_mycall(int fd)
> {
> global_fd = fd;
> return fd;
> }
> ___________
>
where is this code getting compiled
> where is this code
> is it getting compiled
>
>
> Now I am still getting the follwing error
> ___________________________
> CHK include/linux/version.h
> CHK include/linux/utsrelease.h
> Building modules, stage 2.
> MODPOST
> WARNING: drivers/atm/he.o - Section mismatch: reference to .init.text: from
> .text between 'he_start' (at offset 0x2074) and 'he_service_tbrq'
> WARNING: "global_fd" [net/ipv6/ipv6.ko] undefined!
> WARNING: "sys_write" [net/ipv6/ipv6.ko] undefined!
> [root@localhost linux-2.6.18.2]#
> ________________
>
> Anther thing that I want to ask about sys_write . Can I use it in kernel
> code other than kernel module. and how can I solve the undefined problem of
> sys_write even I have also added the syscalls.h header file.
>
> Regards,
>
> Irfan
> Send instant messages to your online friends http://uk.messenger.yahoo.com
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
>
> ________________________________
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! Autos.
>
> ________________________________
> Food fight? Enjoy some healthy debate
> in the Yahoo! Answers Food & Drink Q&A.
--
play the game
did you send an empty message??
~rautela
On 5/4/07, kanishk rastogi <kanishk_rastogi85@xxxxxxxxx> wrote:
>
>
>
>
>
> ----- Original Message ----
> From: Irfan Ahmed <ahm_irf@xxxxxxxxx>
> To: kernelnewbies@xxxxxxxxxxxx
> Sent: Friday, May 4, 2007 9:13:02 AM
> Subject: Where should I declare the global variable
>
>
> Hi,
>
>
> I am need to use one global variable in two files.
> One is ~/net/ipv6/tcp_ipv6.c where I have defined the global variable as
> extern int global_fd;
> Second is my custom system call code. Its code is as follows
> __________
> #include<linux/linkage.h>
> #include<linux/kernel.h>
>
> int global_fd;
>
> asmlinkage int sys_mycall(int fd)
> {
> global_fd = fd;
> return fd;
> }
> ___________
>
where is this code getting compiled
> where is this code
> is it getting compiled
>
>
> Now I am still getting the follwing error
> ___________________________
> CHK include/linux/version.h
> CHK include/linux/utsrelease.h
> Building modules, stage 2.
> MODPOST
> WARNING: drivers/atm/he.o - Section mismatch: reference to .init.text: from
> .text between 'he_start' (at offset 0x2074) and 'he_service_tbrq'
> WARNING: "global_fd" [net/ipv6/ipv6.ko] undefined!
> WARNING: "sys_write" [net/ipv6/ipv6.ko] undefined!
> [root@localhost linux-2.6.18.2]#
> ________________
>
> Anther thing that I want to ask about sys_write . Can I use it in kernel
> code other than kernel module. and how can I solve the undefined problem of
> sys_write even I have also added the syscalls.h header file.
>
> Regards,
>
> Irfan
> Send instant messages to your online friends http://uk.messenger.yahoo.com
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
>
> ________________________________
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! Autos.
>
> ________________________________
> Food fight? Enjoy some healthy debate
> in the Yahoo! Answers Food & Drink Q&A.
--
play the game
Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.