summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeif Lotfy <seif@lotfy.com>2014-03-04 20:55:53 +0100
committerSeif Lotfy <seif@lotfy.com>2014-03-04 20:55:53 +0100
commit3fe95cdb5a4c48d3b6606ffb1f60fae3e375fdff (patch)
tree17b6bd2488da47c15af6a1f8597636a2602cf50d
parentb1e82de434a7b63fe1290d0051de58350b069991 (diff)
Replace get_nprocs_conf with g_get_num_processors()
-rw-r--r--libzeitgeist/log.vala8
1 files changed, 4 insertions, 4 deletions
diff --git a/libzeitgeist/log.vala b/libzeitgeist/log.vala
index 02b16ca9..f0b65cb4 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