QNX Neutrino 6.4.1

New entries

bt_get_backtrace()
Collect a backtrace
Note: The backtrace library is an unsupported feature, due to its fragility. For more information, see Backtraces in the QNX Neutrino technotes.
bt_init_accessor()
Initialize a backtrace accessor
bt_load_memmap()
Load a memory map associated with a backtrace
bt_release_accessor()
Release an accessor for a backtrace
bt_set_flags()
Set or clear the flags for backtracing
bt_sprn_memmap()
Format the memory map information for a backtrace
bt_sprnf_addrs()
Format the addresses from a backtrace
bt_translate_addrs()
Translate the addresses from a backtrace
bt_unload_memmap()
Unload a memory map associated with a backtrace
endfsent()
Close the filesystem table (/etc/fstab) file
fchdir()
Change the working directory
posix_spawnattr_getcred()
Get the uid and gid of the child process
getfsent()
Get the next entry from the filesystem table (/etc/fstab) file
getfsfile()
Search for a filesystem name in the filesystem table (/etc/fstab) file
getfsspec()
Search for a block special device in the filesystem table (/etc/fstab) file
getpagesize()
Get the current page size
getpwent_r()
Get the next entry from the password database
IOFUNC_NOTIFY_DISARM(), IOFUNC_NOTIFY_INIT()
Disarm or initialize a notification list; see the entry for iofunc_notify().
IOFUNC_NOTIFY_INPUT_CHECK(), IOFUNC_NOTIFY_OBAND_CHECK(), IOFUNC_NOTIFY_OUTPUT_CHECK()
Check a notification list to see if it's worthwhile calling iofunc_notify_trigger() for it; see the entry for iofunc_notify_trigger().
iruserok(), iruserok_sa()
Check the identity of a remote host
mq_timedreceive_monotonic(), mq_timedsend_monotonic()
These functions are similar to mq_timedreceive() and mq_timedsend(), but they use CLOCK_MONOTONIC, so the timeout isn't affected by changes to the system time.
rcmd_af()
Execute a command on a remote host
resmgr_handle_grow()
Expand the capacity of the device manager database
resmgr_msgreply()
Reply to client with a message
resmgr_msgreplyv()
Reply to client with a message
resmgr_msg_again()
Process a message again in a resource manager
rresvport_af()
Obtain a socket with a privileged address
posix_spawnattr_setcred()
Set the uid and gid of the child process
setfsent()
Open the filesystem table (/etc/fstab) file
strlcat(), strlcpy()
Size-bounded string copying and concatenation

Discontinued

Instead of using: Use:
_resmgr_handle_grow() resmgr_handle_grow()
_resmgr_io_func() resmgr_iofuncs()
_resmgr_ocb() resmgr_ocb() (Note that this function takes only one argument, a pointer to a resmgr_context_t structure.)

Changed content

atomic_add(), atomic_add_value(), atomic_clr(), atomic_clr_value(), atomic_set(), atomic_set_value(), atomic_sub(), atomic_sub_value(), atomic_toggle(), atomic_toggle_value()
Perform atomic operations only on objects that were allocated in normal memory mappings. On certain processors, atomic operations will cause a fault if the object is allocated in uncached memory.
calloc(), malloc(), realloc()
The MALLOC_OPTIONS environment variable now controls how these functions behave if you specify a size of 0 (or a value of 0 for the n argument to calloc()). The V ("System V") and R ("use the realloc() behavior of QNX Neutrino 6.4.0 and earlier") columns below indicate how the functions behave if the value of MALLOC_OPTIONS includes that letter:
Function Default V R
calloc(n, 0) Non-NULL NULL No effect
malloc(0) Non-NULL NULL No effect
realloc(NULL, 0) Non-NULL NULL No effect
realloc(non-NULL, 0) Non-NULL NULL NULL

In all the above cases, if the function returns a non-NULL pointer, it's valid only for a corresponding call to free() or realloc().

Note: The default behavior of realloc(non-NULL, 0) has changed in this release. Calls like this used to return NULL.
ConnectAttach()
If a process wants other processes to communicate with it, it typically uses name_attach() to create a channel and associate a name with it, and the sender process uses name_open() to locate that name and create a connection to it.
daemon()
The High Availability Manager can see death messages only from tasks that are running in session 1, and daemon() doesn't put the caller into that session; use procmgr_daemon() instead if you want to use your application with the HAM.
dlopen()
The description of resolving symbols now includes LD_PRELOAD.
dlsym()
This function now supports the special RTLD_NEXT flag.
fdatasync(), fsync()
These functions block until the given file has been synchronized. For more information about synchronizing, see "Filesystems and block I/O (devb-*) drivers" in the Fine-Tuning Your System chapter of the QNX Neutrino User's Guide.
InterruptAttach()
On a multicore system, the interrupt handler runs on the CPU that takes the interrupt.
InterruptAttachEvent()
On a multicore system, the thread that receives the event set up by InterruptAttachEvent() runs on any CPU, limited only by the scheduler and the runmask.
InterruptHookTrace()
The integer that's passed to the handler is a combination of the buffer index and the sequence number; to extract each, pass the integer to the _TRACE_GET_BUFFNUM() and _TRACE_GET_BUFFSEQ() macros.
InterruptWait()
On a multicore system, a thread that calls InterruptWait() runs on any CPU, limited only by the scheduler and the runmask.
iofunc_notify()
We've added more details about the extended (_NOTIFY_CONDE_*) flags.
mmap()
  • We've documented the following flags:
    • MAP_NOSYNCFILE
    • MAP_BELOW
    • MAP_ELF
    • MAP_FILE — for compatibility; has no effect.
    • MAP_RENAME — for compatibility; has no effect.
    • MAP_NORESERVE — for compatibility; has no effect.
    • MAP_SYSRAM — not a valid bit for mmap().
  • The fildes argument can be the file descriptor for a file, shared memory object, or typed memory object, or NOFD if you're mapping physical memory.
  • If you want to map a device's physical memory, use mmap_device_memory() instead of mmap(); if you want to map a device's registers, use mmap_device_io().
  • The mapping type controls whether or not changes are propagated to the underlying object. With MAP_PRIVATE, changes aren't propagated; with MAP_SHARED they are.
  • You can use MAP_SHARED | MAP_ANON to create a region to be shared by forked applications.
  • If you use MAP_PHYS without MAP_ANON, the offset specifies the exact physical address to map (e.g., for video frame buffers). If you use MAP_PHYS with MAP_ANON, mmap() allocates physically contiguous memory and ignores the offset.
  • We've described how mmap() works with typed memory.
  • When you're mapping a file, you can specify MAP_FILE, but it isn't necessary. We've added an example of mapping a file.
  • You can now create more than one writeable mapping to a file.
_msg_info
We've added more information about the flags member of this structure.
MsgDeliverEvent(), MsgDeliverEvent_r()
These functions can give an error code of EINVAL if the given event isn't valid.
MsgReceivePulsev(), MsgReceivePulsev_r(), MsgReceivev(), MsgReceivev_r(), MsgSendsv(), MsgSendsv_r(), MsgSendsvnc(), MsgSendsvnc_r(), MsgSendv(), MsgSendv_r(), MsgSendvnc(), MsgSendvnc_r(), MsgSendvs(), MsgSendvs_r(), MsgSendvsnc(), MsgSendvsnc_r()
These functions now give an error of EOVERFLOW instead of overflowing a buffer if the sum of the user's IOV lengths exceeds INT_MAX.
name_attach()
This function can indicate an error of EBUSY if it couldn't create a channel.
nanospin(), nanospin_calibrate(), nanospin_count(), nanospin_ns(), nanospin_ns_to_count()
The nanospin*() functions wait for at least the specified time; they might not wait for exactly the specified time. For more information, see the Tick, Tock: Understanding the Microkernel's Concept of Time chapter of the QNX Neutrino Programmer's Guide.
pthread_attr_setstackaddr(), pthread_attr_setstacksize()
The system uses some of the provided stack for objects such as thread local storage and an initial stack frame, so less than the entire buffer is available to the thread.
pthread_barrier_init(), pthread_cond_init(), pthread_mutex_init(), pthread_once(), pthread_rwlock_init(), sem_init() SyncTypeCreate(), SyncTypeCreate_r()
You should allocate mutexes, condvars, barriers, reader/writer locks, semaphores, and the control structure for pthread_once() only in normal memory mappings. On certain processors, atomic operations such as calls to pthread_mutex_lock() will cause a fault if the control structure is allocated in uncached memory.
pthread_cond_timedwait()
When setting the time for use with this function, you can use nsec2timespec() to convert times in nanoseconds to a timespec structure (and timespec2nsec() to convert them back again).
resmgr_attach()
There's a new flag called RESMGR_FLAG_CROSS_ENDIAN that indicates whether the server handles cross-endian support.

The resmgr_attach() function copies the pointers to the resmgr_connect_funcs_t and resmgr_io_funcs_t structures, not the structures themselves. You should allocate the structures, declare them to be static, or make them global variables. If your resource manager is for more than one device with different handlers, create separate structures that define the handlers.

resmgr_detach()
We've described the _RESMGR_DETACH_CLOSE flag, which closes all bindings when detaching.
setrlimit()
In QNX Neutrino, RLIMIT_DATA covers all mappings made by the process that are MAP_ANON | MAP_PRIVATE that aren't MAP_STACK, which corresponds typically to heap allocations.
ThreadCtl(), ThreadCtl_r()
These functions indicate an error of EINVAL if the specified runmask is invalid.
timer_getoverrun()
Note that pulses are queued for a process, so timer overruns occur only for signals.

Errata

ConnectAttach()
You likely need to include <sys/netmgr.h> when you use this function, in order to define ND_LOCAL_NODE.
struct dirent
In some filesystems, the d_offset member identifies the directory entry itself; in others, it's the offset of the next directory entry.
gettimeofday(), settimeofday()
We've corrected the types of the members of the timeval structure.
InterruptAttachEvent()
An error of EPERM indicates that the process doesn't have I/O privileges.
iofunc_attr_t
The nlink member of this structure must be at least 2 for names that represent a directory (one for the directory itself, one for the ./ entry in it).
iofunc_lock()
This function is actually implemented.
mq_receive()
If the given msg_len is less than the mq_msgsize for the given queue, this function sets errno to EMSGSIZE, not EINVAL.
name_attach()
We've corrected the example so that it now compiles cleanly.
resmgr_attach()
We've corrected the information about the flags:
  • Use the flags whose names don't start with an underscore (RESMGR_FLAG_*) in the flags member of the resmgr_attr_t structure.
  • Use the flags whose names do start with an underscore (_RESMGR_FLAG_*) in the flags argument to this function.
resmgr_iofuncs()
The public version of this function takes only one argument, a pointer to a resmgr_context_t structure.
setrlimit()
If the RLIMIT_DATA limit is exceeded, the brk(), mmap(), and sbrk() functions fail with errno set to ENOMEM.
timer_timeout(), TimerTimeout()
Because of the nature of time measurement, timers might actually expire later than the specified time. For more information, see the Tick, Tock: Understanding the Microkernel's Concept of Time chapter of the QNX Neutrino Programmer's Guide.
ttyname(), ttyname_r()
We've corrected the list of errors that these functions can indicate.
wait(), wait4(), waitid(), waitpid()
These functions suspend the calling thread, not the calling process.