[Previous] [Contents] [Next]

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

Appendix: QNX 4 Functions & QNX Neutrino Equivalents

This appendix lists the QNX 4 C library functions along with their QNX Neutrino equivalents. For functions that have no direct replacement, you'll find either a cover function or a suggested workaround.

Use these links to find a function quickly:

A B C D E F G H I K L
M N O P Q R S T U V W Y

A

abstimer()

QNX Neutrino equivalent:
timer_settime( CLOCK_REALTIME, TIMER_ABSTIME, ... )
In migration library?
No

_asctime()

QNX Neutrino equivalent:
extern char *asctime_r( const struct tm *__timeptr, char *__buff );
In migration library?
No

This call is a drop-in replacement.

B

_bcalloc()

QNX Neutrino equivalent:
calloc()
In migration library?
No

QNX Neutrino doesn't support segment-based functions.

_beginthread()

QNX Neutrino equivalent:
pthread_create()
In migration library?
No

Note: A thread in QNX 4 is really just a separate process that shares the data segment of its parent, whereas a thread in QNX Neutrino is really within the same process as its parent and shares a great deal more.

_bexpand()

QNX Neutrino equivalent:
realloc()
In migration library?
No

Note: QNX Neutrino doesn't support segment-based functions. You can use realloc() in place of this, but beware that realloc() will move your memory block to a new address if needed, and _bexpand() will fail rather than move your memory block to a new address.

_bfree()

QNX Neutrino equivalent:
free()
In migration library?
No

QNX Neutrino doesn't support segment-based functions.

_bfreeseg()

QNX Neutrino equivalent:
free()
In migration library?
No

QNX Neutrino doesn't support segment-based functions.

_bgetcmd()

QNX Neutrino equivalent:
Parse the argument vector passed to main() instead.
In migration library?
No

QNX Neutrino doesn't support segment-based functions.

_bheapchk()

QNX Neutrino equivalent:
mallopt() with MALLOC_VERIFY
In migration library?
No

See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.

_bheapmin()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_bheapseg()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_bheapset()

QNX Neutrino equivalent:
mallopt() with MALLOC_VERIFY
In migration library?
No

See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.

_bheapshrink()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_bheapwalk()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.

block_read()

QNX Neutrino equivalent:
readblock() as follows:
readblock(filedes, 512, block - 1, nblocks, buf)
  
In migration library?
Yes

Note: The block number has been changed from 1-based to 0-based.

block_write()

QNX Neutrino equivalent:
writeblock() as follows:
writeblock(filedes, 512, block - 1, nblocks, buf)
  
In migration library?
Yes

Note: The block number has been changed from 1-based to 0-based. When applied to a regular file, the QNX 4 block_write() would never grow the file; the writeblock() function may cause a regular file to be extended if writing occurs beyond the end-of-file. Note that the cover function in the migration library calls writeblock().

_bmalloc()

QNX Neutrino equivalent:
malloc()
In migration library?
No

QNX Neutrino doesn't support segment-based functions.

_bmsize()

QNX Neutrino equivalent:
_msize(), _musize(), and DH_ULEN()
In migration library?
No

See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.

_bprintf()

QNX Neutrino equivalent:
snprintf()
In migration library?
No

_brealloc()

QNX Neutrino equivalent:
realloc()
In migration library?
No

QNX Neutrino doesn't support segment-based functions.

C

_CA_PCI_* functions

The following functions aren't in the migration library:

QNX 4 function: QNX Neutrino equivalent:
_CA_PCI_BIOS_Present() pci_present()
_CA_PCI_Find_Class() pci_find_class()
_CA_PCI_Find_Device() pci_find_device()
_CA_PCI_Generate_Special_Cycle() No longer supported
_CA_PCI_Read_Config_Byte() pci_read_config8()
_CA_PCI_Read_Config_DWord() pci_read_config32()
_CA_PCI_Read_Config_Word() pci_read_config16()
_CA_PCI_Write_Config_Byte() pci_write_config8()
_CA_PCI_Write_Config_DWord() pci_write_config32()
_CA_PCI_Write_Config_Word() pci_write_config16()

cgets()

QNX Neutrino equivalent:
Set /dev/tty as standard output and call gets().
In migration library?
No

_clear87()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

clock_setres()

QNX Neutrino equivalent:
ClockPeriod()
In migration library?
No

console_active()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

console_arm()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

console_close()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

console_ctrl()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

console_info()

QNX Neutrino equivalent:
tcgetsize() for the number of rows and columns -- the remainder is no longer supported.
In migration library?
No

console_open()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

console_protocol()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

console_read()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

console_size()

QNX Neutrino equivalent:
tcgetsize() for the number of rows and columns -- you can't set the size.
In migration library?
No

console_state()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

console_write()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_control87()

QNX Neutrino equivalent:
See <fpstatus.h>
In migration library?
No

cprintf()

QNX Neutrino equivalent:
Set /dev/tty as standard output and call printf().
In migration library?
No

cputs()

QNX Neutrino equivalent:
Do fputs() to /dev/tty instead.
In migration library?
No

Creceive()

QNX Neutrino equivalent:
MsgReceive() preceded immediately by:
event.sigev_notify = SIGEV_UNBLOCK;
TimerTimeout(CLOCK_REALTIME, _NTO_TIMEOUT_RECEIVE,
            &event, NULL, NULL );
  
In migration library?
No

Creceivemx()

QNX Neutrino equivalent:
MsgReceivev() preceded immediately by:
event.sigev_notify = SIGEV_UNBLOCK;
TimerTimeout(CLOCK_REALTIME, _NTO_TIMEOUT_RECEIVE,
            &event, NULL, NULL );
  
In migration library?
No

crypt()

QNX Neutrino equivalent:
crypt()
In migration library?
No

The QNX Neutrino version is Unix-compatible. For the QNX 4 version, qnx_crypt().

cscanf()

QNX Neutrino equivalent:
Set /dev/tty as standard input and call scanf().
In migration library?
No

_ctime()

QNX Neutrino equivalent:
ctime_r()
In migration library?
No

cuserid()

QNX Neutrino equivalent:
geteuid() for the user ID number followed by getpwent() to find the user name.
In migration library?
No

D

dev_arm()

QNX Neutrino equivalent:
See ionotify().
In migration library?
Yes -- covers _DEV_EVENT_INPUT, _DEV_EVENT_OUTPUT, _DEV_EVENT_EXRDY, and _DEV_EVENT_DRAIN.

Not all event types are supported. For _DEV_EVENT_HANGUP, consider setting up a controlling terminal and handle SIGHUP. For _DEV_EVENT_WINCH, consider using SIGWINCH.

dev_fdinfo()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

You can't get all the information, but you can get bits and pieces elsewhere.

dev_info()

QNX Neutrino equivalent:
No longer supported.
In migration library?
Yes

You can't get all the information, but you can get bits and pieces elsewhere.

dev_insert_chars()

QNX Neutrino equivalent:
tcinject()
In migration library?
Yes

dev_ischars()

QNX Neutrino equivalent:
tcischars()
In migration library?
Yes

dev_mode()

QNX Neutrino equivalent:
tcgetattr() and tcsetattr()
In migration library?
Yes

dev_osize()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

dev_read()

QNX Neutrino equivalent:
readcond() and ionotify()
In migration library?
Yes

You can implement some of this by using readcond() and ionotify(). The readcond() can handle the cases where proxy == 0. The ionotify() in conjunction with pulses (signals are even easier) can handle the cases where proxy != 0 and min, time, and timeout are all 0.

For equivalent functionality to min, time, and timeout combined with a pulse or signal for notification, create a separate thread that requests pulse notification using ionotify(). Set up another pulse notification for the timeout. Then go into a MsgReceive() loop with with a TimerTimeout() call before the MsgReceive() call for the interbyte time. Deliver a pulse or set a signal when the min, time or timeout condition is satisfied.


Note: The cover function doesn't handle the proxy and armed parameters.

dev_readex()

QNX Neutrino equivalent:
devctl() with DCMD_CHR_GETOBAND
In migration library?
Yes

You can use devctl() with DCMD_CHR_GETOBAND in place of this for getting out-of-band data from resource managers that support it. Currently, only devc-* resource managers support this.

dev_size()

QNX Neutrino equivalent:
tcgetsize() and tcsetsize()
In migration library?
Yes

dev_state()

QNX Neutrino equivalent:
N/A
In migration library?
Yes

There's no equivalent way of directly setting these states:

_disable()

QNX Neutrino equivalent:
InterruptLock()
In migration library?
No

disk_get_entry()

QNX Neutrino equivalent:
devctl() with the DCMD_CAM_DEVINFO command.
In migration library?
Yes, but see below.

See <sys/dcmd_cam.h> and <sys/cam_device.h>. Although a cover function is provided in the migration library, you might want to use the direct devctl()s that build this -- they're more useful and have better field definitions (e.g. "cylinders" in QNX Neutrino is 32-bit, but only 16-bit in QNX 4, and large EIDE disks have already wrapped this due to geometry translation).

disk_space()

QNX Neutrino equivalent:
statvfs()
In migration library?
Yes, but see below.

Although a cover function is provided in the migration library, you might want to switch directly to statvfs() because it has additional fields that may be useful (block size, mount flags, etc.).

E

ecvt()

QNX Neutrino equivalent:
sprintf()
In migration library?
No

_ecvt()

QNX Neutrino equivalent:
sprintf()
In migration library?
No

_enable()

QNX Neutrino equivalent:
InterruptUnlock()
In migration library?
No

_endthread()

QNX Neutrino equivalent:
pthread_exit()
In migration library?
No

_expand()

QNX Neutrino equivalent:
realloc()
In migration library?
No

Note: You can use realloc() in place of this, but beware that realloc() will move your memory block to a new address if needed, and _expand() will fail rather than move your memory block to a new address.

F

_fcalloc()

QNX Neutrino equivalent:
calloc()
In migration library?
No

fcvt()

QNX Neutrino equivalent:
sprintf()
In migration library?
No

_fcvt()

QNX Neutrino equivalent:
sprintf()
In migration library?
No

_fexpand()

QNX Neutrino equivalent:
realloc()
In migration library?
No

You can use realloc() in place of this, but beware that realloc() will move your memory block to a new address if needed, and _expand() will fail rather than move your memory block to a new address.

_ffree()

QNX Neutrino equivalent:
free()
In migration library?
No

_fheapchk()

QNX Neutrino equivalent:
mallopt() with MALLOC_VERIFY
In migration library?
No

See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.

_fheapgrow()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_fheapmin()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_fheapset()

QNX Neutrino equivalent:
mallopt() with MALLOC_VERIFY
In migration library?
No

See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.

_fheapshrink()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_fheapwalk()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.

filelength()

QNX Neutrino equivalent:
fstat()
In migration library?
No

You can do this with:

fstat(fd, &st);

followed by:

return(S_ISBLK(st.st_mode) ? st.st_nblocks *
       st.st_blocksize : st.st_size);

A little more may be needed for 64-bit support.

_fmalloc()

QNX Neutrino equivalent:
malloc()
In migration library?
No

_fmemccpy()

QNX Neutrino equivalent:
memccpy()
In migration library?
No

_fmemchr()

QNX Neutrino equivalent:
memchr()
In migration library?
No

_fmemcmp()

QNX Neutrino equivalent:
memcmp()
In migration library?
No

_fmemcpy()

QNX Neutrino equivalent:
memcpy()
In migration library?
No

_fmemicmp()

QNX Neutrino equivalent:
memicmp()
In migration library?
No

_fmemmove()

QNX Neutrino equivalent:
memmove()
In migration library?
No

_fmemset()

QNX Neutrino equivalent:
memset()
In migration library?
No

_fmsize()

QNX Neutrino equivalent:
_msize(), _musize(), and DH_ULEN()
In migration library?
No

See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.

FP_OFF()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_fpreset()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_frealloc()

QNX Neutrino equivalent:
realloc()
In migration library?
No

_freect()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

FP_SEG()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_fsopen()

QNX Neutrino equivalent:
sopen(), fdopen()
In migration library?
No

Use sopen(), which returns a file descriptor, then use fdopen() to associate a stream with it.

_fstr* functions

The following functions aren't in the migration library:

QNX 4 function: QNX Neutrino equivalent:
_fstrcat() strcat()
_fstrchr() strchr()
_fstrcmp() strcmp()
_fstrcpy() strcpy()
_fstrcspn() strcspn()
_fstrdup() strdup()
_fstricmp() strcmp()
_fstrlen() strlen()
_fstrlwr() strlwr()
_fstrncat() strncat()
_fstrncmp() strncmp()
_fstrncpy() strncpy()
_fstrnicmp() strnicmp()
_fstrnset() strnset()
_fstrpbrk() strpbrk()
_fstrrchr() strrchr()
_fstrrev() strrev()
_fstrset() strset()
_fstrspn() strspn()
_fstrstr() strstr()
_fstrtok() strtok()
_fstrupr() strupr()

fsys_fdinfo()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

fsys_fstat()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

The filesystem doesn't provide the information because the QNX Neutrino io-blk doesn't give preferential treatment to any particular disk format.

fsys_get_mount_dev()

QNX Neutrino equivalent:
devctl()
In migration library?
Yes

You can use the devctl() command DCMD_FSYS_MOUNTED_ON to get this information, but it must be sent as part of a combine message. See the source for fsys_get_mount_dev() in the migration library for code for doing this.

fsys_get_mount_pt()

QNX Neutrino equivalent:
devctl()
In migration library?
Yes

You can use the devctl() command DCMD_FSYS_MOUNTED_BY to get this information, but it must be sent as part of a combine message. See the source for fsys_get_mount_pt() in the migration library for code for doing this.

fsys_stat()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

The filesystem doesn't provide the information because the QNX Neutrino io-blk doesn't give preferential treatment to any particular disk format.

G

gcvt()

QNX Neutrino equivalent:
Consider sprintf()
In migration library?
No

_gcvt()

QNX Neutrino equivalent:
Consider sprintf()
In migration library?
No

getch()

QNX Neutrino equivalent:
read() in raw mode.
In migration library?
No

getche()

QNX Neutrino equivalent:
getchar() or getc() combined with putchar() or putc().
In migration library?
No

getcmd()

QNX Neutrino equivalent:
Parse the argument vector passed to main() instead.
In migration library?
No

getnid()

QNX Neutrino equivalent:
netmgr_ndtostr()
In migration library?
Yes

Unlike QNX 4, QNX Neutrino doesn't use node IDs (nids). Instead, nodes on a network have names. To get the name of the caller's node, use netmgr_ndtostr() with the nd parameter set to ND_LOCAL_NODE.

The migration library has a getnid() function that returns whatever was passed to mig4nto-procmgr via the -n option.

gettimer()

QNX Neutrino equivalent:
timer_gettime()
In migration library?
No

getwd()

QNX Neutrino equivalent:
getcwd()
In migration library?
No

The getwd() function requires a preallocated buffer, whereas getcwd() will allocate one if it's passed NULL for the buffer. The getcwd() function also has a size parameter. For portability, use getcwd() instead of getwd().

_gmtime()

QNX Neutrino equivalent:
gmtime_r()
In migration library?
No

H

halloc()

QNX Neutrino equivalent:
calloc()
In migration library?
No

_heapchk()

QNX Neutrino equivalent:
mallopt() with MALLOC_VERIFY
In migration library?
No

See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.

_heapenable()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_heapgrow()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_heapmin()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_heapset()

QNX Neutrino equivalent:
mallopt() with MALLOC_VERIFY
In migration library?
No

See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.

_heapshrink()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_heapwalk()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.

hfree()

QNX Neutrino equivalent:
free()
In migration library?
No

I

ioctl()

QNX Neutrino equivalent:
devctl()
In migration library?
No

For the dcmds to use with QSS-supplied resource managers, see <sys/dcmd_*.h>.

inp()

QNX Neutrino equivalent:
in8()
In migration library?
No

Note: You should call mmap_device_io() before calling the port I/O functions.

inpd()

QNX Neutrino equivalent:
in32()
In migration library?
No

Note: You should call mmap_device_io() before calling the port I/O functions.

inpw()

QNX Neutrino equivalent:
in16()
In migration library?
No

Note: You should call mmap_device_io() before calling the port I/O functions.

__isascii()

QNX Neutrino equivalent:
isascii()
In migration library?
No

__iscsym()

QNX Neutrino equivalent:
isalpha(), isdigit()
In migration library?
No

Replace with an expression using isalpha(), isdigit() and testing for the underscore character.

__iscsymf()

QNX Neutrino equivalent:
isalpha()
In migration library?
No

Replace with an expression using isalpha() and testing for the underscore character.

_itoa()

QNX Neutrino equivalent:
itoa()
In migration library?
No

K

kbhit()

QNX Neutrino equivalent:
tcischars()
In migration library?
No

L

lfind()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_localtime()

QNX Neutrino equivalent:
localtime_r()
In migration library?
No

lock()

QNX Neutrino equivalent:
fcntl() with F_SETLK
In migration library?
No

locking()

QNX Neutrino equivalent:
tell() and fcntl() with F_SETLK
In migration library?
No

_locking()

QNX Neutrino equivalent:
tell() and fcntl() with F_SETLK
In migration library?
No

log2()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_lrotl()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_lrotr()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

lsearch()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_ltoa()

QNX Neutrino equivalent:
ltoa()
In migration library?
No

M

_makepath()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

__max()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_memavl()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_memicmp()

QNX Neutrino equivalent:
memicmp()
In migration library?
No

_memmax()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

__min()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

MK_FP()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

mktimer()

QNX Neutrino equivalent:
timer_create()
In migration library?
No

mount()

QNX Neutrino equivalent:
mount()
In migration library?
No

Note: This is supported, but its prototype has changed.

mouse_close()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

mouse_flush()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

mouse_open()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

mouse_param()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

mouse_read()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

movedata()

QNX Neutrino equivalent:
memcpy()
In migration library?
No

_msize()

QNX Neutrino equivalent:
_msize(), _musize(), and DH_ULEN()
In migration library?
No

See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.

N

_ncalloc()

QNX Neutrino equivalent:
calloc()
In migration library?
No

_nexpand()

QNX Neutrino equivalent:
realloc()
In migration library?
No

You can use realloc() in place of this, but beware that realloc() will move your memory block to a new address if needed, and _nexpand() will fail rather than move your memory block to a new address.

_nfree()

QNX Neutrino equivalent:
free()
In migration library?
No

_nheapchk()

QNX Neutrino equivalent:
mallopt() with MALLOC_VERIFY
In migration library?
No

See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.

_nheapgrow()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_nheapmin()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_nheapset()

QNX Neutrino equivalent:
mallopt() with MALLOC_VERIFY
In migration library?
No

See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.

_nheapshrink()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_nheapwalk()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.

_nmalloc()

QNX Neutrino equivalent:
malloc()
In migration library?
No

_nmsize()

QNX Neutrino equivalent:
_msize(), _musize(), and DH_ULEN()
In migration library?
No

See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.

nosound()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_nrealloc()

QNX Neutrino equivalent:
realloc()
In migration library?
No

O

onexit()

QNX Neutrino equivalent:
atexit()
In migration library?
No

outp()

QNX Neutrino equivalent:
out8()
In migration library?
No

Note: You should call mmap_device_io() before calling the port I/O functions.

outpd()

QNX Neutrino equivalent:
out32()
In migration library?
No

Note: You should call mmap_device_io() before calling the port I/O functions.

outpw()

QNX Neutrino equivalent:
out16()
In migration library?
No

Note: You should call mmap_device_io() before calling the port I/O functions.

P

print_usage()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

putch()

QNX Neutrino equivalent:
Set /dev/tty as standard output and call putchar().
In migration library?
No

Alternate method: simply open /dev/tty and use putc().

Q

qnx_adj_time()

QNX Neutrino equivalent:
ClockAdjust()
In migration library?
No

qnx_device_attach()

QNX Neutrino equivalent:
rsrcdbmgr_devno_attach()
In migration library?
No

qnx_device_detach()

QNX Neutrino equivalent:
rsrcdbmgr_devno_detach()
In migration library?
No

qnx_display_hex()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

qnx_display_msg()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

qnx_fd_attach()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

The resource manager library removes the need for this.

qnx_fd_detach()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

The resource manager library removes the need for this.

qnx_fd_query()

QNX Neutrino equivalent:
None currently
In migration library?
No

There may be something later.

qnx_fullpath()

QNX Neutrino equivalent:
realpath()
In migration library?
No

Use realpath() followed by a call to netmgr_ndtostr() to get the node name.

qnx_getclock()

QNX Neutrino equivalent:
None currently for remote nodes.
In migration library?
No

Currently, there's no way of getting the time from another node in a native QNX network. Use clock_gettime() to get the time on the local node.

qnx_getids()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

See the section on "Getting process information" in the Programming Issues chapter in this guide.

qnx_hint_attach()

QNX Neutrino equivalent:
InterruptAttach() or InterruptAttachEvent()
In migration library?
No

qnx_hint_detach()

QNX Neutrino equivalent:
InterruptDetach()
In migration library?
No

qnx_hint_mask()

QNX Neutrino equivalent:
InterruptMask() and InterruptUnmask()
In migration library?
No

qnx_hint_query()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

qnx_ioctl()

QNX Neutrino equivalent:
devctl()
In migration library?
No

For the dcmds to use with QSS-supplied resource managers, see <sys/dcmd_*.h>.

qnx_ioctlmx()

QNX Neutrino equivalent:
devctl()
In migration library?
No

For the dcmds to use with QSS-supplied resource managers, see <sys/dcmd_*.h>.

qnx_name_attach()

QNX Neutrino equivalent:
name_attach() or write a resource manager
In migration library?
Yes

If you're not using the migration library and you're using QNX Neutrino, then use name_attach() or write resource managers.

For some other methods that the sender can use to find the receiver, see the section on "How does the sender find the receiver?" in the Programming Issues chapter in this guide.

qnx_name_detach()

QNX Neutrino equivalent:
name_detach() or write a resource manager
In migration library?
Yes

If you're not using the migration library and you're replacing qnx_name_attach() with name_attach(), then use name_detach().

qnx_name_locate()

QNX Neutrino equivalent:
name_open() or write a resource manager
In migration library?
Yes

If you're not using the migration library and you're using QNX Neutrino, then use name_attach() or write resource managers.

For some other methods that the sender can use to find the receiver, see the section on "How does the sender find the receiver?" in the Programming Issues chapter in this guide.

qnx_name_locators()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

qnx_name_nodes()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

qnx_name_query()

QNX Neutrino equivalent:
Names registered via name_attach() (QNX Neutrino) appear in /dev/name/local and /dev/name/global.
In migration library?
Yes

The migration library has a qnx_name_query() function for querying the names registered using the qnx_name_attach() migration library function.

qnx_net_alive()

QNX Neutrino equivalent:
netmgr_ndtostr() with ND_LOCAL_NODE, readdir()
In migration library?
No

Find out the name of your network directory by calling netmgr_ndtostr() with ND_LOCAL_NODE for the nd parameter. Then walk through the network directory using readdir(). The nodes listed are those that are up.

qnx_nidtostr()

QNX Neutrino equivalent:
netmgr_ndtostr()
In migration library?
No

qnx_osinfo()

QNX Neutrino equivalent:
No longer supported.
In migration library?
Yes

See the section on "Getting system information" in the Programming Issues chapter in this guide.

qnx_osstat()

QNX Neutrino equivalent:
sysconf()
In migration library?
No

QNX Neutrino doesn't have as many hard limits as QNX 4, but instead keeps allocating memory until it runs out. Some limits can be found out by calling sysconf().

qnx_pflags()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

See the section on "Process flags" in the Programming Issues chapter in this guide.

qnx_prefix_attach()

QNX Neutrino equivalent:
name_attach() or pathmgr_symlink()
In migration library?
No

If you were using this function just to put a name in the prefix table so that other processes could find yours, then use name_attach() instead (QNX Neutrino).

If you were using this function in an I/O manager that handled _IO_* messages, then you need to convert to the resource manager library.

If you were using this function to create an alias, then use pathmgr_symlink() instead.

qnx_prefix_detach()

QNX Neutrino equivalent:
name_detach() or resmgr_detach() or pathmgr_unlink() or unlink()
In migration library?
No

If you're using name_attach() to register a name (QNX Neutrino), then use name_detach() to detach it.

If you're writing a resource manager and had attached the name via resmgr_attach(), then use resmgr_detach() to detach it.

If you wanted to remove a symlink created using pathmgr_symlink(), then use pathmgr_unlink() or unlink() instead.

qnx_prefix_getroot()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

QNX Neutrino doesn't have the concept of a network root.

qnx_prefix_query()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

For the names that are associated with a resource manager, you can walk through the directory structure under /proc/mount. The numbers shown refer to a resource manager and are nd,pid,chid,handle,type where the type is one of the _FTYPE_* macros in <sys/ftype.h>. Names that are the equivalent of replacements (or aliases) aren't visible in QNX Neutrino.

qnx_prefix_setroot()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

QNX Neutrino doesn't have the concept of a network root.

qnx_proxy_attach()

QNX Neutrino equivalent:
Replace proxies with pulses
In migration library?
Yes

If you're not using the migration library, then consider replacing proxies with pulses.

qnx_proxy_detach()

QNX Neutrino equivalent:
No longer supported.
In migration library?
Yes

If you're not using the migration library and you're replacing qnx_proxy_attach() with pulses, then you may need to detach the connection for delivering the pulse.

qnx_proxy_rem_attach()

QNX Neutrino equivalent:
Replace proxies with pulses
In migration library?
No

If you're not using the migration library, then consider replacing proxies with pulses.

qnx_proxy_rem_detach()

QNX Neutrino equivalent:
Replace proxies with pulses
In migration library?
No

If you're not using the migration library and you're replacing qnx_proxy_rem_attach() with pulses, then you may need to detach the connection for delivering the pulse.

qnx_psinfo()

QNX Neutrino equivalent:
No longer supported.
In migration library?
Yes

See the section on "Getting system information" in the Programming Issues chapter in this guide.

qnx_scheduler()

QNX Neutrino equivalent:
sched_setscheduler() for the local case.
In migration library?
No

Currently, there's no way to do this across the network.

qnx_segment_alloc()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

See shm_open(), ftruncate(), and mmap().

qnx_segment_alloc_flags()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

See shm_open(), ftruncate(), and mmap().

qnx_segment_arm()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

qnx_segment_flags()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

See mmap().

qnx_segment_free()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

See munmap() and shm_unlink().

qnx_segment_get()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

qnx_segment_huge()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

qnx_segment_index()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

qnx_segment_info()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

To get a physical address, use posix_mem_offset().

qnx_segment_overlay()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

See mmap_device_memory() or mmap().

qnx_segment_overlay_flags()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

See mmap_device_memory() or mmap().

qnx_segment_put()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

qnx_segment_raw_alloc()

QNX Neutrino equivalent:
shm_ctl()
In migration library?
No

Create a shared memory object and use shm_ctl() to both set its size and to create it as contiguous. If the process dies, then as long as you don't do shm_unlink() the memory will still be set aside. To get a physical address, use posix_mem_offset().

qnx_segment_raw_free()

QNX Neutrino equivalent:
shm_unlink()
In migration library?
No

To return memory allocated as detailed above under qnx_segment_raw_alloc(), close() the file descriptor, munmap() the memory, and call shm_unlink().

There's no equivalent function for adding memory that wasn't reported by the BIOS. However, this sort of thing can be done using the -M option to startup-* (Utilities reference) or from the startup code using add_mem() (see Building Embedded Systems in the Embedding SDK package).

qnx_segment_realloc()

QNX Neutrino equivalent:
N/A
In migration library?
No

You can grow shared memory at any time. You can shrink it only to 0 bytes and only when no other process has it mapped. Shrinking it to other sizes may be implemented in a future release.

qnx_setclock()

QNX Neutrino equivalent:
clock_settime() for the local case.
In migration library?
No

Currently, there's no way to do this across the network.

qnx_setids()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

qnx_sflags()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

To obtain the equivalent of most of these flags, see the source for qnx_osinfo() in the migration library.

qnx_sid_query()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

qnx_spawn()

QNX Neutrino equivalent:
spawn() and spawn* family.
In migration library?
Yes

See the section on "Process issues" in the Programming Issues chapter in this guide.

qnx_strtonid()

QNX Neutrino equivalent:
netmgr_ndtostr()
In migration library?
No

qnx_sync()

QNX Neutrino equivalent:
sync(), possibly with fdatasync() or fsync().
In migration library?
No

Note: These functions don't synchronize a filesystem on another node of the network.

qnx_ticksize()

QNX Neutrino equivalent:
ClockPeriod()
In migration library?
No

This behaves like qnx_ticksize() with the _TICKSIZE_CLOSEST flag.

qnx_trace_close()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

Consider using syslog() for logging instead.

qnx_trace_info()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

Consider using syslog() for logging instead.

qnx_trace_open()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

Consider using syslog() for logging instead.

qnx_trace_read()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

Consider using syslog() for logging instead.

qnx_trace_severity()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

Consider using syslog() for logging instead.

qnx_trace_trigger()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

Consider using syslog() for logging instead.

qnx_umask()

QNX Neutrino equivalent:
N/A
In migration library?
No

There's no way to set the umask of another process, but you can use umask() to set the umask for the caller.

qnx_vc_attach()

QNX Neutrino equivalent:
ConnectAttach()
In migration library?
No

qnx_vc_detach()

QNX Neutrino equivalent:
ConnectDetach()
In migration library?
No

qnx_vc_name_attach()

QNX Neutrino equivalent:
open() or name_open()
In migration library?
No

This is the equivalent of doing open() (or name_open()) of a name that is registered by a process on another node via resmgr_attach() (or name_attach()).

qnx_vc_poll_parm()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

See the various docs on QNX Neutrino native networking for similar options.

R

Readmsg()

QNX Neutrino equivalent:
MsgRead()
In migration library?
Yes

Note: Call this function with the receive ID returned from MsgReceive() instead of a process ID.

Readmsgmx()

QNX Neutrino equivalent:
MsgReadv()
In migration library?
Yes

Note: Call this function with the receive ID returned from MsgReceive() instead of a process ID.

Receive()

QNX Neutrino equivalent:
MsgReceive()
In migration library?
Yes

Note: Call this function with a channel ID returned from ChannelCreate() instead of a process ID.

For more information, see the section on "Channel IDs vs process IDs" in the Programming Issues chapter in this guide.

Receivemx()

QNX Neutrino equivalent:
MsgReceivev()
In migration library?
Yes

Note: Call this function with a channel ID returned from ChannelCreate() instead of a process ID.

For more information, see the section on "Channel IDs vs process IDs" in the Programming Issues chapter in this guide.

Relay()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

reltimer()

QNX Neutrino equivalent:
timer_settime( CLOCK_REALTIME, 0, ...)
In migration library?
No

Reply()

QNX Neutrino equivalent:
MsgReply()
In migration library?
Yes

Note: Call this function with the receive ID returned from MsgReceive() instead of a process ID.

Replymx()

QNX Neutrino equivalent:
MsgReplyv()
In migration library?
Yes

Note: Call this function with the receive ID returned from MsgReceive() instead of a process ID.

rmtimer()

QNX Neutrino equivalent:
timer_delete()
In migration library?
No

_rotl()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_rotr()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

S

_searchenv()

QNX Neutrino equivalent:
searchenv()
In migration library?
No

Note: The searchenv() function doesn't search in the current directory unless it's specified in the given environment variable.

segread()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

Send()

QNX Neutrino equivalent:
MsgSend()
In migration library?
Yes

Note: This function takes a connection ID (coid) instead of a process ID. You can get this coid (a file descriptor) from open() or ConnectAttach(..., _NTO_SIDE_CHANNEL, ...).

For more information, see the section on "Channel IDs vs process IDs" in the Programming Issues chapter in this guide.

Sendfd()

QNX Neutrino equivalent:
MsgSend()
In migration library?
No

Note: This function takes a file descriptor (which is also a connection ID in QNX Neutrino).

For more information, see the section on "Channel IDs vs process IDs" in the Programming Issues chapter in this guide.

Sendfdmx()

QNX Neutrino equivalent:
MsgSendv()
In migration library?
No

Note: This function takes a file descriptor (which is also a connection ID in QNX Neutrino).

For more information, see the section on "Channel IDs vs process IDs" in the Programming Issues chapter in this guide.

Sendmx()

QNX Neutrino equivalent:
MsgSendv()
In migration library?
Yes

Note: This function takes a connection ID (coid) instead of a process ID. You can get this coid (a file descriptor) from open() or ConnectAttach(..., _NTO_SIDE_CHANNEL, ...).

For more information, see the section on "Channel IDs vs process IDs" in the Programming Issues chapter in this guide.

_setmx()

QNX Neutrino equivalent:
SETIOV() for use with the QNX Neutrino Msg*() functions.
In migration library?
Yes -- a _setmx() macro is provided in the migration library header file.

set_new_handler()

QNX Neutrino equivalent:
N/A
In migration library?
No

This is available in the C++ library (posted as free software for QNX Neutrino).

_set_new_handler()

QNX Neutrino equivalent:
N/A
In migration library?
No

This is available in the C++ library (posted as free software for QNX Neutrino).

sound()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_splitpath()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_splitpath2()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

stackavail()

QNX Neutrino equivalent:
__stackavail()
In migration library?
No

_status87()

QNX Neutrino equivalent:
No longer supported.
In migration library?
No

_strdate()

QNX Neutrino equivalent:
time(), localtime(), gmtime(), and strftime()
In migration library?
No

_strdup()

QNX Neutrino equivalent:
strdup()
In migration library?
No

_stricmp()

QNX Neutrino equivalent:
stricmp()
In migration library?
No

_strlwr()

QNX Neutrino equivalent:
strlwr()
In migration library?
No

_strnicmp()

QNX Neutrino equivalent:
strnicmp()
In migration library?
No

_strrev()

QNX Neutrino equivalent:
strrev()
In migration library?
No

_strtime()

QNX Neutrino equivalent:
time(), localtime(), gmtime(), and strftime()
In migration library?
No

_strupr()

QNX Neutrino equivalent:
strupr()
In migration library?
No

T

tcsetct()

QNX Neutrino equivalent:
N/A
In migration library?
No

Although there's no equivalent function for this, the first tty that is opened without O_NOCTTY after a call to setsid() and that doesn't already have a controlling process will cause the calling process to be the controlling process for this tty.

term_* functions

The following functions have no QNX Neutrino equivalent, and aren't in the migration library; use ncurses instead.

term_attr_type()
term_axis()
term_bar()
term_box()
term_box_fill()
term_box_off()
term_box_on()
term_clear()
term_color()
term_cur()
term_delete_char()
term_delete_line()
term_down()
term_field()
term_fill()
term_flush()
term_get_line()
term_home()
term_init()
term_insert_char()
term_insert_line()
term_insert_off()
term_insert_on()
term_key()
term_left()
term_lmenu()
term_load()
term_menu()
term_mouse_default()
term_mouse_flags()
term_mouse_handler()
term_mouse_hide()
term_mouse_move()
term_mouse_off()
term_mouse_on()
term_mouse_process()
term_printf()
term_receive()
term_relearn_size()
term_resize_off()
term_resize_on()
term_restore()
term_restore_image()
term_right()
term_save_image()
term_scroll_down()
term_scroll_up()
term_setup()
term_type()
term_unkey()
term_up()
term_video_off()
term_video_on()
term_window_scan()

tfork()

QNX Neutrino equivalent:
N/A
In migration library?
No

QNX Neutrino has true POSIX threads. See the pthread_*() functions (specifically, pthread_create()) as a starting point.

timer_create()

QNX Neutrino equivalent:
timer_create()
In migration library?
No

The QNX 4 version was based on a draft standard. In QNX Neutrino, the timer ID is returned through the third parameter, and the sigevent structure is filled in differently.

_tolower()

QNX Neutrino equivalent:
tolower()
In migration library?
No

_toupper()

QNX Neutrino equivalent:
toupper()
In migration library?
No

Trace0()

The following functions have no QNX Neutrino equivalent, and aren't in the migration library; consider using syslog() for logging instead:

Trace0()
Trace0b()
Trace1()
Trace2()
Trace2b()
Trace3()
Trace4()
Trace4b()
Trace5()
Trace5b()
Trace6()
Trace6b()

Trigger()

QNX Neutrino equivalent:
N/A
In migration library?
Yes

Proxies have been replaced by pulses. See the section on "Proxies vs pulses" in the chapter on Programming Issues in this guide.

The migration library Trigger() function works the same as the QNX 4 one, but it's slower if the "triggerer" is in a different process than that which the proxy is attached to. For details, see the Trigger() function in the Migration Library chapter in this guide.

U

umount()

QNX Neutrino equivalent:
umount()
In migration library?
No

This is supported, but it now has unused flags parameters.

ungetch()

QNX Neutrino equivalent:
ungetc()
In migration library?
No

unlock()

QNX Neutrino equivalent:
fcntl() with F_SETLK
In migration library?
No

V

_vbprintf()

QNX Neutrino equivalent:
vsnprintf()
In migration library?
No

vcprintf()

QNX Neutrino equivalent:
vprintf(), with /dev/tty set as standard output.
In migration library?
No

vcscanf()

QNX Neutrino equivalent:
vsscanf(), with /dev/tty set as standard output.
In migration library?
No

W

Writemsg()

QNX Neutrino equivalent:
MsgWrite()
In migration library?
Yes

Note: This function takes the receive ID returned from MsgReceive() instead of a process ID.

Writemsgmx()

QNX Neutrino equivalent:
MsgWritev()
In migration library?
Yes

Note: This function takes the receive ID returned from MsgReceive() instead of a process ID.

Y

Yield()

QNX Neutrino equivalent:
sched_yield()
In migration library?
Yes

[Previous] [Contents] [Next]