LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 02-06-2005, 05:09 PM   #1
Chris_tt
LQ Newbie
 
Registered: Mar 2004
Location: Finland
Posts: 5

Rep: Reputation: 0
Question analog WaitForSingleObject for Unix or any interuptible timer


I am porting one small program on C from Windows to Linux and have got a problem. I have sort of "interruptible timer" - I implemented it using WaitForSingleObject with Event and timeout. I am waiting for some Event which can interrupt this waiting. I need to have the same on Linux platform where I am unfortunately a newbie. So my question is: if exist any way to do it - let my know if somebody know what can be used for implementation of this conception on *nix platform?
 
Old 02-07-2005, 10:21 AM   #2
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 36
unix uses signals (Windows uses messages, which you call events).

Create a signal handler that will repsond to SIGALRM or SIGVTALRM.

Download the free book - Advanced Linux Programming

http://www.advancedlinuxprogramming.com/alp-folder
 
Old 02-07-2005, 02:35 PM   #3
Chris_tt
LQ Newbie
 
Registered: Mar 2004
Location: Finland
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you very much for advice and link, I'll try to use it
 
  


Reply



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
Windows WaitForSingleObject() command DavidW567 Programming 2 11-23-2004 12:21 AM
Why did you experienced users of Unix change to unix over Windows? Laptop2250 Linux - General 11 10-28-2003 11:51 AM
Analog ePSXe? GT_Onizuka Linux - Games 6 10-24-2003 07:38 PM
analog recording luap Linux - Software 2 03-10-2003 12:25 PM
How to schedule unix script periodically from unix os level??? gopi_20us Programming 2 03-11-2002 06:45 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:33 PM.

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