Solved

CreateEvent SetEvent in LINUX

Posted on 2003-12-08
3
7,500 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
ID: 9897748
>>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
ID: 9898505
Take a look at open source, which supports Linux
http://www.terimber.com/text/opensrc/thread.html
0
 

Author Comment

by:FMayis
ID: 9902360
Thanks both,

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

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

920 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

15 Experts available now in Live!

Get 1:1 Help Now