Calling context-level routines

Client-Library and CS-Library context-level routines are listed in Table 2-25. Thread-safe calls to context-level routines abide by the following restrictions:

Table 2-25: Thread-safe use of CS-Library and Client-Library context-level routines

Routine name

Thread-safe calls

Thread-unsafe calls

Notes

cs_calc

All.

cs_cmp

All.

cs_config

When action is CS_GET.

When action is CS_SET or CS_XCLEAR.

cs_convert

All.

If CS_LOCALE pointers are used within srcfmt or destfmt, access to the CS_LOCALE structures must be thread-safe.

cs_ctx_alloc

All

Thread-unsafe for any context. For more information, see “Context initialization and cleanup.”

cs_ctx_drop

All, for any context.

Thread-unsafe for any context. For more information, see “Context initialization and cleanup.”

cs_ctx_global

All calls after the first call has completed.

First executed call only.

cs_dt_crack

All.

cs_dt_info

All.

Access to the CS_LOCALE structure must be thread-safe.

cs_diag

When action is not CS_INIT.

When action is CS_INIT.

Only messages generated by the calling thread are visible. For more information, see “CS-Library error handling.”

cs_loc_alloc

All.

Access to the CS_LOCALE structure must be thread-safe. See “Using CS_LOCALE structures.”

cs_loc_drop

All calls.

cs_locale

All calls.

cs_objects

All calls.

cs_set_convert

When action CS_GET.

When action is CS_SET or CS_CLEAR.

cs_setnull

All calls that share the same context.

cs_strbuild

All calls.

cs_strcmp

All calls.

cs_time

All calls.

cs_will_convert

All calls.

ct_callback

When context is not NULL.

Thread-unsafe at the connection level (all calls where context is NULL). See “Calling connection-level routines” for more information.

ct_con_alloc

All calls.

ct_con_drop

All calls.

ct_config

When action is CS_GET.

When action is CS_SET or CS_CLEAR.

ct_debug

When context is not NULL.

See “Calling connection-level routines” for the case when context is NULL.

ct_exit

All calls, for any context.

Thread-unsafe for any context. For more information, see “Context initialization and cleanup.”

ct_init

All calls, for any context.

Thread-unsafe for any context. For more information, see “Context initialization and cleanup.”.

ct_poll

Only when context is not NULL.