Simulating Events using Signals..

flower020397
flower020397 used Ask the Experts™
on
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.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
David WilliamsSoldier of fortune

Commented:
 Why not use the USR type signals in Unix?  Or even a block of shared memory?
Commented:
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

Author

Commented:
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

Author

Commented:
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
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

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial