OSDN Git Service

Remove an unused DalvikNativeMethod.
authorElliott Hughes <enh@google.com>
Fri, 18 Mar 2011 17:57:13 +0000 (10:57 -0700)
committerElliott Hughes <enh@google.com>
Fri, 18 Mar 2011 18:07:38 +0000 (11:07 -0700)
Bug: 3107501
Change-Id: I9aa3f8b87d7d6d7a4d02e2a4a75b539864c2d4eb

vm/native/java_lang_Runtime.c

index 2ac50ee..b5c6a33 100644 (file)
@@ -118,26 +118,6 @@ static void Dalvik_java_lang_Runtime_runFinalization(const u4* args,
 }
 
 /*
- * public int availableProcessors()
- *
- * Returns the number of online processors, at least one.
- *
- */
-static void Dalvik_java_lang_Runtime_availableProcessors(const u4* args,
-    JValue* pResult)
-{
-    long result = 1;
-#ifdef _SC_NPROCESSORS_ONLN
-    result = sysconf(_SC_NPROCESSORS_ONLN);
-    if (result > INT_MAX) {
-        result = INT_MAX;
-    } else if (result < 1 ) {
-        result = 1;
-    }
-#endif
-    RETURN_INT((int)result);
-}
-/*
  * public long maxMemory()
  *
  * Returns GC heap max memory in bytes.
@@ -180,8 +160,6 @@ const DalvikNativeMethod dvm_java_lang_Runtime[] = {
         Dalvik_java_lang_Runtime_freeMemory },
     { "gc",                 "()V",
         Dalvik_java_lang_Runtime_gc },
-    { "availableProcessors", "()I",
-        Dalvik_java_lang_Runtime_availableProcessors },
     { "maxMemory",          "()J",
         Dalvik_java_lang_Runtime_maxMemory },
     { "nativeExit",         "(IZ)V",