* java/lang/natObject.cc (is_mp): Protect use of _SC_NPROCESSORS_ONLN.
From-SVN: r44771
This commit is contained in:
parent
d67c7dd855
commit
cc3835e651
2 changed files with 8 additions and 0 deletions
|
@ -436,8 +436,12 @@ typedef size_t obj_addr_t; /* Integer type big enough for object */
|
|||
static bool
|
||||
is_mp()
|
||||
{
|
||||
#ifdef _SC_NPROCESSORS_ONLN
|
||||
long nprocs = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
return (nprocs > 1);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
// A call to keep_live(p) forces p to be accessible to the GC
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue