Solved

Simulating Events using Signals..

Posted on 1998-11-12
5
323 Views
Last Modified: 2010-04-21
If anubody has sample code or algorithms of how to implement
Win32 events using Unix Signals.
In Win32 signal is an object which can be created by my program and i can query its value to get acknowledged about some conditions.The signals can be set about these condiotions by other processes to which i will pass the handle of event.So only thing is that it is not asynchronous as signals which directly send to process & hadlers have to be written.
Please get a little idea about Win32 events if you are already familiar.

Thanks in advance.
0
Comment
Question by:flower020397
5 Comments
 
LVL 4

Expert Comment

by:davidmwilliams
ID: 2007802
 Why not use the USR type signals in Unix?  Or even a block of shared memory?
0
 
LVL 1

Accepted Solution

by:
ksb earned 250 total points
ID: 2007803
Under UNIX you are talking about IPC objects (shared memory, semaphores, and the like).

The ipcs command shows the existing object.  Processes can map them in to their address space to manupulate them.  You can wait for a p/v operation on semaphore.

The "acknowledged" part is a p/v set, the conditions are set in  shared memory in a C structure.  You define the structure, map in sizeof(that_struct), and use the pointer as a pointer to that type.

You are set.

--
ksb
0
 

Author Comment

by:flower020397
ID: 2007804
I am getting hint about wahr are you saying.But will you please send me some  some pseudo code or snippet of already written code which can serve as an example for such an implementation...



Regards
0
 

Author Comment

by:flower020397
ID: 2007805
I am getting hint about wahr are you saying.But will you please send me some  some pseudo code or snippet of already written code which can serve as an example for such an implementation...



Regards
0
 
LVL 7

Expert Comment

by:linda101698
ID: 2007806
flower,
Please check your email address.  It seems to belong to someone else.  Correct it or I will close this account.

Linda Gardner
Customer Service @ Experts Exchange
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

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

713 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