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

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 327
  • Last Modified:

Simulating Events using Signals..

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
flower020397
Asked:
flower020397
1 Solution
 
davidmwilliamsCommented:
 Why not use the USR type signals in Unix?  Or even a block of shared memory?
0
 
ksbCommented:
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
 
flower020397Author 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
0
 
flower020397Author 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
0
 
linda101698Commented:
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now