Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ threadp_set(3T) — sys5 — Apollo Domain/OS SR10.4.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

thread_create(3T)

thread_terminate(3T)

thread_suspend(3T)

thread_resume(3T)

thread_abort(3T)

thread_self(3T)

thread_info(3T)

thread_state(3T)

thread_set_priority(3T)

thread_handle_signals(3T)

thread_inhibit(3T)

thread_cleanup(3T)

thread_startup(3T)

threadp_init(3T)

threadp_get(3T)

THREADP_SET(3T)                      SysV                      THREADP_SET(3T)



NAME
     threadp_set - set the per-thread data for current thread

SYNOPSIS
     include <apollo/thread_private.h>
     void threadp_set(key, ptr)
     threadp_key_t key;
     void *ptr;

DESCRIPTION
     This call sets the per-thread data for the current thread in the context
     specified by the key.

     The arguments are as follows:

     key    The key associated with this context.

     ptr    A pointer to the per-thread context to be associated with this
            thread.  Note that it need not point to a valid memory location
            (that is, it is not dereferenced).

     Data Type
     The data type for Per-Thread-Storage manager calls is defined as follows:

     threadp_key_t
          This is the key assigned for the context created.  It is returned by
          threadp_init, and must be shared between all threads using this
          particular context.

SEE ALSO
     thread_create(3T), thread_terminate(3T), thread_suspend(3T),
     thread_resume(3T), thread_abort(3T), thread_self(3T), thread_info(3T),
     thread_state(3T), thread_set_priority(3T), thread_handle_signals(3T),
     thread_inhibit(3T), thread_cleanup(3T), thread_startup(3T),
     threadp_init(3T), threadp_get(3T)

     Section (3P) pthread calls (IEEE P1003.4a) calls
     Domain System Software Release Notes, Software Release 10.4

NOTES
     This call is one of the Per-Thread-Storage manager calls; these calls are
     useful for some thread implementations. The Per-Thread Storage mechanism
     allows per-thread context to be stored and retrieved simply. The context
     is created using threadp_init and a key is associated with it.

     Each thread that wishes to use this context must then allocate its
     private data, then call threadp_set with a pointer to it (or the data
     itself if it is no larger than a pointer).  After this is accomplished,
     all calls to threadp_get with this key will produce the context for the
     current thread.

     This call is provided solely for compatibility with the Mach operating
     system. New applications should use the Pthread interface instead.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026