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

Re: how fork returns value



On 07-10-08 06:02, Peter Teoh wrote:

2. lsmod will list all the modules loaded. I printk() the "current", and each running module have its own task struct ptr
value. But ps cannot see any of them. But I supposed they should be
on the schedulable list of task-struct right? Or may be not?

Definitely not. Modules in Linux are not threads, either kernel- or fullblown. They are not scheduled but just sit around your RAM waiting to be called into exactly like other kernel code. They _are_ exactly like other kernel code once loaded.


When you print current from a module you're printing the task_struct of whatever process is running inside that kernel code (at init time, the insmod process).

Rene.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ