Solved

CreateEvent SetEvent in LINUX

Posted on 2003-12-08
3
7,451 Views
Last Modified: 2007-12-19
Hi,

I have a code developped under WIN32 that I need to port under LINUX.

I have find way to translate thread and mutexes, and now come the problem of events.

The WIN32 library use CreateEvent and SetEvent and I want to translate these functions under LINUX.

I'd like to create a CEvent class with a Wait and Signal function to emulate the process of CreateEvent, SetEvent and WaitForSingleObject function.

I have seen the functions linked to the conditionnal variables but I'd like to have a full example that explains how to implement conditionnal variables.

Thanks a lot!
0
Comment
Question by:FMayis
3 Comments
 
LVL 86

Expert Comment

by:jkr
Comment Utility
>>I have find way to translate thread and mutexes

Use the 'pthreads' library, it has all you need and can get - see http://www.llnl.gov/computing/tutorials/workshops/workshop/pthreads/MAIN.html ("posix threads programming")  for a comprehensive tutorial
0
 
LVL 4

Accepted Solution

by:
YuriPutivsky earned 125 total points
Comment Utility
Take a look at open source, which supports Linux
http://www.terimber.com/text/opensrc/thread.html
0
 

Author Comment

by:FMayis
Comment Utility
Thanks both,

The open source provides by YuriPutivsky is exactly what I was looking for.

0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now