Next: , Previous: , Up: Run-time library functions   [Contents][Index]

6.3.1 Constants, variables, and data types

The following constants, variables, and data types are used by various run-time library functions and directly by backends.

Data type: ncptl_int

The internal data type of the coNCePTuaL run-time library is ncptl_int . This is normally a 64-bit signed integer type selected automatically by configure (see configure) but can be overridden with the --with-datatype option to configure. ncptl.h defines a string macro called NICS that can be used to output an ncptl_int regardless of how the ncptl_int type is declared:

ncptl_fatal ("My variable contains a negative value (%" NICS ")",

ncptl_int constants declared by backends derived from are given an explicit suffix that defaults to ‘LL’ but can be overridden at configuration time using the --with-const-suffix option.


NCPTL_INT_MIN is a C preprocessor macro that represents the smallest (i.e., most negative) number that can be assigned to an ncptl_int. For example, if ncptl_int is a 64-bit signed integer type, then NCPTL_INT_MIN will be the value ‘-9223372036854775808’.


The NCPTL_CMDLINE structure describes an acceptable command-line option. It contains a type, which is either NCPTL_TYPE_INT for an ncptl_int or NCPTL_TYPE_STRING for a char *, a pointer to a variable that will receive the value specified on the command line, the long name of the argument (without the ‘--’), the one-letter short name of the argument (without the ‘-’), a textual description of what the argument represents, and a default value to use if the option is not specified on the command line.

Data type: NCPTL_QUEUE

An NCPTL_QUEUE is an opaque data type that represents a dynamically growing queue that can be flattened to an array for more convenient access. NCPTL_QUEUE s have proved to be quite useful when implementing coNCePTuaL backends.


Every coNCePTuaL log file is backed by a unique NCPTL_LOG_FILE_STATE opaque data type. An NCPTL_LOG_FILE_STATE data type represents all of the state needed to maintain that file, such as file descriptors, prologue comments, and data that has not yet been aggregated.

Variable: int ncptl_pagesize

This variable is initialized by ncptl_init() to the number of bytes in an operating-system memory page. ncptl_pagesize can be used by backends to implement coNCePTuaL’s PAGE SIZED (see Item size) and PAGE ALIGNED (see Message alignment) keywords.

Variable: int ncptl_fast_init

The ncptl_init() function (see Initialization functions) can take many seconds to complete. Much of this time is spent calibrating and measuring the quality of the various timers the run-time library uses. For backends such as picl (see The picl backend) that do not measure real time there is little need to have an accurate timer. Setting ncptl_fast_init to ‘1’ before invoking ncptl_init() skips the timer calibration and measurement steps, thereby leading to faster initialization times. A user can also override the setting of ncptl_fast_init at run time by setting the NCPTL_FAST_INIT environment variable to either ‘0’ or ‘1’, as appropriate.

Next: , Previous: , Up: Run-time library functions   [Contents][Index]

Scott Pakin,