Solved

CreateEvent SetEvent in LINUX

Posted on 2003-12-08
3
7,804 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
[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
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

Technology Partners: 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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
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…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

630 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