?
Solved

Kernel threads inter communication - various methods???

Posted on 2005-02-25
2
Medium Priority
?
583 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

752 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