From: linux-os <linux-os@chaos.analogic.com>
To: Zhenyu Wu <y030729@njupt.edu.cn>
Cc: quade@hsnr.de, linux-kernel@vger.kernel.org
Subject: Re: about kernel_thread!
Date: Mon, 13 Dec 2004 08:25:52 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.61.0412130823410.4142@chaos.analogic.com> (raw)
In-Reply-To: <302945938.22534@njupt.edu.cn>
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(¤t->sigmask_lock); \
sigemptyset(¤t->blocked); \
recalc_sigpending(current); \
spin_unlock_irq(¤t->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.
next prev parent reply other threads:[~2004-12-13 13:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-13 13:52 about kernel_thread! Zhenyu Wu
2004-12-13 13:25 ` linux-os [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-12-13 13:36 Zhenyu Wu
2004-12-13 13:12 Zhenyu Wu
2004-12-13 12:31 ` linux-os
2004-12-13 12:44 ` Juergen Quade
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.61.0412130823410.4142@chaos.analogic.com \
--to=linux-os@chaos.analogic.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-os@analogic.com \
--cc=quade@hsnr.de \
--cc=y030729@njupt.edu.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).