From 3fe95cdb5a4c48d3b6606ffb1f60fae3e375fdff Mon Sep 17 00:00:00 2001
From: Seif Lotfy <seif@lotfy.com>
Date: Tue, 4 Mar 2014 20:55:53 +0100
Subject: [PATCH 07/12] Replace get_nprocs_conf with g_get_num_processors()
---
libzeitgeist/log.vala | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libzeitgeist/log.vala b/libzeitgeist/log.vala
index 02b16ca..f0b65cb 100644
--- a/libzeitgeist/log.vala
+++ b/libzeitgeist/log.vala
@@ -40,6 +40,7 @@
* Zeitgeist also comes with a blacklist extension to make sure the user
* always stays in control of what information is logged.
*/
+
namespace Zeitgeist
{
@@ -58,8 +59,8 @@ namespace Zeitgeist
*/
public class Log : QueuedProxyWrapper
{
- [CCode (cheader_filename = "sys/sysinfo.h", cname = "get_nprocs_conf")]
- extern static int get_nprocs_conf ();
+ [CCode (cname = "g_get_num_processors")]
+ private extern static uint get_num_processors ();
class DbWorker
{
@@ -141,7 +142,7 @@ public class Log : QueuedProxyWrapper
try {
threads = new ThreadPool<DbWorker>.with_owned_data ((worker) => {
worker.run ();
- }, get_nprocs_conf (), true);
+ }, (int) get_num_processors (), true);
} catch (ThreadError err) {
warning ("%s", err.message);
threads = null;
@@ -637,4 +638,3 @@ public class Log : QueuedProxyWrapper
}
-// vim:expandtab:ts=4:sw=4
--
2.0.4