mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Map error codes.
This commit is contained in:
parent
4a7d1ec880
commit
599d598411
@ -196,13 +196,13 @@ PR_IMPLEMENT(PRInt32) PR_GetNumberOfProcessors( void )
|
||||
rc = sysctl( mib, 2, &numCpus, &len, NULL, 0 );
|
||||
if ( -1 == rc ) {
|
||||
numCpus = -1; /* set to -1 for return value on error */
|
||||
PR_SetError( PR_UNKNOWN_ERROR, _MD_ERRNO());
|
||||
_PR_MD_MAP_DEFAULT_ERROR( _MD_ERRNO() );
|
||||
}
|
||||
#elif defined(HPUX)
|
||||
numCpus = mpctl( MPC_GETNUMSPUS, 0, 0 );
|
||||
if ( numCpus < 1 ) {
|
||||
numCpus = -1; /* set to -1 for return value on error */
|
||||
PR_SetError( PR_UNKNOWN_ERROR, _MD_ERRNO());
|
||||
_PR_MD_MAP_DEFAULT_ERROR( _MD_ERRNO() );
|
||||
}
|
||||
#elif defined(IRIX)
|
||||
numCpus = sysconf( _SC_NPROC_ONLN );
|
||||
|
Loading…
Reference in New Issue
Block a user