QNX Neutrino 6.5.0

New entries

acoshl()
Compute the inverse hyperbolic cosine
acosl()
Compute the arccosine of an angle
asinhl()
Compute the inverse hyperbolic sine
asinl()
Compute the arcsine of an angle
atanhl()
Compute an inverse hyperbolic tangent
atanl()
Compute the arctangent of an angle
coshl()
Compute the hyperbolic cosine
cosl()
Compute the cosine of an angle
devctlv()
Control a device, using I/O vectors to pass data to and from the driver
erfcl()
Complementary error function
expl()
Compute the exponential function of a number
fmodl()
Compute a residue, using floating-point modular arithmetic
fseeko64()
Change the current position of a stream
ftello64()
Return the current position of a stream
getpagesizes(), getpagesizes64()
Get the available page sizes
getpeereid()
Get the effective credentials of a UNIX-domain peer
ioctl_socket()
An optimized version of ioctl() that provides special handling for some commands that use embedded pointers
ldexpl()
Multiply a floating-point number by an integral power of 2
llabs()
Calculate the absolute value of a long long integer
log1pl()
Log(1+x)
log10l()
Compute the logarithm (base 10) of a number
logl()
Compute the natural logarithm of a number
ncurses
Control a terminal's display
_NTO_TRACE_GETEVENT_C(), _NTO_TRACE_GETEVENT(), _NTO_TRACE_GETCPU(), _NTO_TRACE_SETEVENT_C(), _NTO_TRACE_SETEVENT()
Macros for use with the header of a trace event. For more information, see "Macros for use with the event header" in the entry for TraceEvent().
powl()
Raise a number to a given power
pthread_mutex_timedlock_monotonic()
This function is similar to pthread_mutex_timedlock(), but it uses CLOCK_MONOTONIC, so the timeout isn't affected by changes to the system time.
pthread_mutex_wakeup_np()
Unblock any threads that are waiting on a mutex
pthread_mutexattr_getwakeup_np()
Get the wakeup attribute of a mutex
pthread_mutexattr_setwakeup_np()
Set the wakeup attribute of a mutex
pthread_setschedprio()
Set a thread's priority
pthread_timedjoin_monotonic()
This function is similar to pthread_timedjoin(), but it uses CLOCK_MONOTONIC, so the timeout isn't affected by changes to the system time.
remainderl()
Compute the floating point remainder
rintl()
Round to the nearest integral value
sem_timedwait_monotonic()
This function is similar to sem_timedwait(), but it uses CLOCK_MONOTONIC, so the timeout isn't affected by changes to the system time.
shutdown_system()
Shut down the system; note that you can customize this function by providing your own callouts:
sinhl()
Compute the hyperbolic sine
sinl()
Calculate the sine of an angle
sqrtl()
Calculate the nonnegative square root of a number
strerror_r()
Convert an error number into an error message (reentrant)
strtof(), strtold()
Convert a string into a float and long double, respectively.
tanhl()
Calculate the hyperbolic tangent
tanl()
Calculate the tangent of an angle
trace_func_enter()
Insert a trace event for the entry to a function
trace_func_exit()
Insert a trace event for the exit from a function
trace_here()
Insert a trace event for the current address
trace_logb()
Insert a user combine trace event
trace_logbc()
Insert a trace event of an arbitrary class and type with arbitrary data
trace_logf()
Insert a user string trace event
trace_logi()
Insert a user simple trace event
trace_nlogf()
Insert a user string trace event, specifying a maximum string length
trace_vnlogf()
Insert a user string trace event, using a variable argument list

Changed content

acos(), acosf(), acosl()
For finite values not in the range [-1,1], these functions return NaN. The return value for +/-Inf is NaN.
acosh(), acoshf(), acoshl()
For finite values of x < 1, these functions return NaN. The return value when x is -Inf is NaN.
asin(), asinf(), asinl()
For finite values not in the range [-1,1], these functions return NaN. The return value for +/-Inf is NaN.
atan(), atanf(), atanhl()
For finite values of |x| > 1, these functions return NaN. The return value for +/-Inf is NaN.
aio_cancel()
The documentation now says that if aiocbptr isn't NULL, aio_cancel() ignores the fildes argument and attempts to cancel the I/O operation specified by the aiocb control block. The operation isn't canceled if it's already in progress.

This function indicates an error of EINVAL if the control block that aiocbptr points to isn't valid (i.e., it hasn't yet been used in any call to aio_read() or aio_write()).

aio_read(), aio_write()
The documentation now says that the asynchronous operation is submitted at the scheduling priority of the thread minus aiocbp->aio_reqprio.

If synchronized I/O is enabled on the file associated with aiocbptr->aio_fildes, these functions behave in accordance with the definitions of synchronized I/O data integrity completion and synchronized I/O file integrity completion.

calloc(), iofunc_lock_calloc(), malloc(), memalign(), realloc(), valloc()
Because the malloc() implementation uses signed, 32-bit integers to represent the size internally, you can't allocate more than 2 GB in a single allocation. If the size is greater than 2 GB, these functions indicate an error of ENOMEM.
bind()
Before calling bind() on an AF_INET socket, set the af_family member of the sockaddr structure to AF_INET. Up until QNX Neutrino 6.4.0, a value of 0 was accepted and assumed to be this value.
CACHE_FLUSH(), CACHE_INVAL()
Before using the CACHE_*() macros on ARM platforms, the calling thread must obtain I/O privileges by calling:
ThreadCtl( _NTO_TCTL_IO, 0 );
  
ChannelCreate()
We've added some sample code that you can use to check for stale _PULSE_CODE_COIDDEATH pulses.
ClockTime()
If you call ClockTime() to set the time of day, the kernel checks to see if the SYSPAGE_ENTRY(qtime)->boot_time field is zero. If it is, the kernel sets it to the appropriate value.
confstr()
We've described the _CS_LOCALE configuration string.
ConnectAttach()
We've added EINVAL, EMFILE, and ENOREMOTE to the list of error codes.
ConnectClientInfo()
The sid member of the _client_info structure is used internally by Qnet.
ConnectServerInfo()
We've documented the flags field of the _server_info structure.

If the info argument is NULL, ConnectServerInfo() ignores connections with dead servers and skips to the next coid. If info is non-NULL, the function fills in the _server_info structure; for connections with dead servers, it turns on the _NTO_COF_DEAD bit in the flags field of the structure.

cos(), cosf(), cosl()
When x is +/-Inf, these functions return NaN.
daemon()
The High Availability Manager now automatically switches to monitoring the new process that daemon() creates, if the original process was a self-attached entity.
dlopen()
RTLD_LAZY is now implemented. For details about it, see "Lazy loading" in the Compiling and Debugging chapter of the QNX Neutrino Programmer's Guide.
erfc(), erfcf(), erfcl()
For a correct value that would cause an underflow, these functions return 0.0.
execl(), execle(), execlp(), execlpe(), execv(), execve(), execvp(), execvpe()
  • These functions can give an error of ETXTBSY if the text file that you're trying to execute is busy (e.g., it might be open for writing).
  • The documentation for these functions now mentions that any memory locked by the calling process is unlocked.
exp(), expf(), expl()
For a correct value that would cause an underflow, these functions return 0.0.
fclose()
We've described the main error codes associated with this function.
fcntl()
This function indicates an error of EINVAL if the cmd argument is invalid.

The documentation now includes the following values for cmd:

  • F_ALLOCSP64
  • F_FREESP64
  • F_GETLK64
  • F_SETLK64
  • F_SETLKW64
fflush()
We've described the main error codes associated with this function.
fgetc()
We've described the main error codes associated with this function.
fork()
The documentation for this function now mentions that the child process doesn't inherit any memory locks from the parent.
fpathconf(), pathconf()
We've described the following:
  • _PC_ASYNC_IO
  • _PC_LINK_DIR
  • _PC_PRIO_IO
  • _PC_SYNC_IO
fputc()
We've described the main error codes associated with this function.
freopen()
This function indicates an error of EBADF if the underlying file descriptor is invalid or doesn't support the requested mode change.

We've listed the changes of mode that the Neutrino version of this function permits.

fseek(), fseeko()
We've listed the errors that these functions can indicate.

As a QNX Neutrino extensions, these functions give an error of ENOSYS if the underlying device is incapable of seeking.

fstatvfs(), statvfs()
  • The values of the f_files, f_ffree, and f_favail members of the statvfs structure depend on the filesystem.
  • We've updated the list of possible bits in the f_flags member.
  • The filesystem ID is currently the device ID.
getsockopt()
This entry now includes a section on setting the keepalive timing.
glob()
We've documented the following flags (which are NetBSD extensions):
  • GLOB_PERIOD
  • GLOB_MAGCHAR
  • GLOB_ALTDIRFUNC
  • GLOB_BRACE
  • GLOB_NOMAGIC
  • GLOB_TILDE
  • GLOB_NO_DOTDIRS
  • GLOB_LIMIT
inbe16(), inle16(), inbe32(), inle32()
Note that these macros access the specified port more than once if endian conversion is necessary. This could be a problem on some hardware.
InterruptAttach(), InterruptAttachEvent()
Note that it isn't safe to use floating-point operations in an Interrupt Service Routine (ISR).
InterruptMask(), InterruptUnmask()
These functions now give an error of ESRCH if the id parameter isn't something returned by InterruptAttach() or InterruptAttachEvent(), or -1.
InterruptDetach()
The thread that detaches an interrupt handler must be in the same process as the thread that attached it, or else this function indicates an error of EPERM.
ioctl()
We've made ioctl() compatible with other UNIX-based systems by enabling support for embedded pointers. This means that you no longer have to change calls to ioctl() into calls to ioctl_socket() in networking applications. As a result of this change, ioctl() can now indicate an error of ENOBUFS if there isn't enough memory available to copy the data that the embedded pointers refer to.
ionotify()
The documentation now states that this function enforces a restriction of one notification per message queue or resource manager. If a notification was already armed for the specified resource, ionotify() indicates an error of EBUSY.
ldexp(), ldexpf(), ldexpl()
For a correct value that would cause an underflow, these functions return 0.0.
log(), logf(), logl()
For finite values of x less than zero, these functions return NaN. The return value when x is -Inf is NaN.
log10(), log10f(), log10l()
For finite values of x less than zero, these functions return NaN. The return value when x is -Inf is NaN.
log1p(), log1pf(), log1pl()
For finite values of x less than -1, these functions return NaN. The return value when x is -Inf is NaN.
mallopt()
We've renamed MALLOC_FILLAREA to MALLOC_CKBOUNDS, and we've added more information about the MALLOC_CKALLOC, MALLOC_DUMP_LEAKS, MALLOC_EVENTBTDEPTH, MALLOC_FREE_CHECK, MALLOC_START_TRACING, MALLOC_STATS, MALLOC_TRACEBTDEPTH, MALLOC_TRACEMAX, MALLOC_TRACEMIN, MALLOC_TRACING, and MALLOC_VERIFY_ON options.
mem_offset()
If the offset is greater than INT_MAX, mem_offset() gives an error of EOVERFLOW. Use mem_offset64() if this happens.
message_attach()
Note that although the low and high arguments are of type int, message_attach() stores the values internally as short.
mkdir()
We've described the behavior for the S_ISGID and S_ISVTX bits.

Note that not all filesystems support the creation of directories.

mlock(), mlockall(), munlock(), munlockall()
For more information about locking, superlocking, and unlocking memory, see "Locking memory" in the Process Manager chapter of the System Architecture guide.

There's no limit on the amount of memory that a process may lock, other than the amount of physical memory in the system.

mmap()
The off argument to mmap() can be a physical address (e.g., for mapping a device's registers in a resource manager).
mq_open(), mq_unlink()
These functions indicate an error of ENOSYS if the message queue manager (mq or mqueue) isn't running.
MsgCurrent()
The documentation now points out that if you call MsgCurrent() on the rcvid pertaining to a low-priority client, then the priority boost given to your thread by a blocked high-priority thread can be lost.
MsgSend(), MsgSend_r(), MsgSendnc(), MsgSendnc_r(), MsgSendPulse(), MsgSendPulse_r(), MsgSendsv(), MsgSendsv_r(), MsgSendsvnc(), MsgSendsvnc_r(), MsgSendv(), MsgSendv_r(), MsgSendvnc(), MsgSendvnc_r(), MsgSendvs(), MsgSendvs_r(), MsgSendvsnc(), MsgSendvsnc_r()
These functions can indicate an error of EHOSTDOWN or EHOSTUNREACH if (for example) a send across Qnet failed.
MsgSendPulse()
  • If you specify a priority of -1, the function uses the calling thread's priority as the pulse's priority.
  • MsgSendPulse() gives an error of EINVAL if the specified priority is invalid (e.g., 0).
pow(), powf(), powl()
For finite values of x less than 0 and finite non-integer values of y, these functions return NaN. The return value for a correct value that would cause underflow is 0.0.
procmgr_daemon()
Note that the High Availability Manager (HAM) automatically monitors processes detached using procmgr_daemon() because they're in session 1.
pthread_cond_timedwait()
We've changed the example so that it uses CLOCK_MONOTONIC, which isn't affected by changes to the system time (unlike the default, CLOCK_REALTIME).
pthread_getschedparam()
As a QNX extension, the policy argument to pthread_getschedparam() can be NULL, in which case the function doesn't try to store the scheduling policy.
pthread_mutex_lock()
As a QNX Neutrino extension, this function can now return EINTR if the thread was unblocked by a call to pthread_mutex_wakeup_np().
pthread_mutexattr_setrecursive()
The pthread_mutexattr_settype() function provides a more portable way to make a mutex recursive.
pthread_rwlock_rdlock()
If another thread is currently waiting to acquire the read-write lock for writing, pthread_rwlock_rdlock() blocks. This can cause a deadlock if a thread attempts to recursively acquire the lock for reading, while another thread is trying to acquire the lock for writing.
pthread_setname_np()
This function gives an error of EBUSY when you're trying to name a thread other than the calling thread, and another program already has write access to the process's entry in the /proc filesystem.
read()
This function indicates an error of EIO if the filesystem resides on a removable media device, and the media has been forcibly removed.
readdir()
We've added more information about the dirent_extra and dirent_extra_stat structures that filesystems can provide as extra data.
regexec()
We've corrected the naming of the members from rm_sp and rm_ep to be rm_so and rm_eo, respectively.
remainder(), remainderf(), remainderl()
If x is infinite or y is zero and the other is non-NaN, these functions return NaN.
scalbn(), scalbnf()
When a correct value would cause an underflow, these functions return 0.0.
scanf()
A - in the scanlist for the [ conversion specifier that isn't the first character, nor the second where the first character is a ^, nor the last character, defines a range of characters to be matched. This range consists of characters numerically greater than or equal to the character before the -, and numerically less than or equal to the character after the -.

For the p conversion specifier, if the sequence contains more than 8 digits, the conversion is performed only on the last 8 digits in the sequence.

send(), sendmsg(), sendto()
These functions support the MSG_NOSIGNAL flag. Set it if you don't want to raise a SIGPIPE signal when the other end breaks the connection.
shm_ctl(), shm_ctl_special()
If you specify SHMCTL_PHYS in the flags, then paddr and size must be even multiples of the page size (sysconf(_SC_PAGE_SIZE)).
sigaction(), signal(), SignalAction()
Note that it isn't safe to use floating-point operations in a signal handler.
SignalAction()
QNX Neutrino uses the top eight signals for special purposes. They're always masked, and attempts to unmask them are ignored. They include named signals (e.g., SIGSELECT) and unnamed signals.
sigtimedwait()
This entry now mentions that the CLOCK_MONOTONIC clock is used to measure the time interval.
sin(), sinf(), sinl()
If x is +/-Inf, these functions return NaN.
sopen()
We've added EEXIST to the list of errors that this function can indicate.
spawn(), spawnp()
  • We've added more details about working with the fd_count and fd_map arguments to set up the file descriptors in the child process; see "Mapping file descriptors" in the entry for spawn().
  • We've expanded the list of possible errors:
    • ETXTBSY — the text file that you're trying to execute is busy (e.g., it might be open for writing).
    • EINVAL — an argument is invalid (e.g., argv[0] is NULL).
    • EINTR — the function was interrupted by a signal.
spawnl(), spawnle(), spawnlp(), spawnlpe(), spawnv(), spawnve(), spawnvp(), spawnvpe()
We've expanded the list of possible errors:
  • ETXTBSY — the text file that you're trying to execute is busy (e.g., it might be open for writing).
  • EINVAL — an argument is invalid. For example, argv[0] or arg0 (depending on which spawn*() function you use) is NULL, or the value of the mode argument is invalid.
  • EINTR — the function was interrupted by a signal.
  • ECHILD — the value of the mode argument is P_WAIT, and the child process terminated before the waitpid() was completed.
sqrt(), sqrtf(), sqrtl()
For finite values of x < -0, these functions return NaN. The return value when x is -Inf is NaN.
SyncCtl()
There's a new cmd argument, _NTO_SCTL_MUTEX_WAKEUP, that's used to wake up any threads that are blocked on the specified mutex; see pthread_mutex_wakeup_np().
Note: Don't use the _NTO_SCTL_MUTEX_WAKEUP command directly.
SyncMutexEvent()
If you call SyncMutexEvent() with a NULL event, the function deletes any existing event registration.
sysconf()
We've described the following variables:
  • _SC_AIO_PRIO_DELTA_MAX
  • _SC_DELAYTIMER_MAX
  • _SC_GETGR_R_SIZE_MAX
  • _SC_GETPW_R_SIZE_MAX
  • _SC_SEM_NSEMS_MAX
  • _SC_SIGQUEUE_MAX
  • _SC_THREAD_STACK_MIN
  • _SC_TZNAME_MAX
SYSPAGE_ENTRY()
If you call ClockTime() to set the time of day, the kernel checks to see if the SYSPAGE_ENTRY(qtime)->boot_time field is zero. If it is, the kernel sets it to the appropriate value.
tan(), tanf(), tanhl()
For a correct value that would cause an underflow, these functions return 0.0.
ThreadCtl()
  • Not only does a _NTO_TCTL_IO command request I/O privileges, it also superlocks the process's memory.
  • A lack of I/O privileges may cause a SIGILL signal.
thread_pool_attr_t
This structure — described in the entry for thread_pool_create() — now has a tid_name entry that you can use to specify a name to use for the threads in the pool.
timer_create()
This function fails if the clock ID corresponds to the CPU-time clock of a process or thread different from the process or thread invoking the function.
timer_settime()
The documentation now says that this function rounds up time values that are between two consecutive nonnegative integer multiples of the resolution of the specified timer to the larger multiple of the resolution.
tmpnam()
After TMP_MAX names have been generated, this function reuses names that have been previously generated:
  • If a file with the new name doesn't exist, the new name is returned.
  • If a file with the new name does exist, a default pathname with a basename of 000000 is returned.
TraceEvent()
We've updated and expanded the entry for this function:
  • We've updated the list of event classes.
  • In order to set up the dynamic rules filter, your application must call ThreadCtl() with the _NTO_TCTL_IO flag to get I/O privileges.
  • We've expanded the description of the event_data_t structure. Note that you need to provide space for the data_array member of this structure.
  • We've described the _NTO_TRACE_GET*() and _NTO_TRACE_SET*() macros, which you can use to work with event headers.
traceparser(), traceparser_cs(), traceparser_cs_range(), traceparser_debug(), traceparser_destroy(), traceparser_get_info(), traceparser_init()
We've expanded the entries for these functions, which you'll use if you're creating your own utility for parsing trace data (as an alternative to traceprinter).
tzset()
This function assumes the time zone if UTC0 if neither the TZ environment variable nor the _CS_TIMEZONE configuration string is set.

Errata

clock_settime()
An error of EINVAL could mean that the tv_sec member of the timespec structure is set to -1.
getopt()
We've corrected the "Returns" section of this entry.
InterruptAttach()
This function currently ignores the size argument.
malloc()
  • The default value for MALLOC_ARENA_CACHE_MAXBLK is 12, not 8.
  • We've corrected the description of MALLOC_MMAP_NOZERO. If this environment variable is nonzero, then when malloc() needs to expand the heap, it specifies the MAP_NOINIT flag when it calls mmap(); if the physical memory being mapped was previously unmapped with UNMAP_INIT_OPTIONAL, then the POSIX requirement that the memory be zeroed is relaxed. This environment variable has been supported on all architectures since QNX Neutrino 6.3.2.
mprotect()
In QNX Neutrino 6.4.0 and later, the addr argument isn't const.
mq_open()
We've corrected the description of how this function interprets the name argument.
MsgDeliverEvent()
We've corrected the server.c part of the example so that it handles the _IO_CONNECT message sent because of the usage of name_attach().
MsgReceive(), MsgReply(), MsgSend(), MsgSendnc()
The value of SSIZE_MAX is 231 − 1, not 232 − 1.
MsgSendPulse()
If you send a pulse across the network, the calling thread is blocked (STATE_NET_SEND) while the pulse is delivered to the local Qnet manager, which transmits it to the remote Qnet. The remote Qnet does a MsgSendPulse() on behalf of the caller, and the return value is transmitted back, at which point the calling thread is unblocked.
munlockall()
The full POSIX implementation for this function was added in the QNX Neutrino Core OS 6.3.2, but the documentation wasn't updated.
posix_memalign()
The alignment argument must be a multiple of size( void * ) that's also a power of 2.
pthread_cond_init()
In QNX Neutrino 6.4.0 and later, the attr argument is declared as const pthread_condattr_t *.
pthread_mutex_lock()
This function's behavior when you try to lock a mutex that you already own depends on the type of the mutex. For more information, see the entry for pthread_mutexattr_settype().
pthread_mutex_unlock()
We've corrected the description of the adjustments to a thread's priority when it unlocks a mutex. If the thread's priority was raised when a higher-priority thread attempted to lock the mutex, the calling thread's priority is again adjusted when it unlocks the mutex; its new priority is the maximum of its own priority and the priorities of those threads it still blocks, either directly or indirectly.
pthread_mutexattr_getprotocol(), pthread_mutexattr_setprotocol()
PTHREAD_PRIO_NONE was implemented in QNX Neutrino 6.4.0. This protocol means that owning the mutex doesn't affect the priority and scheduling of a thread.
putenv()
The type of the env_name argument is char *, not const char *.
pwrite()
We've corrected the list of error codes for this function.
random(), srandom()
We've corrected some numbers that should have been 2nn, not 2nn.
SchedCtl()
We've corrected the name of SCHED_APS_SEC_OFF.
seekdir()
If you call rewinddir() on the directory stream, or if you close and reopen the directory, an offset previously returned by telldir() becomes invalid.
sem_open()
We've corrected the description of how this function interprets the name argument.
send(), sendmsg(), sendto()
We've corrected the list of error codes for these functions.
shm_ctl(), shm_ctl_special()
We've corrected the spelling and description of SHMCTL_HIGHUSAGE.
shm_open()
This function indicates an error of EINVAL if an underlying call to resmgr_open_bind() fails.
signal()
Since signal-catching functions are invoked asynchronously with process execution, you need to take into account the same sort of things that you would in a multithreaded program when inspecting or manipulating shared resources; you might have to call InterruptLock() or InterruptUnlock(), but these functions aren't portable.

If a process sets the action for the SIGCHLD signal to SIG_IGN, its children won't enter the zombie state and the process can't use wait() or waitpid() to wait on their deaths.

SignalAction()
The default action for SIGTSTP, SIGTTIN, and SIGTTOU is to stop the process.
sleep()
POSIX doesn't define any errors for this function.
spawn(), spawnp()
The value of argv[0] can't be NULL.
strptime()
We corrected the call to memset() in the example.
tell64()
We've corrected the synopsis of this function.
ThreadCreate()
To get a pointer to the thread local storage, call __tls().
timer_settime()
In QNX Neutrino 6.4.0 and later, the value argument is of type const struct itimerspec *.
unsetenv()
In QNX Neutrino 6.4.0 and later, this function returns 0 for success, or -1 if an error occurred.
wordexp()
This function returns WRDE_NOSYS; it doesn't set errno.
write()
We've corrected the list of error codes for this function.