|
1 | 1 | #if os(OSX) || os(iOS) || os(tvOS) || os(watchOS)
|
2 | 2 | /// Enumeration describing Mach error codes.
|
3 | 3 | @objc public enum MachErrorCode : Int32 {
|
4 |
| - case KERN_SUCCESS = 0 |
| 4 | + case success = 0 |
5 | 5 |
|
6 | 6 | /// Specified address is not currently valid.
|
7 |
| - case KERN_INVALID_ADDRESS = 1 |
| 7 | + case invalidAddress = 1 |
8 | 8 |
|
9 | 9 | /// Specified memory is valid, but does not permit the required
|
10 | 10 | /// forms of access.
|
11 |
| - case KERN_PROTECTION_FAILURE = 2 |
| 11 | + case protectionFailure = 2 |
12 | 12 |
|
13 | 13 | /// The address range specified is already in use, or no address
|
14 | 14 | /// range of the size specified could be found.
|
15 |
| - case KERN_NO_SPACE = 3 |
| 15 | + case noSpace = 3 |
16 | 16 |
|
17 | 17 | /// The function requested was not applicable to this type of
|
18 | 18 | /// argument, or an argument is invalid.
|
19 |
| - case KERN_INVALID_ARGUMENT = 4 |
| 19 | + case invalidArgument = 4 |
20 | 20 |
|
21 | 21 | /// The function could not be performed. A catch-all.
|
22 |
| - case KERN_FAILURE = 5 |
| 22 | + case failure = 5 |
23 | 23 |
|
24 | 24 | /// A system resource could not be allocated to fulfill this
|
25 | 25 | /// request. This failure may not be permanent.
|
26 |
| - case KERN_RESOURCE_SHORTAGE = 6 |
| 26 | + case resourceShortage = 6 |
27 | 27 |
|
28 | 28 | /// The task in question does not hold receive rights for the port
|
29 | 29 | /// argument.
|
30 |
| - case KERN_NOT_RECEIVER = 7 |
| 30 | + case notReceiver = 7 |
31 | 31 |
|
32 | 32 | /// Bogus access restriction.
|
33 |
| - case KERN_NO_ACCESS = 8 |
| 33 | + case noAccess = 8 |
34 | 34 |
|
35 | 35 | /// During a page fault, the target address refers to a memory
|
36 | 36 | /// object that has been destroyed. This failure is permanent.
|
37 |
| - case KERN_MEMORY_FAILURE = 9 |
| 37 | + case memoryFailure = 9 |
38 | 38 |
|
39 | 39 | /// During a page fault, the memory object indicated that the data
|
40 | 40 | /// could not be returned. This failure may be temporary; future
|
41 | 41 | /// attempts to access this same data may succeed, as defined by the
|
42 | 42 | /// memory object.
|
43 |
| - case KERN_MEMORY_ERROR = 10 |
| 43 | + case memoryError = 10 |
44 | 44 |
|
45 | 45 | /// The receive right is already a member of the portset.
|
46 |
| - case KERN_ALREADY_IN_SET = 11 |
| 46 | + case alreadyInSet = 11 |
47 | 47 |
|
48 | 48 | /// The receive right is not a member of a port set.
|
49 |
| - case KERN_NOT_IN_SET = 12 |
| 49 | + case notInSet = 12 |
50 | 50 |
|
51 | 51 | /// The name already denotes a right in the task.
|
52 |
| - case KERN_NAME_EXISTS = 13 |
| 52 | + case nameExists = 13 |
53 | 53 |
|
54 | 54 | /// The operation was aborted. Ipc code will catch this and reflect
|
55 | 55 | /// it as a message error.
|
56 |
| - case KERN_ABORTED = 14 |
| 56 | + case aborted = 14 |
57 | 57 |
|
58 | 58 | /// The name doesn't denote a right in the task.
|
59 |
| - case KERN_INVALID_NAME = 15 |
| 59 | + case invalidName = 15 |
60 | 60 |
|
61 | 61 | /// Target task isn't an active task.
|
62 |
| - case KERN_INVALID_TASK = 16 |
| 62 | + case invalidTask = 16 |
63 | 63 |
|
64 | 64 | /// The name denotes a right, but not an appropriate right.
|
65 |
| - case KERN_INVALID_RIGHT = 17 |
| 65 | + case invalidRight = 17 |
66 | 66 |
|
67 | 67 | /// A blatant range error.
|
68 |
| - case KERN_INVALID_VALUE = 18 |
| 68 | + case invalidValue = 18 |
69 | 69 |
|
70 | 70 | /// Operation would overflow limit on user-references.
|
71 |
| - case KERN_UREFS_OVERFLOW = 19 |
| 71 | + case userReferencesOverflow = 19 |
72 | 72 |
|
73 | 73 | /// The supplied (port) capability is improper.
|
74 |
| - case KERN_INVALID_CAPABILITY = 20 |
| 74 | + case invalidCapability = 20 |
75 | 75 |
|
76 | 76 | /// The task already has send or receive rights for the port under
|
77 | 77 | /// another name.
|
78 |
| - case KERN_RIGHT_EXISTS = 21 |
| 78 | + case rightExists = 21 |
79 | 79 |
|
80 | 80 | /// Target host isn't actually a host.
|
81 |
| - case KERN_INVALID_HOST = 22 |
| 81 | + case invalidHost = 22 |
82 | 82 |
|
83 | 83 | /// An attempt was made to supply "precious" data for memory that is
|
84 | 84 | /// already present in a memory object.
|
85 |
| - case KERN_MEMORY_PRESENT = 23 |
| 85 | + case memoryPresent = 23 |
86 | 86 |
|
87 | 87 | /// A page was requested of a memory manager via
|
88 | 88 | /// memory_object_data_request for an object using a
|
|
94 | 94 | /// delivered via memory_object_data_error and is handled by the
|
95 | 95 | /// kernel (it forces the kernel to restart the fault). It will not
|
96 | 96 | /// be seen by users.
|
97 |
| - case KERN_MEMORY_DATA_MOVED = 24 |
| 97 | + case memoryDataMoved = 24 |
98 | 98 |
|
99 | 99 | /// A strategic copy was attempted of an object upon which a quicker
|
100 | 100 | /// copy is now possible. The caller should retry the copy using
|
101 | 101 | /// vm_object_copy_quickly. This error code is seen only by the
|
102 | 102 | /// kernel.
|
103 |
| - case KERN_MEMORY_RESTART_COPY = 25 |
| 103 | + case memoryRestartCopy = 25 |
104 | 104 |
|
105 | 105 | /// An argument applied to assert processor set privilege was not a
|
106 | 106 | /// processor set control port.
|
107 |
| - case KERN_INVALID_PROCESSOR_SET = 26 |
| 107 | + case invalidProcessorSet = 26 |
108 | 108 |
|
109 | 109 | /// The specified scheduling attributes exceed the thread's limits.
|
110 |
| - case KERN_POLICY_LIMIT = 27 |
| 110 | + case policyLimit = 27 |
111 | 111 |
|
112 | 112 | /// The specified scheduling policy is not currently enabled for the
|
113 | 113 | /// processor set.
|
114 |
| - case KERN_INVALID_POLICY = 28 |
| 114 | + case invalidPolicy = 28 |
115 | 115 |
|
116 | 116 | /// The external memory manager failed to initialize the memory object.
|
117 |
| - case KERN_INVALID_OBJECT = 29 |
| 117 | + case invalidObject = 29 |
118 | 118 |
|
119 | 119 | /// A thread is attempting to wait for an event for which there is
|
120 | 120 | /// already a waiting thread.
|
121 |
| - case KERN_ALREADY_WAITING = 30 |
| 121 | + case alreadyWaiting = 30 |
122 | 122 |
|
123 | 123 | /// An attempt was made to destroy the default processor set.
|
124 |
| - case KERN_DEFAULT_SET = 31 |
| 124 | + case defaultSet = 31 |
125 | 125 |
|
126 | 126 | /// An attempt was made to fetch an exception port that is
|
127 | 127 | /// protected, or to abort a thread while processing a protected
|
128 | 128 | /// exception.
|
129 |
| - case KERN_EXCEPTION_PROTECTED = 32 |
| 129 | + case exceptionProtected = 32 |
130 | 130 |
|
131 | 131 | /// A ledger was required but not supplied.
|
132 |
| - case KERN_INVALID_LEDGER = 33 |
| 132 | + case invalidLedger = 33 |
133 | 133 |
|
134 | 134 | /// The port was not a memory cache control port.
|
135 |
| - case KERN_INVALID_MEMORY_CONTROL = 34 |
| 135 | + case invalidMemoryControl = 34 |
136 | 136 |
|
137 | 137 | /// An argument supplied to assert security privilege was not a host
|
138 | 138 | /// security port.
|
139 |
| - case KERN_INVALID_SECURITY = 35 |
| 139 | + case invalidSecurity = 35 |
140 | 140 |
|
141 | 141 | /// thread_depress_abort was called on a thread which was not
|
142 | 142 | /// currently depressed.
|
143 |
| - case KERN_NOT_DEPRESSED = 36 |
| 143 | + case notDepressed = 36 |
144 | 144 |
|
145 | 145 | /// Object has been terminated and is no longer available.
|
146 |
| - case KERN_TERMINATED = 37 |
| 146 | + case terminated = 37 |
147 | 147 |
|
148 | 148 | /// Lock set has been destroyed and is no longer available.
|
149 |
| - case KERN_LOCK_SET_DESTROYED = 38 |
| 149 | + case lockSetDestroyed = 38 |
150 | 150 |
|
151 | 151 | /// The thread holding the lock terminated before releasing the lock.
|
152 |
| - case KERN_LOCK_UNSTABLE = 39 |
| 152 | + case lockUnstable = 39 |
153 | 153 |
|
154 | 154 | /// The lock is already owned by another thread.
|
155 |
| - case KERN_LOCK_OWNED = 40 |
| 155 | + case lockOwned = 40 |
156 | 156 |
|
157 | 157 | /// The lock is already owned by the calling thread.
|
158 |
| - case KERN_LOCK_OWNED_SELF = 41 |
| 158 | + case lockOwnedSelf = 41 |
159 | 159 |
|
160 | 160 | /// Semaphore has been destroyed and is no longer available.
|
161 |
| - case KERN_SEMAPHORE_DESTROYED = 42 |
| 161 | + case semaphoreDestroyed = 42 |
162 | 162 |
|
163 | 163 | /// Return from RPC indicating the target server was terminated
|
164 | 164 | /// before it successfully replied.
|
165 |
| - case KERN_RPC_SERVER_TERMINATED = 43 |
| 165 | + case rpcServerTerminated = 43 |
166 | 166 |
|
167 | 167 | /// Terminate an orphaned activation.
|
168 |
| - case KERN_RPC_TERMINATE_ORPHAN = 44 |
| 168 | + case rpcTerminateOrphan = 44 |
169 | 169 |
|
170 | 170 | /// Allow an orphaned activation to continue executing.
|
171 |
| - case KERN_RPC_CONTINUE_ORPHAN = 45 |
| 171 | + case rpcContinueOrphan = 45 |
172 | 172 |
|
173 | 173 | /// Empty thread activation (No thread linked to it).
|
174 |
| - case KERN_NOT_SUPPORTED = 46 |
| 174 | + case notSupported = 46 |
175 | 175 |
|
176 | 176 | /// Remote node down or inaccessible.
|
177 |
| - case KERN_NODE_DOWN = 47 |
| 177 | + case nodeDown = 47 |
178 | 178 |
|
179 | 179 | /// A signalled thread was not actually waiting.
|
180 |
| - case KERN_NOT_WAITING = 48 |
| 180 | + case notWaiting = 48 |
181 | 181 |
|
182 | 182 | /// Some thread-oriented operation (semaphore_wait) timed out.
|
183 |
| - case KERN_OPERATION_TIMED_OUT = 49 |
| 183 | + case operationTimedOut = 49 |
184 | 184 |
|
185 | 185 | /// During a page fault, indicates that the page was rejected as a
|
186 | 186 | /// result of a signature check.
|
187 |
| - case KERN_CODESIGN_ERROR = 50 |
| 187 | + case codesignError = 50 |
188 | 188 |
|
189 | 189 | /// The requested property cannot be changed at this time.
|
190 |
| - case KERN_POLICY_STATIC = 51 |
| 190 | + case policyStatic = 51 |
191 | 191 | }
|
192 | 192 | #endif // os(OSX) || os(iOS) || os(tvOS) || os(watchOS)
|
0 commit comments