POSIX conformance document (PCD)

This section describes the behavior of the implementation-defined features described in IEEE 1003.1-2004 as implemented by the BlackBerry 10 OS for the PSE52 profile specified by IEEE 1003.13-2003. The section numbers and titles below are those from the standard itself.

Base definitions

Additional File Access Control Mechanism

No additional file access control mechanisms are implemented.

Alternate File Access Control Mechanism

No alternative file access control mechanisms are implemented.

Appropriate Privileges

Appropriate privileges are provided by executing with a user ID equal to 0 (root).

Clock Tick

For CPU targets operating at less than 40 MHz, the default is 100 clock ticks per second.

For CPU targets operating at greater than 40 MHz, the default is 1000 clock ticks per second.

You can set the system clock's resolution by using the QNX-specific ClockPeriod() kernel call using the CLOCK_REALTIME clock.

Extended Security Controls

Extended security controls aren't implemented.

System Trace Event

The Trace (TRC) option isn't supported.

Trace Generation Version

The Trace (TRC) option isn't supported.

General Concepts

Extended Security Controls

No extended security controls are implemented.

Measurement of Execution Time

Process and thread execution time is measured by updating the running time on each clock tick. The running time of the active thread and process on each processor is incremented by the duration of the system clock tick.

The CPU time consumed by interrupt handlers is charged to the thread and process that is currently active on the CPU.

The CPU time consumed by kernel calls is charged to the thread and process performing the kernel call.

The CPU time consumed by system services not implemented by the kernel is charged to the thread in the server process that implements the system service.

Pathname Resolution

A pathname that begins with two successive slashes is treated as if it begins with a single slash.

Seconds Since the Epoch

The value of seconds since the Epoch is aligned with the current actual time by a 64-bit offset value that represents the offset, in nanoseconds, from the Epoch to the system boot time.

This offset value is initialised by the platform specific initialisation code within the board support package, for example, by reading RTC hardware if present.

A clock_settime() call using the CLOCK_REALTIME clock will set this offset to specified absolute time minus the current monotonic time since booting.

The offset from the Epoch can also be modified by the QNX specific ClockAdjust() kernel call. This applies a delta to the offset value on each system clock tick, for a specified number of ticks to perform a gradual adjustment of the offset value.

Tracing

The Trace (TRC) option isn't implemented.

Treatment of Error Conditions for Mathematical Functions

Domain Error
The return value for a domain error is NaN.
Range Error
  • Result Underflows:
    • The return value for a result that underflows is 0.0.
    • errno is set to ERANGE when (math_errhandling & MATH_ERRNO) is non-zero.
    • The underflow floating point exception is raised when (math_errhandling & MATH_ERREXCEPT) is non-zero.

Character Set

Character Set Description File

Applications can provide additional character set description files.

For single byte characters, the decimal, octal or hexadecimal constants are represented as a char value.

For multibyte characters, the decimal, octal or hexadecimal constants are represented as a wchar_t value, whose type is an unsigned 32-bit integer.

Locale

General

When the value of a locale environment variable doesn't begin with a slash, the value is interpreted as the name of a locale with the set of currently defined locales:

  • The values C and POSIX identify the built-in POSIX locale.
  • The value C-TRADITIONAL identifies the built-in locale that's equivalent to the C locale, except that it supports only single-byte characters.
  • Any other value identifies a locale with that name within the set of currently defined locales.

POSIX Locale

The default locale is the POSIX locale.

Locale Definition

No additional locale categories beyond those specified are supported.

The values of the characters in the portable character set are those defined by the ASCII and ISO/IEC 8859-1 character sets.

Environment variables

Internationalization Variables

There are no additional semantics for the following environment variables:

  • LC_COLLATE
  • LC_CTYPE
  • LC_MESSAGES
  • LC_MONETARY
  • LC_NUMERIC
  • LC_TIME

The default locale is the POSIX locale.

There are no additional criteria for determining valid locales.

Other Environment Variables

When the first character of the TZ variable is a colon, the colon is ignored and the following characters are handled as a normal time zone specification.

Headers

This section describes how the BlackBerry 10 OS conforms to POSIX in header files.

<fenv.h>

The default state of the FENV_ACCESS pragma is off. Note that gcc doesn't currently support this pragma.

<float.h>

The accuracy of of floating point operations and the library functions in <math.h> and <complex.h> is unknown.

The default rounding mode for floating-point addition (FLT_ROUNDS) is 1. No additional values beyond those specified are implemented.

The evaluation format mode (FLT_EVAL_METHOD) is -1 (indeterminable). There are no additional implementation-defined values beyond those specified.

The values of floating-point constants are as follows:

Constant Value
FLT_RADIX 2
FLT_MANT_DIG 24
DBL_MANT_DIG 53
LDBL_MANT_DIG 64
DECIMAL_DIG 21
FLT_DIG 6
DBL_DIG 15
LDBL_DIG 18
FLT_MIN_EXP -125
DBL_MIN_EXP -1021
LDBL_MIN_EXP -16381
FLT_MIN_10_EXP -37
DBL_MIN_10_EXP -307
LDBL_MIN_10_EXP -4931
FLT_MAX_EXP 128
DBL_MAX_EXP 1024
LDBL_MAX_EXP 16384
FLT_MAX_10_EXP 38
DBL_MAX_10_EXP 308
LDBL_MAX_10_EXP 4932
FLT_MAX 3.40282347e+38
DBL_MAX 1.7976931348623157e308
LDBL_MAX 1.189731495357231765e+4932
FLT_EPSILON 1.1920929e-07
DBL_EPSILON 2.2204460492503131e-16
LDBL_EPSILON 1.084202172485504434e-19
FLT_MIN 1.17549435e-38
DBL_MIN 2.2250738585072014e-308
LDBL_MIN 3.362103143112093506e-4932

<limits.h>

The limit values in <limits.h> are implemented as follows:

Limit Value
AIO_LISTIO_MAX Indeterminate
AIO_MAX Indeterminate
AIO_PRIO_DELTA_MAX Indeterminate
ARG_MAX 61440
ATEXIT_MAX 32
CHILD_MAX Indeterminate
DELAYTIMER_MAX 1048576
HOST_NAME_MAX Indeterminate
IOV_MAX Indeterminate
LOGIN_NAME_MAX Indeterminate
OPEN_MAX Determined by the maximum number of file descriptors available to a process.

The default limit is 1000, but this can be altered using a configuration option to the kernel when building the system image.

The minimum value that can be supplied is 100, with no imposed maximum.

A lower limit may be imposed by the process RLIMIT_NOFILE limit.

PAGESIZE 4096
PAGE_SIZE 4096
PTHREAD_DESTRUCTOR_ITERATIONS 4
PTHREAD_KEYS_MAX 128
PTHREAD_STACK_MIN 256
PTHREAD_THREADS_MAX 32767
RE_DUP_MAX 255
RTSIG_MAX 16
SEM_NSEMS_MAX For unnamed semaphores, this is indeterminate.

For named semaphores, the limit is determined by the mqueue server. The maximum is set to 4096, but a lower limit may be imposed by the process RLIMIT_NOFILE limit, as the implementation is via file descriptors.

SEM_VALUE_MAX 1073741824
SIGQUEUE_MAX Indeterminate
SS_REPL_MAX 65535
STREAM_MAX Indeterminate
SYMLOOP_MAX Indeterminate
TIMER_MAX Indeterminate
TTY_NAME_NAME Indeterminate
TZNAME_MAX 30
FILESIZEBITS Depends on the file system implementation.

The value for all currently supported file systems is 32.

LINK_MAX 65535
MAX_CANON Depends on the character device driver.

The default is 256, but may be changed by the -C driver command-line option.

MAX_INPUT Depends on the character device driver.

The default is 256, but may be changed by the -C driver command-line option.

NAME_MAX Depends on the file system implementation.

Most file systems impose a limit of 255; the ETFS file system imposes a limit of 91.

PATH_MAX Depends on the file system implementation.

Most file systems impose a limit of 1024; the ETFS file system imposes a limit of 255.

PIPE_BUF 512
SYMLINK_MAX Depends on the file system implementation.

Most file systems impose a limit of 1024; the ETFS file system imposes a limit of 256.

BC_BASE_MAX 99
BC_DIM_MAX 2048
BC_SCALE_MAX 99
BC_STRING_MAX 1000
CHARCLASS_NAME_MAX 14
COLL_WEIGHTS_MAX 2
EXPR_NEST_MAX 32
LINE_MAX 2048
NGROUPS_MAX 8
RE_DUP_MAX 255
CHAR_BIT 8
CHAR_MAX 127
CHAR_MIN -128
INT_MAX 2147483647
LONG_BIT 32
LONG_MAX 2147483647
MB_LEN_MAX 8
SCHAR_MAX 127
SHRT_MAX 32767
SSIZE_MAX 2147483647
UCHAR_MAX 255
UINT_MAX 4294967295
ULONG_MAX 4294967295
USHRT_MAX 65535
WORD_BIT 32
INT_MIN -2147383648
LONG_MIN -2147383648
SCHAR_MIN -128
SHRT_MIN -32768
LLONG_MIN -9223372036854775808
LLONG_MAX 9223372036854775807
ULLONG_MAX 18446744073709551615

<math.h>

If FLT_EVAL_METHOD has a value other than 0, 1 or 2, the type definitions for float_t and double_t are float and double, respectively.

No implementation-defined floating-point classification macros are defined.

The default state of the FP_CONTRACT pragma is off. Note that gcc doesn't currently support this pragma.

<signal.h>

Realtime signal behavior is supported for signals outside of the range SIGRTMIN through SIGRTMAX.

The following additional signals are defined in <signal.h>:

  • SIGIOT
  • SIGEMT (same signal number as SIGDEADLK)
  • SIGDEADLK (same signal number as SIGEMT)
  • SIGCLD (same signal number as SIGCHLD)
  • SIGPWR
  • SIGWINCH
  • SIGIO (same signal number as SIGPOLL)

For more information, see Summary of signals.

<stdint.h>

The limits for specified-width integer types are as follows:

Limit Value
INT8_MIN -128
INT16_MIN -32768
INT32_MIN -2147483648
INT64_MIN -9223372036854775808
INT8_MAX 127
INT16_MAX 32767
INT32_MAX 2147483647
INT64_MAX 9223372036854775807
UINT8_MAX 255
UINT16_MAX 65535
UINT32_MAX 4294967295
UINT64_MAX 18446744073709551615
INT_LEAST8_MIN -128
INT_LEAST16_MIN -32768
INT_LEAST32_MIN -2147483648
INT_LEAST64_MIN -9223372036854775808
INT_LEAST8_MAX 127
INT_LEAST16_MAX 32767
INT_LEAST32_MAX 2147483647
INT_LEAST64_MAX 9223372036854775807
UINT_LEAST8_MAX 255
UINT_LEAST16_MAX 65535
UINT_LEAST32_MAX 4294967295
UINT_LEAST64_MAX 18446744073709551615
INT_FAST8_MIN -128
INT_FAST16_MIN -32768
INT_FAST32_MIN -2147483648
INT_FAST64_MIN -9223372036854775808
INT_FAST8_MAX 127
INT_FAST16_MAX 32767
INT_FAST32_MAX 2147483647
INT_FAST64_MAX 9223372036854775807
UINT_FAST8_MAX 255
UINT_FAST16_MAX 65536
UINT_FAST32_MAX 4294967295
UINT_FAST64_MAX 18446744073709551615
INTPTR_MIN -2147483648
INTPTR_MAX 2147483647
UINTPTR_MAX 4284967295

The values of other integer types are as follows:

Constant Value
PTRDIFF_MIN -2147483648
PTRDIFF_MAX 2147483647
SIG_ATOMIC_MIN -2147483648
SIG_ATOMIC_MAX 2147483647
SIZE_MAX 4284967295

<sys/stat.h>

There are no additional implementation-defined bits that can be ORed into S_IRWXU, S_IRWXG, and S_IRWXO.

<time.h>

The maximum possible clock jump for the system-wide monotonic clock is the same as the system clock resolution:

  • For CPU targets operating at less than 40 MHz, this is 10 milliseconds
  • For CPU targets operating at more than 40 Mhz, this is 1 millisecond

The system clock resolution can be set using the QNX-specific ClockPeriod() kernel call using the CLOCK_REALTIME clock.

Last modified: 2014-12-11



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus