Browse Source

Change estimated error code when thread spawning fails

pull/10/head
AzureMarker 3 years ago
parent
commit
27a5601020
No known key found for this signature in database
GPG Key ID: 47A133F3BF9D03D3
  1. 4
      src/lib.rs

4
src/lib.rs

@ -57,10 +57,10 @@ pub unsafe extern "C" fn pthread_create( @@ -57,10 +57,10 @@ pub unsafe extern "C" fn pthread_create(
if handle.is_null() {
// There was some error, but libctru doesn't expose the result.
// We assume there was an incorrect parameter (such as too low of a priority).
// We assume there was permissions issue (such as too low of a priority).
// We also need to clean up the closure at this time.
drop(Box::from_raw(main));
return libc::EINVAL;
return libc::EPERM;
}
*native = handle as _;

Loading…
Cancel
Save