Re: Proper use of daemonize()?

From: Lee Revell
Date: Wed Oct 06 2004 - 10:57:15 EST


On Wed, 2004-10-06 at 11:18, Stuart MacDonald wrote:
> I've been looking at the kernel threads that use daemonize() and have
> some questions about the proper use of this call:
>
> 1: Some threads use the lock_kernel() calls around the daemonize()
> call. Is this necessary?

It's only necessary if you can't be bothered to do proper locking.
Probably that code is old and someone did not have time to implement
correct locking to make it work on SMP so just threw lock/unlock kernel
around it.

> I thought the BKL was phasing out.
>

Well, it's not going to phase itself out ;-) But, patches that
introduce new uses of the BKL will almost certainly go to /dev/null.

Lee

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/