Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

CreateEvent SetEvent in LINUX

Posted on 2003-12-08
3
Medium Priority
?
8,009 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 500 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

885 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