Re: Access of a global variable to more than one process
Re: Access of a global variable to more than one process
- Subject: Re: Access of a global variable to more than one process
- From: Michael Smith <email@hidden>
- Date: Sat, 13 Jan 2007 11:18:10 -0800
On Jan 11, 2007, at 12:02 PM, email@hidden wrote:
I do not want to use shared memory like shmget, mmap or something.
Actually
Why not?
I want implementation of
#pragma data_seg("shared")
Int nGlobal = 5;
#pragma data_seg()
on MAC OSX. It works properly on vc if I place the above code in
DLL..Different copy of executable access the same memory.
I can set and get nGlobal from different process.Same
implementation I want
on MAC, is it possible?
Yes; use any of the various forms of shared memory that are available
to you.
I don't understand why you say you "don't want to use shared memory",
when your example is using shared memroy.
I also note that you make no mention of how you propose to
synchronise access to this variable, and I further note that you
haven't marked it 'volatile' either.
= Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden