Re: how to interrupt waiting for a semaphore after a timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So, what do I have to call from my timer function in order that the waiting process becomes signaled? I have tried wake_up_process() but it didn't work.
Tomaz



From: Jan Hudec <bulb@ucw.cz>
To: Tomaz Beltram <tomazb@hotmail.com>
CC: ruxyz@yahoo.com, kernelnewbies@nl.linux.org
Subject: Re: how to interrupt waiting for a semaphore after a timeout
Date: Thu, 2 Oct 2003 10:12:08 +0200

On Mon, Sep 29, 2003 at 12:02:40 +0000, Tomaz Beltram wrote:
> I was looking for a more lightweight solution. I need timed semaphore down
> from within a kernel module. The idea was to substitute down() with
> down_interruptible() and check for the return value. I would then wake_up
> the waiting process from another thread after some time. Dynamic timers
> seem just perfect for this job. Obviously, I am not doing it the right way,
> as the process remains locked.


down_interruptible means it's interruptible with SIGNAL, so it returns
only if signal_pending().

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux