Re: about kernel_thread!

From: linux-os
Date: Mon Dec 13 2004 - 08:28:55 EST


On Mon, 13 Dec 2004, Zhenyu Wu wrote:

Oh, my god. I find another problem, my linux kernel is 2.4.20, and i can't find
the function allow_signal at all. BTW, whether there is such funcion in kernel
2.4.20?

Thanks,
Zhenyu Wu


Normally we do our own work... However, if you understand macros,
these might help you.


//
// Copyright(c) 2004 Analogic Corporation
//
//
// This program may be distributed under the GNU Public License
// version 2, as published by the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330 Boston, MA, 02111.
//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

#ifndef _CONFIG_H_
#define _CONFIG_H_
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//
// Below are macros to handle different kernel versions.
//
#ifndef IRQ_HANDLED
#define IRQ_HANDLED typedef void irqreturn_t;
#endif

#ifdef KVER6
#define REMAP(a,b,c,d,e) remap_page_range((a), (b), (c), (d), (e))
#define __io_virt(p) ((void *)(p))
#define DAEMONIZE \
daemonize("%s", devname); \
allow_signal(SIGTERM)
#define PCI_FIND_DEVICE(a,b,c) pci_get_device((a),(b),(c))
#else
#define lock_kernel()
#define unlock_kernel()
#define REMAP(a,b,c,d,e) remap_page_range((b), (c), (d), (e))
#define DAEMONIZE \
exit_files(current); \
daemonize(); \
spin_lock_irq(&current->sigmask_lock); \
sigemptyset(&current->blocked); \
recalc_sigpending(current); \
spin_unlock_irq(&current->sigmask_lock)
#define PCI_FIND_DEVICE(a,b,c) pci_find_device((a),(b),(c))
#endif
#endif


Cheers,
Dick Johnson
Penguin : Linux version 2.6.9 on an i686 machine (5537.79 BogoMips).
Notice : All mail here is now cached for review by John Ashcroft.
98.36% of all statistics are fiction.
-
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/