The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/man/thread_assign.man

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 .\" 
    2 .\" Mach Operating System
    3 .\" Copyright (c) 1991,1990 Carnegie Mellon University
    4 .\" All Rights Reserved.
    5 .\" 
    6 .\" Permission to use, copy, modify and distribute this software and its
    7 .\" documentation is hereby granted, provided that both the copyright
    8 .\" notice and this permission notice appear in all copies of the
    9 .\" software, derivative works or modified versions, and any portions
   10 .\" thereof, and that both notices appear in supporting documentation.
   11 .\" 
   12 .\" CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   13 .\" CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
   14 .\" ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   15 .\" 
   16 .\" Carnegie Mellon requests users of this software to return to
   17 .\" 
   18 .\"  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   19 .\"  School of Computer Science
   20 .\"  Carnegie Mellon University
   21 .\"  Pittsburgh PA 15213-3890
   22 .\" 
   23 .\" any improvements or extensions that they make and grant Carnegie Mellon
   24 .\" the rights to redistribute these changes.
   25 .\" 
   26 .\" 
   27 .\" HISTORY
   28 .\" $Log:       thread_assign.man,v $
   29 .\" Revision 2.4  91/05/14  17:13:47  mrt
   30 .\"     Correcting copyright
   31 .\" 
   32 .\" Revision 2.3  91/02/14  14:15:08  mrt
   33 .\"     Changed to new Mach copyright
   34 .\"     [91/02/12  18:15:58  mrt]
   35 .\" 
   36 .\" Revision 2.2  90/08/07  18:45:06  rpd
   37 .\"     Created.
   38 .\" 
   39 .TH thread_assign 2 8/13/89
   40 .CM 4
   41 .SH NAME
   42 .nf
   43 thread_assign  \-  assign thread to processor set
   44 thread_assign_default  \-  assign thread to default processor set
   45 thread_get_assignment  \-  get processor set to which thread is assigned
   46 .SH SYNOPSIS
   47 .nf
   48 .ft B
   49 #include <mach.h>
   50 
   51 .nf
   52 .ft B
   53 kern_return_t thread_assign(thread, processor_set)
   54         thread_t        thread;
   55         processor_set_t processor_set;
   56 
   57 
   58 .fi
   59 .ft P
   60 .nf
   61 .ft B
   62 kern_return_t thread_assign_default(thread)
   63         thread_t        thread;
   64 
   65 
   66 .fi
   67 .ft P
   68 .nf
   69 .ft B
   70 kern_return_t thread_get_assignment(thread, processor_set)
   71         thread_t                thread;
   72         processor_set_name_t    *processor_set;
   73 
   74 
   75 
   76 .fi
   77 .ft P
   78 .SH ARGUMENTS
   79 .TP 15
   80 .B
   81 thread
   82 The thread to be assigned.
   83 .TP 15
   84 .B
   85 processor_set
   86 The processor set to assign it to.
   87 
   88 .SH DESCRIPTION
   89 .B thread_assign
   90 assigns 
   91 .B thread
   92 the the set 
   93 .B processor_set.
   94 After the assignment is completed, the thread only executes on processors
   95 assigned to the designated processor set.  If there are no such processors,
   96 then the thread is unable to execute.  Any previous assignment of
   97 the thread is nullified.  Unix system call compatibility code may
   98 temporarily force threads to execute on the master processor.
   99 
  100 .B thread_assign_default
  101 is a variant of 
  102 .B thread_assign
  103 that assigns the thread to the default processor set.  This variant exists
  104 because the control port for the default processor set is privileged and
  105 therefore not available to most users.
  106 
  107 .B thread_get_assignment
  108 returns the name of the processor set to which the thread is currently
  109 assigned.  This port can only be used to obtain information about the
  110 processor set.
  111 
  112 .SH DIAGNOSTICS
  113 .TP 25
  114 KERN_SUCCESS
  115 The assignment has been performed.
  116 .TP 25
  117 KERN_INVALID_ARGUMENT
  118 .B thread
  119 is not a thread, or 
  120 .B processor_set
  121 is not a processor_set on the same host as 
  122 .B thread.
  123 .TP 25
  124 KERN_INVALID_ADDRESS
  125 .B processor_set
  126 points to inaccessible memory (thread_get_assignment only).
  127 
  128 .SH BUGS
  129 Availability limited.
  130 
  131 .SH SEE ALSO
  132 .B processor_set_create, processor_set_info, processor_assign, task_assign
  133 ,
  134 .B host_processor_set_priv
  135 

Cache object: eef7485f24eadd91a417f40d9edb105f


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.