[Previous] [Contents] [Index] [Next]

Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

shm_ctl_special()

Give special attributes to a shared memory object

Synopsis:

#include <sys/mman.h>

int shm_ctl_special( int fd,
             int flags,
             _uint64 paddr,
             _uint64 size,
             unsigned special );

Arguments:

fd
The file descriptor that's associated with the shared memory object, as returned by shm_open().
flags
One or more of the following bits, defined in <sys/mman.h>:
Note:

Some of the bits have specific meanings for different processors. For more information, see the documentation for shm_ctl().


paddr
A physical address to assign to the object, if you set SHMCTL_PHYS in flags.
size
The new size of the object, in bytes, regardless of ANON/PHYS flag.
special
Process-specific flags.

This argument is currently used only on SH4 platforms. On SH4 7760, it controls the space attribute bits of the UTLB (see section 6.3.1 of 7760 hardware manual).

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The shm_ctl_special() function modifies the attributes of the shared memory object identified by the handle, fd. This handle is the value returned by shm_open().

The shm_ctl_special() function is similar to shm_ctl(), but has an additional processor-specific argument, special. Calling shm_ctl_special() with a value of 0 for special is equivalent to calling shm_ctl().

Returns:

0
Success.
-1
An error occurred (errno is set).

Errors:

EINVAL
An invalid combination of flags was specified, or the shared memory object is already "special."

Classification:

QNX Neutrino

Safety:
Cancellation point Yes
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

mmap(), munmap(), mprotect(), shm_ctl(), shm_open(), shm_unlink(), ThreadCtl()


[Previous] [Contents] [Index] [Next]