P
pvbrowser
>Nifty. Several points though.
>correct me if I'm wrong, but isn't that C++?
Yes of course but the C++ class is just a wrapper for the C functions provided by the operating systems. You could do that in C also. The nice thing is that the class works on Unix like systems, Windows and OpenVMS.
>I guess the mutex is a good idea, but
>does that not create a chance of
>deadlock?
>What happens if a program
>terminates abnormally right on the
>memcpy line in write, thus not executing
>myunlock?
In theory yes. In practice no. If it would happen
it would happen first directly after program startup. Once the program is running i see no reason why these shared memory addresses should become invalid.
>it takes a pretty decent programmer with
>some experience to understand all the
>nuances of this.
The operating system functions that are used within the methods of rlSharedMemory are very old and hard to use. But the user does not need to care about this (He could review it for intrest)
instead he can use our simple and comfortable class.
Of course it would be nice to have a basic knowledge about parallel processes, mutex and semaphores.
>correct me if I'm wrong, but isn't that C++?
Yes of course but the C++ class is just a wrapper for the C functions provided by the operating systems. You could do that in C also. The nice thing is that the class works on Unix like systems, Windows and OpenVMS.
>I guess the mutex is a good idea, but
>does that not create a chance of
>deadlock?
>What happens if a program
>terminates abnormally right on the
>memcpy line in write, thus not executing
>myunlock?
In theory yes. In practice no. If it would happen
it would happen first directly after program startup. Once the program is running i see no reason why these shared memory addresses should become invalid.
>it takes a pretty decent programmer with
>some experience to understand all the
>nuances of this.
The operating system functions that are used within the methods of rlSharedMemory are very old and hard to use. But the user does not need to care about this (He could review it for intrest)
instead he can use our simple and comfortable class.
Of course it would be nice to have a basic knowledge about parallel processes, mutex and semaphores.