You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The real implementation has logic in two places:
169
+
// * in userland at https://github.com/apple-oss-distributions/libpthread/blob/c032e0b076700a0a47db75528a282b8d3a06531a/src/pthread.c#L1178-L1200,
170
+
// * in kernel at https://github.com/apple-oss-distributions/xnu/blob/8d741a5de7ff4191bf97d57b9f54c2f6d4a15585/bsd/kern/proc_info.c#L3218-L3227.
171
+
//
172
+
// The function in libc calls the kernel to validate
173
+
// the security policies and the input. If all of the requirements
174
+
// are met, then the name is set and 0 is returned. Otherwise, if
175
+
// the specified name is lomnger than MAXTHREADNAMESIZE, then
176
+
// ENAMETOOLONG is returned.
177
+
//
178
+
// FIXME: the real implementation maybe returns ESRCH if the thread ID is invalid.
167
179
let thread = this.pthread_self()?;
168
-
let max_len = this.eval_libc("MAXTHREADNAMESIZE").to_target_usize(this)?;
0 commit comments