* java/lang/natObject.cc (is_mp): Protect use of _SC_NPROCESSORS_ONLN.
From-SVN: r44771
This commit is contained in:
parent
d67c7dd855
commit
cc3835e651
@ -1,3 +1,7 @@
|
||||
2001-08-10 Loren J. Rittle <ljrittle@acm.org>
|
||||
|
||||
* java/lang/natObject.cc (is_mp): Protect use of _SC_NPROCESSORS_ONLN.
|
||||
|
||||
2001-08-06 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* java/io/InputStreamReader.java (refill): Only call refill on
|
||||
|
@ -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…
Reference in New Issue
Block a user