]>
git.saurik.com Git - apple/libpthread.git/blob - pthread/spawn.h
2 * Copyright (c) 2014 Apple Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
24 #ifndef _PTHREAD_SPAWN_H
25 #define _PTHREAD_SPAWN_H
28 * @group posix_spawn QOS class support
29 * Apple extensions to posix_spawn(2) and posix_spawnp(2)
32 #include <pthread/pthread.h>
38 * @function posix_spawnattr_set_qos_class_np
41 * Sets the QOS class property of a posix_spawn attributes object, which may be
42 * used to specify the QOS class a process should be spawned with.
45 * The QOS class specified at the time of process spawn determines both the
46 * initial requested QOS class of the main thread in the new process, and the
47 * interpretation by the system of all QOS class values requested by threads in
51 * The spawn attributes object to modify.
56 * - QOS_CLASS_BACKGROUND
57 * EINVAL will be returned if any other value is provided.
60 * Zero if successful, otherwise an errno value.
62 __API_AVAILABLE(macos(10.10), ios(8.0))
64 posix_spawnattr_set_qos_class_np(posix_spawnattr_t
* __restrict __attr
,
65 qos_class_t __qos_class
);
68 * @function posix_spawnattr_get_qos_class_np
71 * Gets the QOS class property of a posix_spawn attributes object.
74 * The spawn attributes object to inspect.
77 * On output, a QOS class value:
79 * - QOS_CLASS_BACKGROUND
80 * - QOS_CLASS_UNSPECIFIED
83 * Zero if successful, otherwise an errno value.
85 __API_AVAILABLE(macos(10.10), ios(8.0))
87 posix_spawnattr_get_qos_class_np(const posix_spawnattr_t
*__restrict __attr
,
88 qos_class_t
* __restrict __qos_class
);
92 #endif // _PTHREAD_SPAWN_H