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_suspend.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_suspend.man,v $
   29 .\" Revision 2.5  93/03/18  15:16:28  mrt
   30 .\"     corrected types
   31 .\"     [93/03/12  16:55:03  lli]
   32 .\" 
   33 .\" Revision 2.4  91/05/14  17:14:48  mrt
   34 .\"     Correcting copyright
   35 .\" 
   36 .\" Revision 2.3  91/02/14  14:15:45  mrt
   37 .\"     Changed to new Mach copyright
   38 .\"     [91/02/12  18:16:36  mrt]
   39 .\" 
   40 .\" Revision 2.2  90/08/07  18:46:45  rpd
   41 .\"     Created.
   42 .\" 
   43 .TH thread_suspend 2 1/22/88
   44 .CM 4
   45 .SH NAME
   46 .nf
   47 thread_suspend  \-  suspends specified thread
   48 .SH SYNOPSIS
   49 .nf
   50 .ft B
   51 #include <mach.h>
   52 
   53 .nf
   54 .ft B
   55 kern_return_t thread_suspend(target_thread);
   56         mach_port_t     target_thread;
   57 
   58 
   59 .fi
   60 .ft P
   61 .SH ARGUMENTS
   62 .TP 15
   63 .B
   64 target_thread
   65 The thread to be suspended.
   66 
   67 .SH DESCRIPTION
   68 
   69 Increments the thread's suspend count and prevents the thread
   70 from executing any more user level instructions. In this context
   71 a user level instruction is either a machine instruction executed
   72 in user mode or a system trap instruction including page faults. 
   73 Thus if a thread is currently executing within a system trap
   74 the kernel code may continue to execute until it reaches the
   75 system return code or it may supend within the kernel code. In either
   76 case, when the thread is resumed the
   77 system trap will return. This could cause unpredictible results if
   78 the user did a suspend and then altered the user state of the thread
   79 in order to change its direction upon a resume. The call 
   80 .B thread_abort
   81 is provided to allow the user to abort any system call that is in progress
   82 in a predictable way.
   83 
   84 The suspend count may become
   85 greater than one with the effect that it will take more 
   86 than one resume call to restart the thread.
   87 
   88 .SH DIAGNOSTICS
   89 .TP 25
   90 KERN_SUCCESS
   91 The thread has been suspended.
   92 .TP 25
   93 KERN_INVALID_ARGUMENT
   94 .B target_thread
   95 is not a thread.
   96 
   97 .SH SEE ALSO
   98 .B task_suspend, task_resume,
   99 .B thread_info, thread_state,
  100 .B thread_resume, thread_terminate, thread_abort
  101 

Cache object: 8dd359d7128c75b220734a06b6a0e827


[ 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.