FileDocCategorySizeDatePackage
CPUSupport.javaAPI DocExample2171Thu Feb 04 16:10:38 GMT 1999None

CPUSupport

public class CPUSupport extends Object

Fields Summary
static boolean
loaded
Constructors Summary
Methods Summary
public static intgetConcurrency()

	 
		try {
			System.loadLibrary("CPUSupportWin");
			loaded = true;
		} catch (Error e) {
			try {
					System.loadLibrary("CPUSupportSolaris");
				loaded = true;
			} catch (Error err) {
				System.err.println("Warning: No platform library for CPUSupport");
			}
		}
	
		if (!loaded)
			// Assume green threads
			return 1;
		return getConcurrencyN();
	
private static native intgetConcurrencyN()

public static intgetNumProcessors()

		if (!loaded)
			// Assume green threads
			return 1;
		return getNumProcessorsN();
	
private static native intgetNumProcessorsN()

public static voidsetConcurrency(int n)

		if (loaded)
			setConcurrencyN(n);
	
private static native voidsetConcurrencyN(int i)