QNX RTOS v4 Knowledge Base
QNX RTOS v4 Knowledge Base
Title |
Sharing memory between processes |
Ref. No. |
QNX.000003404 |
Category(ies) |
Development |
Issue |
In our application, memory has to be shared between processes. If possible, duplicating the functionality of a thread is our preferred method.
|
Solution |
Threads, or shared memory are the available options, with shared memory being the preferred method. Shared memory is covered in the shmem.txt document that is shipped as part of the QNX OS. It should be on your system under /etc/readme/technotes/shmem.txt.
Threads are available for QNX4 by using tfork() or beginthread() and endthread(). begin/endthread are recommended as they allow more Watcom functions to be thread safe. The latest Watcom 10.6 patch is located in the update directories at:
http://www.qnx.com/cgi-ubin/up_gen_page?/updates_aliased/watcom10.6/wcc/Released
It comes with updated information on the thread, interrupt, and signal handler saftey of Watcom functions.
In QNX Neutrino 2.0, POSIX threads are supported natively.
See Also: shm_open, and shm_unlink in Watcom C Library - N to Z See Also: beginthread and endthread in Watcom C Library - A to M |
|