Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jan 2005 09:51:32 -0600 (CST)
From:      Zera William Holladay <zholla1@uic.edu>
To:        Jacques Fourie <jf@trispen.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: kernel vm question
Message-ID:  <Pine.GSO.4.58.0501270937010.22912@icarus.cc.uic.edu>
In-Reply-To: <41F90140.3020705@trispen.com>
References:  <41F90140.3020705@trispen.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On Thu, 27 Jan 2005, Jacques Fourie wrote:

> Hi,
>
> I have a kernel module with the following entry point :
>
> static int test_modevent(module_t mod, int type, void *unused)
> {
>    int s;
>    unsigned char *p = NULL;
>    unsigned char v = 0x55;
>
>    switch (type)
>      {
>      case MOD_LOAD:
>        p = (unsigned char *)ip_output;

What is ip_output?  Do you believe it is a function or variable?  It might
help if you just state to yourself in your native language what you want
to do here.

>        s = splhigh();
>
>        v = p[0];                   /* Page fault without this line */
>        p[0] = v;

The above makes no sense.  Why would you assign v to p[0] and then set
p[0] to the value of v?  What is the error message you get?  Also, it
might help to compile with -Wall since it help to catch some subtle
errors.

Good luck,

-Zera



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.58.0501270937010.22912>