HP 3000 Manuals

PTHREAD Intrinsics [ DCE for the HP 3000 ] MPE/iX 5.0 Express III Documentation


DCE for the HP 3000

PTHREAD Intrinsics 

The following are the PTHREAD intrinsics supported for DCE/3000.
The PTHREAD procedure and type declarations are located in the
PTHREADH.THREADS file.

     int
     pthread_cond_broadcast (cond)
       pthread_cond_t *cond;

     int
     pthread_cond_destroy (cond)
       pthread_cond_t *cond;

     int
     pthread_cond_init (cond, attr)
       pthread_cond_t *cond;
       pthread_condattr_t attr;

     int
     pthread_cond_signal (cond)
       pthread_cond_t *cond;

     int
     pthread_cond_timedwait (cond, mutex, abstime)
       pthread_cond_t *cond;
       pthread_mutex_t *mutex;
       struct timespec *abstime;  /* version 5 syntax */

     int
     pthread_cond_wait (cond, mutex)
       pthread_cond_t *cond;
       pthread_mutex_t *mutex;

     int
     pthread_mutex_destroy (mutex)
       pthread_mutex_t *mutex;

     int
     pthread_mutex_init (mutex, attr)
       pthread_mutex_t *mutex;
       pthread_mutexattr_t attr;

     int
     pthread_mutex_lock (mutex)
       pthread_mutex_t *mutex;

     int
     pthread_mutex_trylock (mutex) /* returns 0 if owned */
       pthread_mutex_t *mutex      /* by current thread  */
                                   /* (ver 5) versus     */
                                   /* -1 (ver 3)         */

     int
     pthread_mutex_unlock (mutex)
       pthread_mutex_t *mutex;

     int
     pthread_cancel (thread)
       pthread_thread_t thread;

     int
     pthread_setasynccancel (state) /* May only set async */
                                    /* cancel off!!       */
        int  state;                 /* Async Cancels not  */
                                    /* supported.         */

     int
     pthread_setcancel (state)
        int  state;

     void
     pthread_testcancel ()

     int
     pthread_keycreate (key, destructor) /* version 5 syntax.*/
       pthread_key_t *key;               /* The destructor is*/
       void (*destructor) ()             /* now called when  */
                                         /* thread exits!    */

     int
     pthread_getspecific (key, value) /* version 4 semantics */
       pthread_key_t key;
       void **value;

     int
     pthread_setspecific (key, value) /* version 4 semantics */
       pthread_key_t key;
       void *value;

     int
     pthread_once (once_block, init_routine)
       pthread_once_t *once_block;
       void (*init_routine)();

     pthread_thread_t
     pthread_self ()

     void
     pthread_yield ()

     int
     pthread_attr_create (attr)
       pthread_attr_t *attr;

     int
     pthread_attr_delete (attr)
       pthread_attr_t *attr;

     int
     pthread_attr_setstacksize (attr, stacksize)
       pthread_attr_t *attr;
       long stacksize;

     int
     pthread_create (thread, attr, start_routine, arg)
       pthread_thread_t  *thread;
       pthread_attr_t attr; /* attr IGNORED! */
       pthread_
       void *(*start_routine) ();
       void *arg;

     int
     pthread_join (thread, exit_status)
       pthread_thread_t  thread;
       void **exit_status;

     int
     pthread_detach (thread)
       pthread_thread_t  *thread;

     pthread_exit (exit_status)
        void *exit_status;

     int
     pthread_get_expiration_np (delta, abstime)
       struct timespec    *delta;
       struct timespec    *abstime;

     int
     pthread_delay_np (interval)
       struct timespec  *interval;

The following macros are defined in pthread.h to register and unregister
per-thread cleanup handlers:

     pthread_cleanup_push(routine_parm, arg_parm)

     pthread_cleanup_pop(exception)



MPE/iX 5.0 Express III Documentation