From b17961208efc8c732b99939813e596ac1debf332 Mon Sep 17 00:00:00 2001 From: joncham Date: Thu, 14 Sep 2006 15:44:09 +0000 Subject: [PATCH] 2006-09-14 Jonathan Chambers * Environment.cs (ProcessorCount): Implement as icall. Patch by Jason McFall. git-svn-id: svn+ssh://mono-cvs.ximian.com/source/trunk/mcs@65407 e3ebcda4-bce8-0310-ba0a-eca2169e7518 --- class/corlib/System/ChangeLog | 5 +++++ class/corlib/System/Environment.cs | 10 +++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/class/corlib/System/ChangeLog b/class/corlib/System/ChangeLog index 366f1655ed..25aa5f1b1d 100644 --- a/class/corlib/System/ChangeLog +++ b/class/corlib/System/ChangeLog @@ -1,3 +1,8 @@ +2006-09-14 Jonathan Chambers + + * Environment.cs (ProcessorCount): Implement as icall. + Patch by Jason McFall. + 2006-09-05 Raja R Harinath * DateTime.cs (Today) [NET_2_0]: Set kind to Local. diff --git a/class/corlib/System/Environment.cs b/class/corlib/System/Environment.cs index 22e281231b..7323df4fd7 100644 --- a/class/corlib/System/Environment.cs +++ b/class/corlib/System/Environment.cs @@ -621,14 +621,10 @@ namespace System { [MethodImplAttribute (MethodImplOptions.InternalCall)] internal static extern void InternalSetEnvironmentVariable (string variable, string value); - [MonoTODO] - public static int ProcessorCount { + public static extern int ProcessorCount { [EnvironmentPermission (SecurityAction.Demand, Read="NUMBER_OF_PROCESSORS")] - get { - // note: Changes to the NUMBER_OF_PROCESSORS environment variable - // under Windows doesn't affect the (good) value returned. - throw new NotImplementedException (); - } + [MethodImplAttribute (MethodImplOptions.InternalCall)] + get; } [MonoTODO ("not much documented")] -- 2.11.4.GIT