SookYoung Kim wrote:
> Now, I'm programming in the kernel level. In that code, I needed a
> function that waited for some times(125msecs),so I used a usleep
> function. But when i executed the kernel leve program, "unresolved
> symbol" message appeared. After that, I included <sys/time.h> in that
> code but, too many error messages embrassed me.
> Now, I'm thinking that usleep function was not right in the kernel
> code.Am i right?
Yep. You can't use libc functions within the kernel.
> How can I solve the problem? and I want a usleep source code.
You can't write kernel code which calls blocking functions. You would
need to split the code into `before' and `after' sections. Instead of
calling a usleep()-like function, you would arrange for the `after'
section to be executed 125ms later, and then return.
I'm not familiar with any of the specifics, so I can't provide more
details. Look at `The Kernel Hacker's Guide' and/or `The Linux Kernel'
(both available from the LDP site) for ideas.
--
Glynn Clements <[EMAIL PROTECTED]>