Commit cc3835e6 by Loren J. Rittle Committed by Loren J. Rittle

* java/lang/natObject.cc (is_mp): Protect use of _SC_NPROCESSORS_ONLN.

From-SVN: r44771
parent d67c7dd8
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> 2001-08-06 Tom Tromey <tromey@redhat.com>
* java/io/InputStreamReader.java (refill): Only call refill on * 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 */ ...@@ -436,8 +436,12 @@ typedef size_t obj_addr_t; /* Integer type big enough for object */
static bool static bool
is_mp() is_mp()
{ {
#ifdef _SC_NPROCESSORS_ONLN
long nprocs = sysconf(_SC_NPROCESSORS_ONLN); long nprocs = sysconf(_SC_NPROCESSORS_ONLN);
return (nprocs > 1); return (nprocs > 1);
#else
return false;
#endif
} }
// A call to keep_live(p) forces p to be accessible to the GC // A call to keep_live(p) forces p to be accessible to the GC
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment