Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


Search this Thread
Old 02-16-2004, 07:16 AM   #1
Registered: Feb 2004
Location: Bangalore
Distribution: Redhat
Posts: 144

Rep: Reputation: 15
Linux kernel module programming(Signal and semaphore)

I have a doubt regarding signals and semaphores.
When a process is executing in kernel mode it takes a semaphore1 and waiting for another semaphore2. It enters into pended state. At that instant another process sends a signal to it and terminates the process1.

What about the semaphore 1?
Is it reclaimed automatically? or Is it possible to terminate a process waiting for a kernel resource in kernel mode?
Please reply me.
Old 02-16-2004, 01:10 PM   #2
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
remember that when u take a semaphore, you use one of these:

the difference being that the 2nd can be interrupted by a signal. it returns 1 if interrupted, 0 otherwise. hence you always do this:
//then we were interrupted by a signal, so let go of the first semaphore

it is completely up to you to deal with all this.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Kernel Module Programming astronaut3000 Linux - Software 1 09-23-2005 03:02 AM
Linux kernel debugging and Linux kernel module programming Igor007 Programming 2 08-13-2005 06:12 AM
Linux kernel debugging and Linux kernel module programming Igor007 Linux - Enterprise 3 08-12-2005 03:47 PM
trying to send signal from linux module andreiij Programming 1 05-02-2005 01:46 PM
Signal processing programming in Linux naveenhifi Linux - Software 3 12-20-2003 05:31 AM

All times are GMT -5. The time now is 10:01 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration