|  |  
 |   |   
 NAMEmt-libtt-intro — introduction to multi-thread safe ToolTalk library. DESCRIPTIONTo enable developers to write multithreaded applications, the Tt/tt_c.h header defines the following features: typedef enum tt_feature { Note that the TT_FEATURE_MULTITHREADED value is part of the libtt binary interface. These features are accessed by calling code with corresponding #define constants: #define TT_FEATURE_MULTITHREADED _TT_FEATURE_MULTITHREADEDDevelopers can write multi-threaded applications for ToolTalk without managing locks around ToolTalk resources explicitly in application code. Note that threading inside ToolTalk is not supported. An extended version of the Xthreads.h thread API wrappers has been used so that multithreaded libtt is easily portable to various thread implementations. A process-wide lock is used to protect internal libtt resources. Because few applications spend a significant amount of their time in libtt, a more fine-grained locking approach is not required. A few ToolTalk global values, such as the default procid and the storage stack manipulated by the tt_mark and tt_release calls, must have a consistent state as seen by one thread across ToolTalk API calls. These global values have been made into thread-specific data. The calls described below are used to initialize this behavior and manipulate the new data. The other API calls have been modified to reference the thread-specific value instead of the process-wide value when a thread-specific value has been set for the current thread. If no thread-specific value has been set for the current thread, the process-wide value is used. The following ToolTalk API calls implement support for multithreaded libtt: 
 Note that since the multithreaded feature may not be available on all platforms, the tt_feature_enabled function is provided to query for the existence of the feature. The intent is that even platforms that do not enable the multithreaded feature should implement the thread-related calls, returning TT_ERR_UNIMP. This allows a run-time check without unresolved symbol problems. SEE ALSOTt/tt_c.h - Tttt_c(5), tt_feature_enabled(3), tt_feature_required(3), tt_procid_session(3), tt_thread_procid(3), tt_thread_procid_set(3), tt_thread_session(3), tt_thread_session(3) 
 |