[gimp] app: remove gimp_get_number_of_processors(), use g_get_num_processors()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: remove gimp_get_number_of_processors(), use g_get_num_processors()
- Date: Sat, 25 May 2013 20:51:27 +0000 (UTC)
commit a7dc8d4429ab76fc67e95703a8ee3ed40a8bb7fc
Author: Michael Natterer <mitch gimp org>
Date: Sat May 25 22:50:23 2013 +0200
app: remove gimp_get_number_of_processors(), use g_get_num_processors()
app/config/gimpgeglconfig.c | 2 +-
app/core/gimp-utils.c | 21 ---------------------
app/core/gimp-utils.h | 1 -
3 files changed, 1 insertions(+), 23 deletions(-)
---
diff --git a/app/config/gimpgeglconfig.c b/app/config/gimpgeglconfig.c
index fa7dc5b..9d5f712 100644
--- a/app/config/gimpgeglconfig.c
+++ b/app/config/gimpgeglconfig.c
@@ -128,7 +128,7 @@ gimp_gegl_config_class_init (GimpGeglConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
- num_processors = gimp_get_number_of_processors ();
+ num_processors = g_get_num_processors ();
#ifdef GIMP_UNSTABLE
num_processors = num_processors * 2;
diff --git a/app/core/gimp-utils.c b/app/core/gimp-utils.c
index 181ac12..7fdc303 100644
--- a/app/core/gimp-utils.c
+++ b/app/core/gimp-utils.c
@@ -330,27 +330,6 @@ gimp_get_pid (void)
return (gint) getpid ();
}
-gint
-gimp_get_number_of_processors (void)
-{
- gint retval = NUM_PROCESSORS_DEFAULT;
-
-#ifdef G_OS_UNIX
-#if defined(HAVE_UNISTD_H) && defined(_SC_NPROCESSORS_ONLN)
- retval = sysconf (_SC_NPROCESSORS_ONLN);
-#endif
-#endif
-#ifdef G_OS_WIN32
- SYSTEM_INFO system_info;
-
- GetSystemInfo (&system_info);
-
- retval = system_info.dwNumberOfProcessors;
-#endif
-
- return retval;
-}
-
guint64
gimp_get_physical_memory_size (void)
{
diff --git a/app/core/gimp-utils.h b/app/core/gimp-utils.h
index 8857050..3165155 100644
--- a/app/core/gimp-utils.h
+++ b/app/core/gimp-utils.h
@@ -59,7 +59,6 @@ gint64 gimp_parasite_get_memsize (GimpParasite *parasite,
gint64 *gui_size);
gint gimp_get_pid (void);
-gint gimp_get_number_of_processors (void);
guint64 gimp_get_physical_memory_size (void);
gchar * gimp_get_backtrace (void);
gchar * gimp_get_default_language (const gchar *category);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]