Table F-3 shows routines in the DECthreads d4 interface that have a corresponding pthread routine that does not support the obsolete d4-style datatypes. These datatypes were documented for previous releases of DECthreads.
If your original code used the standard DECthreads datatypes, then this migration requirement might not impact your code.
| New Standard Datatype Syntax | Nonstandard Datatype Syntax | 
|---|---|
| 
      void
      pthread_cleanup_push(
       void (* routine)(void *), void * arg)  | 
    
      int
      pthread_cleanup_push(
       pthread_cleanup_t * routine, pthread_addr_t arg)  | 
  
| 
      int
      pthread_create(
       pthread_t * thread, const pthread_attr_t * attr, void *(* start_routine)(void *), void * arg)  | 
    
      int
      pthread_create(
       pthread_t * thread, pthread_attr_t attr, pthread_startroutine_t start_routine, pthread_addr_t arg)  | 
  
| 
      int
      pthread_exit(
       void * value_ptr)  | 
    
      int
      pthread_exit(
       pthread_addr_t status)  | 
  
| 
      void *
      pthread_getspecific(
       pthread_key_t key)  | 
    
      int
      pthread_getspecific(
       pthread_key_t key, pthread_addr_t * value)  | 
  
| 
      int
      pthread_join(
       pthread_t thread, void ** value_ptr)  | 
    
      int
      pthread_join(
       pthread_t thread, pthread_addr_t * status)  | 
  
| 
      int
      pthread_once(
       pthread_once_t * once_control, void (* init_routine)(void))  | 
    
      int
      pthread_once(
       pthread_once_t * once_block, pthread_initroutine_t init_routine)  | 
  
| 
      int
      pthread_setspecific(
       pthread_key_t key, const void * value)  | 
    
      int
      pthread_setspecific(
       pthread_key_t key, pthread_addr_t value)  | 
  
F.6 New Routines
The following are routines in the DECthreads pthread 
interface that did not exist at the time of the implementation of the 
d4 interface:
alert: See cancelation request.
alertable routine: See cancelable routine.
AST: Mechanism that signals an asynchronous event to a 
process.
asynchronous cancelability: If enabled, allows a 
thread to receive a cancelation request at any time (not only at 
cancelation points). See also general cancelability.
asynchronous signal: Signal that is the result of an 
event that is external to the process and is delivered at any point in 
a thread's execution when such an event occurs. See also 
synchronous signal.
attributes: Individual components of the attributes 
object. Attributes specify detailed properties about the objects to be 
created. See also attributes object.
attributes object: Object used to describe DECthreads 
objects (thread, mutex, condition variable, or queue). This description 
consists of the individual attribute values that are used to create an 
object. See also attributes.
cancelable routine: Routine in which a cancelation 
request may be delivered.
cancelation point: DECthreads routine that, when 
called by a routine, can determine whether a cancelation request is 
pending for that routine, and if so, can deliver the request.
cancelation request: Mechanism by which one thread 
requests termination of another thread (or itself).
condition variable: Object that allows a thread to 
block its own execution until some shared data reaches a particular 
state.
deadlock: Condition involving one or more threads and 
a set of one or more resources in which each of the threads is blocked 
waiting for one of the resources and all of the resources are held by 
the threads such that none of the threads can continue. For example, a 
thread will enter a self-deadlock when it attempts to lock a normal 
mutex a second time. Likewise, two threads will enter a deadlock when 
each attempts to lock a second mutex that is already held by the other. 
The introduction of additional threads and synchronization objects 
allows for more complex deadlock configurations.
dynamic memory: Memory that is allocated by the 
program as a result of a call to some memory management function, and 
that is referenced through pointer variables. See also static 
memory and stack memory.
errorcheck mutex: Mutex that can be locked exactly 
once by a thread, like a normal mutex. If a thread tries to lock the 
mutex again without first unlocking it, the thread receives an error 
instead of deadlocking. See also mutex, normal mutex, 
recursive mutex, and deadlock.
exception: Object that describes an error condition.
exception scope: Block of code where exceptions are 
handled.
general cancelability: If enabled, allows a thread to 
receive a cancelation request at specific cancelation points. If 
disabled, the thread cannot be canceled. See also asynchronous 
cancelability.
global lock: Single recursive mutex provided by 
DECthreads for use by all threads in a process when calling routines or 
code that is not thread safe to ensure serialized, exclusive access to 
the unsafe code.
guard area: Area at the end of the thread stack that 
is inaccessible to the thread. This helps prevent or detect overflow of 
the thread's stack.
guardsize attribute: Minimum size, in bytes, of the 
guard area for the stack of a thread.
handle: Storage, similar to a pointer, that refers to 
a specific DECthreads object.
inherit scheduling attribute: Attribute that specifies 
whether a newly created thread inherits the scheduling attributes 
(scheduling priority and policy) of the creating thread or uses the 
scheduling attributes stored in the attributes object. See 
also thread attributes object.
lifetime: Length of time memory is allocated for a 
particular purpose.
multithreaded programming: Division of a program into 
multiple threads that execute concurrently.
mutex: Mutual exclusion, an object that multiple 
threads use to ensure the integrity of a shared resource that they 
access (most commonly shared data) by allowing only one thread to 
access it at a time. See also normal mutex, errorcheck mutex, 
and recursive mutex.
mutex attributes object: Attribute that allows you to 
specify values for mutex attributes when you create a mutex.
mutex kind attribute: Attribute that specifies whether 
a mutex is normal, recursive, or errorcheck.
nonterminating signal: Signal that does not result in 
the termination of the process by default. See also 
terminating signal.
normal mutex: A kind of mutex that can be locked 
exactly once by a thread. It does not perform error checks. If a thread 
tries to lock the mutex again without first unlocking it, the thread 
waits for itself to release the lock and deadlocks. In DECthreads, this 
kind of mutex offers the best performance. See also mutex, 
errorcheck mutex, and recursive mutex.
per-thread context: See thread-specific data.
predicate: Boolean expression that defines a 
particular state of shared data; threads wait on a condition variable 
for shared data to enter the defined state. See also condition 
variable.
priority inversion: Occurs when interaction among 
three or more threads blocks the highest-priority thread from executing 
until after the lowest-priority thread can execute.
queuesize attribute: Number of elements allowed on a 
queue. See also atomic queue.
race condition: Occurs when two or more threads 
perform an operation, and the result of the operation depends on 
unpredictable timing factors.
readers/writer lock: An object that serializes access, 
in a thread-safe manner, to information that is frequently read and 
less frequently written.
recursive mutex: Mutex that can be locked more than 
once by a given thread without causing a deadlock. The thread must call 
the cma_mutex_unlock() or pthread_mutex_unlock() 
routine the same number of times that it called the 
cma_mutex_lock() or pthread_mutex_lock() routine 
before another thread can lock the mutex. See also mutex, 
normal mutex, errorcheck mutex, and deadlock.
scheduling policy attribute: Attribute that describes 
how the thread is scheduled for execution relative to the other threads 
in the program. See also thread attributes object.
scheduling precedence: The set of characteristics of 
threads and the DECthreads scheduling algorithm that, in combination, 
determine which thread will be allowed to run when a scheduling 
decision is made. Scheduling decisions are made when a thread becomes 
ready to run (for example, when a mutex on which it was waiting is 
unlocked, or a condition variable on which it was waiting is signaled 
or broadcasted), or when a thread is blocked (for example, when it 
attempts to lock a locked mutex or when it waits on a condition 
variable).
scheduling priority attribute: Attribute that 
specifies the execution priority of a thread, expressed relative to 
other threads in the same policy. See also thread attributes 
object.
scope: Areas of a program where code can access memory.
software interrupt handler: A routine that is executed 
in response to an interrupt generated by the operating system or 
equivalent support software. For example: an AST service routine 
handles interrupts on OpenVMS systems; a signal handler routine handles 
interrupts on Digital UNIX systems.
stack memory: Memory that is allocated from a thread's 
stack area at run time by code generated by the language compiler, 
generally when a routine is initially called. See also dynamic 
memory and static memory.
stacksize attribute: Minimum size, in bytes, of the 
memory required for a thread's stack.
static memory: Any variable that is permanently 
allocated at a particular address for the life of the program. See 
also dynamic memory and stack memory.
synchronous signal: Signal that is the result of an 
event that occurs inside a process and is delivered synchronously with 
respect to that event. See also asynchronous signal.
terminating signal: Signal that results in the 
termination of the process by default. See also nonterminating 
signal.
thread: Single, sequential flow of control within a 
program. Within a single thread, there is a single point of execution.
thread attributes object: Object that allows you to 
specify values for thread attributes when you create a thread.
thread reentrant: Refers to a routine that functions 
normally despite being called simultaneously or sequentially in 
different threads.
thread safe: Refers to a routine that can be called 
simultaneously from multiple threads without risk of corruption.
thread-specific data: User-specified fields of 
arbitrary data that can be added to a thread's context.
timeslicing: Mechanism that ensures that every thread is allowed time to execute by preempting running threads at fixed intervals.
6493P019.HTM OSSG Documentation 22-NOV-1996 13:20:25.66
Copyright © Digital Equipment Corporation 1996. All Rights Reserved.