Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ thread_startup(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)

threadp_init(3T)

threadp_set(3T)

threadp_get(3T)

THREAD_STARTUP(3T)                   SysV                   THREAD_STARTUP(3T)



NAME
     thread_startup  - start a new thread

SYNOPSIS
     include <apollo/thread.h>
     kern_return_t thread_startup(thread_id, stack_size, pc, arg)
     thread_t thread_id;
     long stack_size;
     void *pc;
     void *arg;

DESCRIPTION
     thread_startup is the primary convenience routine to start a new thread.
     It requires that the new thread be created before thread_startup is
     called.  It also requires that the new thread still be in the state that
     it was left in by thread_create.  After thread_startup returns, the new
     thread will have a user stack, and will be started running at the
     specified pc.

     This call must be used to start any thread that intends to run as a full
     application-visible thread.  It sets up internal state on the user stack
     and elsewhere that allows fork(3T), exec(2), and exit(2) to work.

     The arguments are as follows:

     thread_id The id of a thread that has been created using thread_create,
               but has not yet run.

     stack_size1
               The size of the user stack to be associated with this thread.
               This size will be rounded up to a multiple of a segment size, a
               guard segment will be added at the bottom, and an invalid
               segment will be added at the top.

     pc        The address of the entry point of the new thread.

     arg       An anonymous value to pass to the new thread.  It may be
               anything and does not have to be a pointer.


     Data Structures
     The data structures are defined as follows:

     thread_t
          The basic thread id.  This is a black box value that is not
          significant outside the thread system.  It is guaranteed that no two
          active threads on a node will have the same thread id.

     kern_return_t
          An enumeration of the possible values a system call can return.  It
          indicates the success or failure of the call.  It will either be
          [KERN_SUCCESS] to indicate that the call succeeded, or some other
          value to describe the reason for the failure.

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), threadp_init(3T),
     threadp_set(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 part of the intermediate Pthreads layer: the layer of calls
     below the applications interface.

     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