Open System Services Programmer's Guide
The put/put_types.h header file includes PUT Model library versions of the nonstandard
definitions that applications that use the SPT library obtained from spt_types.h, with this
difference:
• The spt_types.h header file defines type timespec_t that refers to a nonstandard struct
timespec data item whose first field has type unsigned long. The put/put_types.h
header file does not define this type. Instead, the standard header file time.h defines type
timespec_t, and specifies it as referring to a standard struct timespec data item whose
first field has type time_t (which is equivalent to type signed long).
The PUT Model library does not implement a nonstandard header file that corresponds to
spt_ucontext.h because the PUT Model library provides standard function behavior that
supersedes the nonstandard function behavior provided by the SPT library.
Standard and Nonstandard Pthread Types
Some definitions in the spthread.h header files refer to nonstandard pthread types. To comply
to the IEEE Standard (1003.1, 2004 edition) the definitions in pthread.h refer to standard POSIX
pthread types (as defined in sys/types.h) only.
If an application module calls a pthread function whose return value or parameters had a
nonstandard type and you want to conform to the standard, logic and data item definitions must
be revised to use the corresponding standard types. If you want to continue to use the nonstandard
types, they are defined in the PUT Model library header put/put_types.h.
Table 75 SPT Library Nonstandard Types and Corresponding PUT Model Library Standard Types
Corresponding PUT Model Library Standard TypeSPT Library Nonstandard Type
void *pthread_address_t
void *pthread_addr_t
intpthread_integer_t
void * (*) (void *)pthread_startroutine_t
void (*) (void)pthread_initroutine_t
void (*) (void *)pthread_destructor_t
void (*) (void)pthread_void_fn_ptr_t
Global Variables
In contrast to the SPT library, the PUT Model library does not provide these global variables because
these global variables are not specified in the IEEE Standard (1003.1, 2004 edition):
pthread_attr_default
pthread_mutexattr_default
pthread_condattr_default
Concurrency Level Defaults
The PUT Model library has a default concurrency level of 20. The SPT library has a default
concurrency level of 0 (zero).
Differences in Functions and Function Behavior
Nonblocking Function Equivalents to spt_*x and spt_*z Use Standard Names
The PUT model library does not provide analogs to spt_*() functions, such as spt_readz()
or spt_readx(), whose purpose is to be non-blocking alternatives to standard system functions.
If an application module contains calls to such a function, you must modify it to refer to the standard
Converting Applications that use the SPT Library 425