Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Kernel threads inter communication - various methods???

Posted on 2005-02-25
2
Medium Priority
?
584 Views
Last Modified: 2008-02-26
I am working with RHL 9.0 and kernel version 2.4.20-8.
I have a kernel module which has four threads (created by kernel_thread () ) internally.

After doing a certain amount of work each thread is sleeping for some time by
calling interruptible_sleep_on_timeout().

Can a kernel thread wait on a event generated by another thread (rather than sleeping by calling interruptible_sleep_on_timeout())?

I google d for kernel thread synchronization and possible applications I got for kernel version
2.4.20-8 are mutex semaphores and global variables. I am sckeptical about using switch_to().

Are there any counting semaphores implemented in linux kernel so that a kernal thread will be
waiting on it, and another kernel thread kicks it from somewhere else? Is there any similar
communication mechanism implemented in linux kernel?
0
Comment
Question by:vidya_sankar
2 Comments
 
LVL 8

Accepted Solution

by:
manish_regmi earned 1500 total points
ID: 13412891
yes,
 you can use counting semaphores....
use
up()
and
down() functions. they are in asm/semaphore.h

regards
Manish
0
 

Author Comment

by:vidya_sankar
ID: 13494766
Thanks for the tip. It worked.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question