Port-amiga archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How to program in kernel ?



 ----
From: Ignatios Souvatzis <ignatios%cs.uni-bonn.de@localhost>
Cc: port-amiga%NetBSD.ORG@localhost
Date: jeudi 21 août 1997 12:24
Subject: Re: How to program in kernel ?

>> I try to implement a minimun set of IOCTL in kernel, for the amiga
graphic
>> chipset (grf_cc.c).
>I don't understand what you're trying to do with ioctl(). Like any other
>system call, thats a userland C library function which passes parameters
>to the kernel through a special trap. The functions called inside the
kernel
>have to deal with getting data out of user space, so they won't work if
>called from inside the kernel.

For example, to set or get the colormap, I use viewioctl(fd, VIOCGCMAP,
&cm, -1, NULL). But it doesn't work. Could I use this call inside the
kernel ?
Maybe the problem is the fd (dev_t) ? I use the descriptor that came from
ioctl() call, gp I think (something like gp->d_grfdev).

Could someone help me ?

Thanks.





Home | Main Index | Thread Index | Old Index