* Preventing signal interrupt in Kernel module code
@ 2002-09-13 13:54 ` Kevin Curtis
0 siblings, 0 replies; 15+ messages in thread
From: Kevin Curtis @ 2002-09-13 13:54 UTC (permalink / raw)
To: linux-newbie, linux-kernel
Hi,
I have written a Kernel module and I'm having a small problem with
signals that I hope someone can steer me through. The signal in question
are SIGCHILD, but that is not really relevant. I must be able to handle any
signal that the process has enabled.
My module has several wait queues, most of which I can cope with
being interrupted by a signal (returning EINTR to the process). However,
there are some hardware operations that I need to wait for completion of, as
it would be impossible to restart them or pick up where we left off. I
still want to use a wait queue so other things can run. Is there some
system call I can make to mask signals until the operation has completed.
Would I still call signal_pending() to see if one had occurred while they
were blocked?
I'm sure the answer is really simple but I haven't stumbled across it yet.
TIA
Kevin
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 15+ messages in thread
* Preventing signal interrupt in Kernel module code
@ 2002-09-13 13:54 ` Kevin Curtis
0 siblings, 0 replies; 15+ messages in thread
From: Kevin Curtis @ 2002-09-13 13:54 UTC (permalink / raw)
To: linux-newbie, linux-kernel
Hi,
I have written a Kernel module and I'm having a small problem with
signals that I hope someone can steer me through. The signal in question
are SIGCHILD, but that is not really relevant. I must be able to handle any
signal that the process has enabled.
My module has several wait queues, most of which I can cope with
being interrupted by a signal (returning EINTR to the process). However,
there are some hardware operations that I need to wait for completion of, as
it would be impossible to restart them or pick up where we left off. I
still want to use a wait queue so other things can run. Is there some
system call I can make to mask signals until the operation has completed.
Would I still call signal_pending() to see if one had occurred while they
were blocked?
I'm sure the answer is really simple but I haven't stumbled across it yet.
TIA
Kevin
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Preventing signal interrupt in Kernel module code
2002-09-13 13:54 ` Kevin Curtis
(?)
@ 2002-09-13 15:56 ` Quinn Harris
-1 siblings, 0 replies; 15+ messages in thread
From: Quinn Harris @ 2002-09-13 15:56 UTC (permalink / raw)
To: linux-newbie
Would placing the process waiting for the hardware in an
TASK_UNINTERRUPTIBLE state do what you want? As far as I understand
it, the TASK_UNINTERRUPTIBLE state is used to prevent anything from
waking up a process when it is waiting for something it can't be
interrupted by a signal from. If you call wait_event(wq, condition);
(actually a define in sched.h) the process will be placed in a
TASK_UNINTERRUPTIBLE state until the wait queue is woken up and the
condition is met. wait_event_interruptible(wq, condition) would allow a
process to be interrupted by a signal. You might be doing essentially
what wait_event does without using it. I have seen a bit of kernel code
(I think usually older code) that doesn't used wait_event when it could
to place the current process on a wait queue.
On Fri, 2002-09-13 at 07:54, Kevin Curtis wrote:
> Hi,
> I have written a Kernel module and I'm having a small problem with
> signals that I hope someone can steer me through. The signal in question
> are SIGCHILD, but that is not really relevant. I must be able to handle any
> signal that the process has enabled.
>
> My module has several wait queues, most of which I can cope with
> being interrupted by a signal (returning EINTR to the process). However,
> there are some hardware operations that I need to wait for completion of, as
> it would be impossible to restart them or pick up where we left off. I
> still want to use a wait queue so other things can run. Is there some
> system call I can make to mask signals until the operation has completed.
> Would I still call signal_pending() to see if one had occurred while they
> were blocked?
>
> I'm sure the answer is really simple but I haven't stumbled across it yet.
>
> TIA
>
> Kevin
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
>
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Preventing signal interrupt in Kernel module code
2002-09-13 13:54 ` Kevin Curtis
(?)
(?)
@ 2002-09-13 18:33 ` Bill Pleasants
2002-09-13 15:39 ` Ken Boyer
` (2 more replies)
-1 siblings, 3 replies; 15+ messages in thread
From: Bill Pleasants @ 2002-09-13 18:33 UTC (permalink / raw)
To: linux-newbie
Hello,
I was told this list was for beginners. From what I have read in the
past week, I think I am out of place. I just want help getting a
Mandrake installation to work.
Yours truly,
Bill
linux-newbie@vger.kernel.org, linux-kernel@vger.kernel.org
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 15+ messages in thread* RE: Preventing signal interrupt in Kernel module code
2002-09-13 18:33 ` Bill Pleasants
@ 2002-09-13 15:39 ` Ken Boyer
2002-09-13 15:53 ` Ray Olszewski
2002-09-13 20:06 ` Preventing signal interrupt in Kernel module code Bryan Whitehead
2 siblings, 0 replies; 15+ messages in thread
From: Ken Boyer @ 2002-09-13 15:39 UTC (permalink / raw)
To: linux-newbie
And I thought it was just me...
Are there any other Linux lists that are more of a beginner level?
Ken
-----Original Message-----
From: linux-newbie-owner@vger.kernel.org
[mailto:linux-newbie-owner@vger.kernel.org] On Behalf Of Bill Pleasants
Sent: Friday, September 13, 2002 2:34 PM
To: linux-newbie@vger.kernel.org
Subject: Re: Preventing signal interrupt in Kernel module code
Hello,
I was told this list was for beginners. From what I have read in the
past week, I think I am out of place. I just want help getting a
Mandrake installation to work. Yours truly, Bill
linux-newbie@vger.kernel.org, linux-kernel@vger.kernel.org
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie"
in the body of a message to majordomo@vger.kernel.org More majordomo
info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: Preventing signal interrupt in Kernel module code
2002-09-13 18:33 ` Bill Pleasants
2002-09-13 15:39 ` Ken Boyer
@ 2002-09-13 15:53 ` Ray Olszewski
2002-09-13 16:00 ` Ken Boyer
2002-09-13 21:33 ` starts error Bill Pleasants
2002-09-13 20:06 ` Preventing signal interrupt in Kernel module code Bryan Whitehead
2 siblings, 2 replies; 15+ messages in thread
From: Ray Olszewski @ 2002-09-13 15:53 UTC (permalink / raw)
To: Bill Pleasants, linux-newbie
At 11:33 AM 9/13/02 -0700, Bill Pleasants wrote:
>Hello,
>I was told this list was for beginners. From what I have read in the
>past week, I think I am out of place. I just want help getting a
>Mandrake installation to work.
>Yours truly,
>Bill
You were told right; this list is for beginners. Some of us who hang out
here are not beginners, though (how else would you get knowledgeable
*answers*, after all?), and one of us may, from time to time, pose a
somewhat more advanced question to his colleagues. Not all that often,
though ... there are better places to get answers to advanced questions
than here.
That said, we don't have any automated filter to keep really complex
questions off the list, and from time to time, someone will post an
extremely technical question here. The one you posted in response to is a
good example; I don't know if the poster will get any help here (he might,
though it is a long shot), but his question really is way above what we
customarily discuss.
That said ... we answer questions here. You don't ask any in your posting.
If you are having trouble, you'll need to tell us what the trouble is.
Asking for help here is not a substitute for things like reading the
documentation and following your distro's installations instructions -- we
generally avoid the bluntness of "RTFM" and "STFW" replies, but we do
retain the underlying expectation that for general questions, you will turn
to FAQs, man pages, and other general documentation. If this is what you
need to do, someone here will usually tell you so ... though a bit more
politely than you might see elsewhere.
As to your questions ... we do assume that someone who wants help will make
the effort to describe what he has done, and the problems he has
encountered, with some specificity. We don't try to write personalized,
soup-to-nuts tutorials.
So with that as background, please do not hesitate to pose beginner-level
questions here.
--
-------------------------------------------"Never tell me the odds!"--------
Ray Olszewski -- Han Solo
Palo Alto, California, USA ray@comarre.com
-------------------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: Preventing signal interrupt in Kernel module code
2002-09-13 15:53 ` Ray Olszewski
@ 2002-09-13 16:00 ` Ken Boyer
2002-09-13 21:33 ` starts error Bill Pleasants
1 sibling, 0 replies; 15+ messages in thread
From: Ken Boyer @ 2002-09-13 16:00 UTC (permalink / raw)
To: linux-newbie
Thank you for the clarification.
Ken
-----Original Message-----
From: linux-newbie-owner@vger.kernel.org
[mailto:linux-newbie-owner@vger.kernel.org] On Behalf Of Ray Olszewski
Sent: Friday, September 13, 2002 11:54 AM
To: Bill Pleasants; linux-newbie@vger.kernel.org
Subject: Re: Preventing signal interrupt in Kernel module code
At 11:33 AM 9/13/02 -0700, Bill Pleasants wrote:
>Hello,
>I was told this list was for beginners. From what I have read in the
>past week, I think I am out of place. I just want help getting a
>Mandrake installation to work. Yours truly,
>Bill
You were told right; this list is for beginners. Some of us who hang out
here are not beginners, though (how else would you get knowledgeable
*answers*, after all?), and one of us may, from time to time, pose a
somewhat more advanced question to his colleagues. Not all that often,
though ... there are better places to get answers to advanced questions
than here.
That said, we don't have any automated filter to keep really complex
questions off the list, and from time to time, someone will post an
extremely technical question here. The one you posted in response to is
a
good example; I don't know if the poster will get any help here (he
might,
though it is a long shot), but his question really is way above what we
customarily discuss.
That said ... we answer questions here. You don't ask any in your
posting.
If you are having trouble, you'll need to tell us what the trouble is.
Asking for help here is not a substitute for things like reading the
documentation and following your distro's installations instructions --
we
generally avoid the bluntness of "RTFM" and "STFW" replies, but we do
retain the underlying expectation that for general questions, you will
turn
to FAQs, man pages, and other general documentation. If this is what you
need to do, someone here will usually tell you so ... though a bit more
politely than you might see elsewhere.
As to your questions ... we do assume that someone who wants help will
make
the effort to describe what he has done, and the problems he has
encountered, with some specificity. We don't try to write personalized,
soup-to-nuts tutorials.
So with that as background, please do not hesitate to pose
beginner-level
questions here.
--
-------------------------------------------"Never tell me the
odds!"--------
Ray Olszewski -- Han Solo
Palo Alto, California, USA ray@comarre.com
------------------------------------------------------------------------
-------
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie"
in the body of a message to majordomo@vger.kernel.org More majordomo
info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 15+ messages in thread
* starts error
2002-09-13 15:53 ` Ray Olszewski
2002-09-13 16:00 ` Ken Boyer
@ 2002-09-13 21:33 ` Bill Pleasants
2002-09-13 19:48 ` Ray Olszewski
2002-09-14 9:20 ` pa3gcu
1 sibling, 2 replies; 15+ messages in thread
From: Bill Pleasants @ 2002-09-13 21:33 UTC (permalink / raw)
To: linux-newbie
Thanks for your kind welcome, Ray. As for my specific question,
I have not used Linux before. I erased Windows and did an automatic
installation of Mandrake 7.2 on a Packard Bell A950-TWR with a P.B.
monitor 1512SL . The X part failed and the computer boots to the
command prompt. I tried the kde, gnome and startx commands without
success. I followed the steps in mandrakeuser.org/docs/xwin/xtroub.html
through running xf86config and manually adding two suggested options.
After entering "startx" I get
"execve failed for /etc/X11/X (error 2)
giving up
xinit: Connection refused (error 111) unable to connect to X server
xinit: No such process (error 3): Server error."
Processor type: Intel pentium Processor speed: 129.6
RAM: 16
HD type: ide HD capacity: 1.22
CD-ROM type: ide (judging by cable)
Graphic processor: Cirrus CL-GD5430/40 Video RAM: 1.024
Sound card: (with modem)
Additional info that may be redundant:
The video processor is on the main board. There
is a chip labeled CIRRUS
LOGIC CL-GD5430-QC-D. This is connected to
a chip labeled VLSI 9531 D43851.
The lspcidrake command gave:
VLSI: 82C594-AFC2 (unknown ignore)
VLSI 82C59617 [WILDCAT] (unknown ignore)
CIRRUS LOGIC | GD 5430/40 [ALPINE]
(DISPLAY_VGA CARD | CIRRUS LOGIC GD543X)
CMD TECHNOLOGY INC. | PCI0640
(STORAGE_IDE unknown)
SuperProbe gave:
SUPER-VGA
CHIPS: CIRRUS CL-GD5430/40 (PCI PROBED)
1,024 KB
RAMDAC: CIRRUS LOGIC BUILT IN
15/16/24-BIT DAC
6 BIT LOOKUP TABLES
I have spent at least 30 hours searching for interpretations of the
error messages. If this is available, I would appreciate knowing
where. I have seen other errors in various logs. Also if there is a
list of utilities on the machine and what they do like "help" on MS DOS,
I would appreciate learning about it.
Yours truly,
Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: starts error
2002-09-13 21:33 ` starts error Bill Pleasants
@ 2002-09-13 19:48 ` Ray Olszewski
2002-09-14 9:20 ` pa3gcu
1 sibling, 0 replies; 15+ messages in thread
From: Ray Olszewski @ 2002-09-13 19:48 UTC (permalink / raw)
To: Bill Pleasants, linux-newbie
OK. I don't use Mandrake, so I can't help with Mandrake-specific bits like
what an "automatic" installation of it does or what a Mandrake-specific doc
says. Possibly someone else here is a Mandrake users with sufficient
experience to help you at that level.
Since your problems are not Linux problems as such, but X problems, you
need to look to the X sites for help. The core one is www.xfree86.org . I
believe there are also X-related Linux HowTos; if they are not on your
system somewhere (different distros handle them differently, and as I say,
I am not familiar with the specifics of Mandrake), try www.linuxdoc.org .
As to your specific error -- execve is the C function (actually, one of
several) called when one program executes another. Here, xinit is trying to
start X (the actual server) and failing. The exact error values are hard
for a beginner to track down -- they are buried in a set of header files,
all called errno.h, in various locations within /usr/include/ -- but error 2 is
#define ENOENT 2 /* No such file or directory */
Without more context, it is hard to know what this error means in your
case. It may simply mean that the application /etc/X11/X (this is the
actual X server) is missing from your system. That's trivially easy to
check; just do "ls /etc/X11/X" to see if it is there. But I do not actually
*know* that the error values that xinit is reporting are the standard errno
numbers. So at this point, I'd look for an error in whatever file
xf86config creates (perhaps /etc/X11/XF86Config-4 -- the exact path varies
by distro, and the filename itself differs between X11 3.x.x and 4.x.x).
I'd particularly inspect those "two suggested options" you added "manually"
for errors.
As to your more general question (about info on commands), the first answer
is to refer you to the FAQ listed at the end of list messages. Depending on
what Mandrake has decided to install, you may have the man (online manual)
system (start with "man man"), the info system ("info"), and/or a set of
HowTos (look around; try in /usr/share/doc). Of these, the man system is
closest to DOS's "help" system in style -- it is both a bit more cumbersome
to read but also more helpful substantively (from my experience, at least
... it's been a long time since I used DOS, though). Also, many commands
will tell you something about themselves if you type the command name
followed by either "-h" or "--help".
I'm sorry this is not a more direct answer, but I hope it give you some
help nonetheless.
At 02:33 PM 9/13/02 -0700, Bill Pleasants wrote:
>Thanks for your kind welcome, Ray. As for my specific question,
>I have not used Linux before. I erased Windows and did an automatic
>installation of Mandrake 7.2 on a Packard Bell A950-TWR with a P.B.
>monitor 1512SL . The X part failed and the computer boots to the
>command prompt. I tried the kde, gnome and startx commands without
>success. I followed the steps in mandrakeuser.org/docs/xwin/xtroub.html
>through running xf86config and manually adding two suggested options.
>
>After entering "startx" I get
> "execve failed for /etc/X11/X (error 2)
> giving up
> xinit: Connection refused (error 111) unable to connect to X server
> xinit: No such process (error 3): Server error."
>
>
> Processor type: Intel pentium Processor speed: 129.6
> RAM: 16
> HD type: ide HD capacity: 1.22
> CD-ROM type: ide (judging by cable)
> Graphic processor: Cirrus CL-GD5430/40 Video RAM: 1.024
> Sound card: (with modem)
>
>Additional info that may be redundant:
> The video processor is on the main board. There
> is a chip labeled CIRRUS
> LOGIC CL-GD5430-QC-D. This is connected to
> a chip labeled VLSI 9531 D43851.
>
> The lspcidrake command gave:
> VLSI: 82C594-AFC2 (unknown ignore)
> VLSI 82C59617 [WILDCAT] (unknown ignore)
> CIRRUS LOGIC | GD 5430/40 [ALPINE]
> (DISPLAY_VGA CARD | CIRRUS LOGIC GD543X)
> CMD TECHNOLOGY INC. | PCI0640
> (STORAGE_IDE unknown)
>
> SuperProbe gave:
> SUPER-VGA
> CHIPS: CIRRUS CL-GD5430/40 (PCI PROBED)
> 1,024 KB
> RAMDAC: CIRRUS LOGIC BUILT IN
> 15/16/24-BIT DAC
> 6 BIT LOOKUP TABLES
>
>I have spent at least 30 hours searching for interpretations of the
>error messages. If this is available, I would appreciate knowing
>where. I have seen other errors in various logs. Also if there is a
>list of utilities on the machine and what they do like "help" on MS DOS,
>I would appreciate learning about it.
--
-------------------------------------------"Never tell me the odds!"--------
Ray Olszewski -- Han Solo
Palo Alto, California, USA ray@comarre.com
-------------------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: starts error
2002-09-13 21:33 ` starts error Bill Pleasants
2002-09-13 19:48 ` Ray Olszewski
@ 2002-09-14 9:20 ` pa3gcu
1 sibling, 0 replies; 15+ messages in thread
From: pa3gcu @ 2002-09-14 9:20 UTC (permalink / raw)
To: Bill Pleasants, linux-newbie
On Friday 13 September 2002 21:33, Bill Pleasants wrote:
> Thanks for your kind welcome, Ray. As for my specific question,
> I have not used Linux before. I erased Windows and did an automatic
> installation of Mandrake 7.2 on a Packard Bell A950-TWR with a P.B.
> monitor 1512SL . The X part failed and the computer boots to the
> command prompt. I tried the kde, gnome and startx commands without
> success. I followed the steps in mandrakeuser.org/docs/xwin/xtroub.html
> through running xf86config and manually adding two suggested options.
I wonder if you saw anymessage as to why it failed when the X part failed as
you call it.?
>
> After entering "startx" I get
> "execve failed for /etc/X11/X (error 2)
As Ray pointed out error 2 = no such file or directory, the above path is not
correct, mandrake has "X" (which is a symlink to Xwrapper) located in
/usr/X11R6/bin/
So your installed scripts whichever one it is has a wrong path in it.
Now considering you say it all went wrong at install time here is what i
would do;
Make sure X(programs) are installed, check out /usr/X11R6/bin it should have
something like the following;
lrwxrwxrwx 1 root root 8 Nov 17 2001 X -> Xwrapper*
-r-xr-xr-x 1 root root 1838528 Nov 17 2001 XF86_VMware*
-rwxr-xr-x 1 root root 1659708 Sep 22 2001 XFree86*
lrwxrwxrwx 1 root root 15 Nov 17 2001 Xconfigurator ->
../sbin/XFdrake
lrwxrwxrwx 1 root root 19 Nov 17 2001 Xdrakres ->
../..//sbin/XFdrake*
-rwxr-xr-x 1 root root 27494 Sep 22 2001 Xmark*
-rwxr-xr-x 1 root root 3091676 Sep 22 2001 Xprt*
-rws--x--x 1 root root 6052 Sep 22 2001 Xwrapper*
Unfortunatly some lines are wrapped above so look carefully.
Now run Xconfigurator (if installed) and see what happens.
> giving up
> xinit: Connection refused (error 111) unable to connect to X server
> xinit: No such process (error 3): Server error."
>
>
> Processor type: Intel pentium Processor speed: 129.6
> RAM: 16
> HD type: ide HD capacity: 1.22
> CD-ROM type: ide (judging by cable)
> Graphic processor: Cirrus CL-GD5430/40 Video RAM: 1.024
> Sound card: (with modem)
>
> Additional info that may be redundant:
> The video processor is on the main board. There
> is a chip labeled CIRRUS
> LOGIC CL-GD5430-QC-D. This is connected to
> a chip labeled VLSI 9531 D43851.
>
> The lspcidrake command gave:
> VLSI: 82C594-AFC2 (unknown ignore)
> VLSI 82C59617 [WILDCAT] (unknown ignore)
> CIRRUS LOGIC | GD 5430/40 [ALPINE]
> (DISPLAY_VGA CARD | CIRRUS LOGIC GD543X)
> CMD TECHNOLOGY INC. | PCI0640
> (STORAGE_IDE unknown)
>
> SuperProbe gave:
> SUPER-VGA
> CHIPS: CIRRUS CL-GD5430/40 (PCI PROBED)
> 1,024 KB
> RAMDAC: CIRRUS LOGIC BUILT IN
> 15/16/24-BIT DAC
> 6 BIT LOOKUP TABLES
>
> I have spent at least 30 hours searching for interpretations of the
> error messages. If this is available, I would appreciate knowing
> where. I have seen other errors in various logs. Also if there is a
> list of utilities on the machine and what they do like "help" on MS DOS,
> I would appreciate learning about it.
error numbers are defined in /usr/include/asm/errno.h
Ray explained the rest.
O yes your VGA card uses the cirrus driver but at the minute your problems
start at an earlier stage, you are not getting as far as having X read its
config file.
>
> Yours truly,
> Bill
--
Regards Richard
pa3gcu@zeelandnet.nl
http://people.zeelandnet.nl/pa3gcu/
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Preventing signal interrupt in Kernel module code
2002-09-13 18:33 ` Bill Pleasants
2002-09-13 15:39 ` Ken Boyer
2002-09-13 15:53 ` Ray Olszewski
@ 2002-09-13 20:06 ` Bryan Whitehead
2 siblings, 0 replies; 15+ messages in thread
From: Bryan Whitehead @ 2002-09-13 20:06 UTC (permalink / raw)
To: Bill Pleasants; +Cc: linux-newbie
Bill Pleasants wrote:
> Hello,
> I was told this list was for beginners. From what I have read in the
> past week, I think I am out of place. I just want help getting a
> Mandrake installation to work.
> Yours truly,
> Bill
>
> linux-newbie@vger.kernel.org, linux-kernel@vger.kernel.org
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
Mandrake has a "newbie" list you might want to check out.
http://www.mandrakelinux.com/en/flists.php3
--
Bryan Whitehead
SysAdmin - JPL - Interferometry Systems and Technology
Phone: 818 354 2903
driver@jpl.nasa.gov
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: Preventing signal interrupt in Kernel module code
@ 2002-09-13 15:49 Kevin Curtis
2002-09-13 17:22 ` Quinn Harris
0 siblings, 1 reply; 15+ messages in thread
From: Kevin Curtis @ 2002-09-13 15:49 UTC (permalink / raw)
To: 'Quinn Harris', linux-newbie
Thanks for the answer. It was in the Linux Device Driver book too. Should
have looked there first (this is available online at
http://www.xml.com/ldd/chapter/book/, very useful.
Just one more thing. It would be nice to do something slightly different if
the signal was SIGTERM. Is there anyway or seeing what signal caused the
interrupt?
Thanks again.
Kevin
-----Original Message-----
From: Quinn Harris [mailto:quinn@nmt.edu]
Sent: 13 September 2002 16:57
To: linux-newbie@vger.kernel.org
Subject: Re: Preventing signal interrupt in Kernel module code
Would placing the process waiting for the hardware in an
TASK_UNINTERRUPTIBLE state do what you want? As far as I understand
it, the TASK_UNINTERRUPTIBLE state is used to prevent anything from
waking up a process when it is waiting for something it can't be
interrupted by a signal from. If you call wait_event(wq, condition);
(actually a define in sched.h) the process will be placed in a
TASK_UNINTERRUPTIBLE state until the wait queue is woken up and the
condition is met. wait_event_interruptible(wq, condition) would allow a
process to be interrupted by a signal. You might be doing essentially
what wait_event does without using it. I have seen a bit of kernel code
(I think usually older code) that doesn't used wait_event when it could
to place the current process on a wait queue.
On Fri, 2002-09-13 at 07:54, Kevin Curtis wrote:
> Hi,
> I have written a Kernel module and I'm having a small problem with
> signals that I hope someone can steer me through. The signal in question
> are SIGCHILD, but that is not really relevant. I must be able to handle
any
> signal that the process has enabled.
>
> My module has several wait queues, most of which I can cope with
> being interrupted by a signal (returning EINTR to the process). However,
> there are some hardware operations that I need to wait for completion of,
as
> it would be impossible to restart them or pick up where we left off. I
> still want to use a wait queue so other things can run. Is there some
> system call I can make to mask signals until the operation has completed.
> Would I still call signal_pending() to see if one had occurred while they
> were blocked?
>
> I'm sure the answer is really simple but I haven't stumbled across it yet.
>
> TIA
>
> Kevin
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
>
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: Preventing signal interrupt in Kernel module code
2002-09-13 15:49 Kevin Curtis
@ 2002-09-13 17:22 ` Quinn Harris
0 siblings, 0 replies; 15+ messages in thread
From: Quinn Harris @ 2002-09-13 17:22 UTC (permalink / raw)
To: linux-newbie
It probably wouldn't be feasible to get a process to ignore every signal
except SIGTERM when its waiting on a queue. But I am not sure, I would
need to look into it to get a good answer.
If you plan to do a bit of kernel development I would recommend spending
some time reading the kernel code. This is an open source kernel and
accordingly, the answers to all these types of questions can be found in
the code. The Linux Device Driver book is a good starting place (also
look at Understanding the Linux Kernel) but there is no substitute for
reading the code. http://lxr.linux.no/ is a great tool for reading the
kernel.
I will say, it can be very daunting to make sense of the linux kernel
code at first. Expect to spend many hours before you gain any real
understanding of how the pieces fit together. Don't try to pick some
part of the kernel and read it line by line trying to understand it.
This probably won't help much. You might pick some general part of the
kernel to study that can stand somewhat alone like the virtual file
system or schedular. Try to learn what the data structures represent
and what the various functions do. Don't get caught up in exactly how
functions do what they do at first.
I feel that learning about the linux kernel improved my skills both with
the kernel and as a programmer. It is good to see how other people
solve problems and generally the kernel has reasonably good solutions to
programming problems.
On Fri, 2002-09-13 at 09:49, Kevin Curtis wrote:
> Thanks for the answer. It was in the Linux Device Driver book too. Should
> have looked there first (this is available online at
> http://www.xml.com/ldd/chapter/book/, very useful.
>
> Just one more thing. It would be nice to do something slightly different if
> the signal was SIGTERM. Is there anyway or seeing what signal caused the
> interrupt?
>
>
> Thanks again.
>
> Kevin
>
> -----Original Message-----
> From: Quinn Harris [mailto:quinn@nmt.edu]
> Sent: 13 September 2002 16:57
> To: linux-newbie@vger.kernel.org
> Subject: Re: Preventing signal interrupt in Kernel module code
>
>
> Would placing the process waiting for the hardware in an
> TASK_UNINTERRUPTIBLE state do what you want? As far as I understand
> it, the TASK_UNINTERRUPTIBLE state is used to prevent anything from
> waking up a process when it is waiting for something it can't be
> interrupted by a signal from. If you call wait_event(wq, condition);
> (actually a define in sched.h) the process will be placed in a
> TASK_UNINTERRUPTIBLE state until the wait queue is woken up and the
> condition is met. wait_event_interruptible(wq, condition) would allow a
> process to be interrupted by a signal. You might be doing essentially
> what wait_event does without using it. I have seen a bit of kernel code
> (I think usually older code) that doesn't used wait_event when it could
> to place the current process on a wait queue.
>
>
> On Fri, 2002-09-13 at 07:54, Kevin Curtis wrote:
> > Hi,
> > I have written a Kernel module and I'm having a small problem with
> > signals that I hope someone can steer me through. The signal in question
> > are SIGCHILD, but that is not really relevant. I must be able to handle
> any
> > signal that the process has enabled.
> >
> > My module has several wait queues, most of which I can cope with
> > being interrupted by a signal (returning EINTR to the process). However,
> > there are some hardware operations that I need to wait for completion of,
> as
> > it would be impossible to restart them or pick up where we left off. I
> > still want to use a wait queue so other things can run. Is there some
> > system call I can make to mask signals until the operation has completed.
> > Would I still call signal_pending() to see if one had occurred while they
> > were blocked?
> >
> > I'm sure the answer is really simple but I haven't stumbled across it yet.
> >
> > TIA
> >
> > Kevin
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.linux-learn.org/faqs
> >
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
>
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: Preventing signal interrupt in Kernel module code
@ 2002-09-13 16:02 Kevin Curtis
0 siblings, 0 replies; 15+ messages in thread
From: Kevin Curtis @ 2002-09-13 16:02 UTC (permalink / raw)
To: 'Ken Boyer', linux-newbie
Ok - I will refrain from posting technical questions here. I did also post
it to the linux-kernel mail list too. It's just that sometimes, a question
like mine is too trivial for them and gets ignored. However, Ray is right,
don't let postings like mine put you off sending in your questions too.
By the way, even though I'm writing Kernel modules, I still have problems
with my Mandrake distro too. The latest being that sound has stopped
working when I installed my network card.
Kevin
-----Original Message-----
From: Ken Boyer [mailto:kboyer@logicalimages.com]
Sent: 13 September 2002 17:00
To: linux-newbie@vger.kernel.org
Subject: RE: Preventing signal interrupt in Kernel module code
Thank you for the clarification.
Ken
-----Original Message-----
From: linux-newbie-owner@vger.kernel.org
[mailto:linux-newbie-owner@vger.kernel.org] On Behalf Of Ray Olszewski
Sent: Friday, September 13, 2002 11:54 AM
To: Bill Pleasants; linux-newbie@vger.kernel.org
Subject: Re: Preventing signal interrupt in Kernel module code
At 11:33 AM 9/13/02 -0700, Bill Pleasants wrote:
>Hello,
>I was told this list was for beginners. From what I have read in the
>past week, I think I am out of place. I just want help getting a
>Mandrake installation to work. Yours truly,
>Bill
You were told right; this list is for beginners. Some of us who hang out
here are not beginners, though (how else would you get knowledgeable
*answers*, after all?), and one of us may, from time to time, pose a
somewhat more advanced question to his colleagues. Not all that often,
though ... there are better places to get answers to advanced questions
than here.
That said, we don't have any automated filter to keep really complex
questions off the list, and from time to time, someone will post an
extremely technical question here. The one you posted in response to is
a
good example; I don't know if the poster will get any help here (he
might,
though it is a long shot), but his question really is way above what we
customarily discuss.
That said ... we answer questions here. You don't ask any in your
posting.
If you are having trouble, you'll need to tell us what the trouble is.
Asking for help here is not a substitute for things like reading the
documentation and following your distro's installations instructions --
we
generally avoid the bluntness of "RTFM" and "STFW" replies, but we do
retain the underlying expectation that for general questions, you will
turn
to FAQs, man pages, and other general documentation. If this is what you
need to do, someone here will usually tell you so ... though a bit more
politely than you might see elsewhere.
As to your questions ... we do assume that someone who wants help will
make
the effort to describe what he has done, and the problems he has
encountered, with some specificity. We don't try to write personalized,
soup-to-nuts tutorials.
So with that as background, please do not hesitate to pose
beginner-level
questions here.
--
-------------------------------------------"Never tell me the
odds!"--------
Ray Olszewski -- Han Solo
Palo Alto, California, USA ray@comarre.com
------------------------------------------------------------------------
-------
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie"
in the body of a message to majordomo@vger.kernel.org More majordomo
info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <7C078C66B7752B438B88E11E5E20E72E0EF515@GENERAL.farsite.co. uk>]
* RE: Preventing signal interrupt in Kernel module code
[not found] <7C078C66B7752B438B88E11E5E20E72E0EF515@GENERAL.farsite.co. uk>
@ 2002-09-13 16:40 ` Ray Olszewski
0 siblings, 0 replies; 15+ messages in thread
From: Ray Olszewski @ 2002-09-13 16:40 UTC (permalink / raw)
To: Kevin Curtis, linux-newbie
At 05:02 PM 9/13/02 +0100, Kevin Curtis wrote:
>Ok - I will refrain from posting technical questions here. I did also post
>it to the linux-kernel mail list too. It's just that sometimes, a question
>like mine is too trivial for them and gets ignored. However, Ray is right,
>don't let postings like mine put you off sending in your questions too.
>
>By the way, even though I'm writing Kernel modules, I still have problems
>with my Mandrake distro too. The latest being that sound has stopped
>working when I installed my network card.
Oh dear. I didn't mean to chastise you for your earlier posting. Especially
since someone else did offer a suggestion about your problem. All I meant
was what I actually said ... that your question was outside the range we
typically deal with here. Please understand that I am no one special, just
another member of the list. I wasn't trying to give people orders, just
convey a sense of the list as it has operated historically.
As to your implied question ... when I experience similar problems, I
usually find that they are pci bus problems, not Linux problems as such.
(I've had both TV-tuner cards and NICs interfere with video cards, for
example.) Observe during the early (pre-LILO or -GRUB or whatever you use)
stages of the boot process to see if your BIOS still sees both the sound
and NIC devices. If it doesn't, fiddle around ... try changing the slots of
one of the other device (or just the NIC, if your mobo has on-board sound).
On the Linux end, see if the sound hardware still shows up in the
"lspci" listing. Check /proc/interrupts and /proc/ioports for a conflict
(yes, I know Linux is supposed to share interrupts, but the reality is that
it works imperfectly at best).
That's about all I can suggest without some details -- what sound card
(what module), what NIC, and what "stopped working" means (what are you no
longer able to do that you used to be able to do?).
--
-------------------------------------------"Never tell me the odds!"--------
Ray Olszewski -- Han Solo
Palo Alto, California, USA ray@comarre.com
-------------------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2002-09-14 9:20 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-13 13:54 Preventing signal interrupt in Kernel module code Kevin Curtis
2002-09-13 13:54 ` Kevin Curtis
2002-09-13 15:56 ` Quinn Harris
2002-09-13 18:33 ` Bill Pleasants
2002-09-13 15:39 ` Ken Boyer
2002-09-13 15:53 ` Ray Olszewski
2002-09-13 16:00 ` Ken Boyer
2002-09-13 21:33 ` starts error Bill Pleasants
2002-09-13 19:48 ` Ray Olszewski
2002-09-14 9:20 ` pa3gcu
2002-09-13 20:06 ` Preventing signal interrupt in Kernel module code Bryan Whitehead
-- strict thread matches above, loose matches on Subject: below --
2002-09-13 15:49 Kevin Curtis
2002-09-13 17:22 ` Quinn Harris
2002-09-13 16:02 Kevin Curtis
[not found] <7C078C66B7752B438B88E11E5E20E72E0EF515@GENERAL.farsite.co. uk>
2002-09-13 16:40 ` Ray Olszewski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.