Skip to content

Commit fcd5d07

Browse files
committed
[Grand renaming] Rename MachError constants to lowerCamelCase.
1 parent c78aa11 commit fcd5d07

File tree

3 files changed

+157
-157
lines changed

3 files changed

+157
-157
lines changed
Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,88 @@
11
#if os(OSX) || os(iOS) || os(tvOS) || os(watchOS)
22
/// Enumeration describing Mach error codes.
33
@objc public enum MachErrorCode : Int32 {
4-
case KERN_SUCCESS = 0
4+
case success = 0
55

66
/// Specified address is not currently valid.
7-
case KERN_INVALID_ADDRESS = 1
7+
case invalidAddress = 1
88

99
/// Specified memory is valid, but does not permit the required
1010
/// forms of access.
11-
case KERN_PROTECTION_FAILURE = 2
11+
case protectionFailure = 2
1212

1313
/// The address range specified is already in use, or no address
1414
/// range of the size specified could be found.
15-
case KERN_NO_SPACE = 3
15+
case noSpace = 3
1616

1717
/// The function requested was not applicable to this type of
1818
/// argument, or an argument is invalid.
19-
case KERN_INVALID_ARGUMENT = 4
19+
case invalidArgument = 4
2020

2121
/// The function could not be performed. A catch-all.
22-
case KERN_FAILURE = 5
22+
case failure = 5
2323

2424
/// A system resource could not be allocated to fulfill this
2525
/// request. This failure may not be permanent.
26-
case KERN_RESOURCE_SHORTAGE = 6
26+
case resourceShortage = 6
2727

2828
/// The task in question does not hold receive rights for the port
2929
/// argument.
30-
case KERN_NOT_RECEIVER = 7
30+
case notReceiver = 7
3131

3232
/// Bogus access restriction.
33-
case KERN_NO_ACCESS = 8
33+
case noAccess = 8
3434

3535
/// During a page fault, the target address refers to a memory
3636
/// object that has been destroyed. This failure is permanent.
37-
case KERN_MEMORY_FAILURE = 9
37+
case memoryFailure = 9
3838

3939
/// During a page fault, the memory object indicated that the data
4040
/// could not be returned. This failure may be temporary; future
4141
/// attempts to access this same data may succeed, as defined by the
4242
/// memory object.
43-
case KERN_MEMORY_ERROR = 10
43+
case memoryError = 10
4444

4545
/// The receive right is already a member of the portset.
46-
case KERN_ALREADY_IN_SET = 11
46+
case alreadyInSet = 11
4747

4848
/// The receive right is not a member of a port set.
49-
case KERN_NOT_IN_SET = 12
49+
case notInSet = 12
5050

5151
/// The name already denotes a right in the task.
52-
case KERN_NAME_EXISTS = 13
52+
case nameExists = 13
5353

5454
/// The operation was aborted. Ipc code will catch this and reflect
5555
/// it as a message error.
56-
case KERN_ABORTED = 14
56+
case aborted = 14
5757

5858
/// The name doesn't denote a right in the task.
59-
case KERN_INVALID_NAME = 15
59+
case invalidName = 15
6060

6161
/// Target task isn't an active task.
62-
case KERN_INVALID_TASK = 16
62+
case invalidTask = 16
6363

6464
/// The name denotes a right, but not an appropriate right.
65-
case KERN_INVALID_RIGHT = 17
65+
case invalidRight = 17
6666

6767
/// A blatant range error.
68-
case KERN_INVALID_VALUE = 18
68+
case invalidValue = 18
6969

7070
/// Operation would overflow limit on user-references.
71-
case KERN_UREFS_OVERFLOW = 19
71+
case userReferencesOverflow = 19
7272

7373
/// The supplied (port) capability is improper.
74-
case KERN_INVALID_CAPABILITY = 20
74+
case invalidCapability = 20
7575

7676
/// The task already has send or receive rights for the port under
7777
/// another name.
78-
case KERN_RIGHT_EXISTS = 21
78+
case rightExists = 21
7979

8080
/// Target host isn't actually a host.
81-
case KERN_INVALID_HOST = 22
81+
case invalidHost = 22
8282

8383
/// An attempt was made to supply "precious" data for memory that is
8484
/// already present in a memory object.
85-
case KERN_MEMORY_PRESENT = 23
85+
case memoryPresent = 23
8686

8787
/// A page was requested of a memory manager via
8888
/// memory_object_data_request for an object using a
@@ -94,99 +94,99 @@
9494
/// delivered via memory_object_data_error and is handled by the
9595
/// kernel (it forces the kernel to restart the fault). It will not
9696
/// be seen by users.
97-
case KERN_MEMORY_DATA_MOVED = 24
97+
case memoryDataMoved = 24
9898

9999
/// A strategic copy was attempted of an object upon which a quicker
100100
/// copy is now possible. The caller should retry the copy using
101101
/// vm_object_copy_quickly. This error code is seen only by the
102102
/// kernel.
103-
case KERN_MEMORY_RESTART_COPY = 25
103+
case memoryRestartCopy = 25
104104

105105
/// An argument applied to assert processor set privilege was not a
106106
/// processor set control port.
107-
case KERN_INVALID_PROCESSOR_SET = 26
107+
case invalidProcessorSet = 26
108108

109109
/// The specified scheduling attributes exceed the thread's limits.
110-
case KERN_POLICY_LIMIT = 27
110+
case policyLimit = 27
111111

112112
/// The specified scheduling policy is not currently enabled for the
113113
/// processor set.
114-
case KERN_INVALID_POLICY = 28
114+
case invalidPolicy = 28
115115

116116
/// The external memory manager failed to initialize the memory object.
117-
case KERN_INVALID_OBJECT = 29
117+
case invalidObject = 29
118118

119119
/// A thread is attempting to wait for an event for which there is
120120
/// already a waiting thread.
121-
case KERN_ALREADY_WAITING = 30
121+
case alreadyWaiting = 30
122122

123123
/// An attempt was made to destroy the default processor set.
124-
case KERN_DEFAULT_SET = 31
124+
case defaultSet = 31
125125

126126
/// An attempt was made to fetch an exception port that is
127127
/// protected, or to abort a thread while processing a protected
128128
/// exception.
129-
case KERN_EXCEPTION_PROTECTED = 32
129+
case exceptionProtected = 32
130130

131131
/// A ledger was required but not supplied.
132-
case KERN_INVALID_LEDGER = 33
132+
case invalidLedger = 33
133133

134134
/// The port was not a memory cache control port.
135-
case KERN_INVALID_MEMORY_CONTROL = 34
135+
case invalidMemoryControl = 34
136136

137137
/// An argument supplied to assert security privilege was not a host
138138
/// security port.
139-
case KERN_INVALID_SECURITY = 35
139+
case invalidSecurity = 35
140140

141141
/// thread_depress_abort was called on a thread which was not
142142
/// currently depressed.
143-
case KERN_NOT_DEPRESSED = 36
143+
case notDepressed = 36
144144

145145
/// Object has been terminated and is no longer available.
146-
case KERN_TERMINATED = 37
146+
case terminated = 37
147147

148148
/// Lock set has been destroyed and is no longer available.
149-
case KERN_LOCK_SET_DESTROYED = 38
149+
case lockSetDestroyed = 38
150150

151151
/// The thread holding the lock terminated before releasing the lock.
152-
case KERN_LOCK_UNSTABLE = 39
152+
case lockUnstable = 39
153153

154154
/// The lock is already owned by another thread.
155-
case KERN_LOCK_OWNED = 40
155+
case lockOwned = 40
156156

157157
/// The lock is already owned by the calling thread.
158-
case KERN_LOCK_OWNED_SELF = 41
158+
case lockOwnedSelf = 41
159159

160160
/// Semaphore has been destroyed and is no longer available.
161-
case KERN_SEMAPHORE_DESTROYED = 42
161+
case semaphoreDestroyed = 42
162162

163163
/// Return from RPC indicating the target server was terminated
164164
/// before it successfully replied.
165-
case KERN_RPC_SERVER_TERMINATED = 43
165+
case rpcServerTerminated = 43
166166

167167
/// Terminate an orphaned activation.
168-
case KERN_RPC_TERMINATE_ORPHAN = 44
168+
case rpcTerminateOrphan = 44
169169

170170
/// Allow an orphaned activation to continue executing.
171-
case KERN_RPC_CONTINUE_ORPHAN = 45
171+
case rpcContinueOrphan = 45
172172

173173
/// Empty thread activation (No thread linked to it).
174-
case KERN_NOT_SUPPORTED = 46
174+
case notSupported = 46
175175

176176
/// Remote node down or inaccessible.
177-
case KERN_NODE_DOWN = 47
177+
case nodeDown = 47
178178

179179
/// A signalled thread was not actually waiting.
180-
case KERN_NOT_WAITING = 48
180+
case notWaiting = 48
181181

182182
/// Some thread-oriented operation (semaphore_wait) timed out.
183-
case KERN_OPERATION_TIMED_OUT = 49
183+
case operationTimedOut = 49
184184

185185
/// During a page fault, indicates that the page was rejected as a
186186
/// result of a signature check.
187-
case KERN_CODESIGN_ERROR = 50
187+
case codesignError = 50
188188

189189
/// The requested property cannot be changed at this time.
190-
case KERN_POLICY_STATIC = 51
190+
case policyStatic = 51
191191
}
192192
#endif // os(OSX) || os(iOS) || os(tvOS) || os(watchOS)

0 commit comments

Comments
 (0)