Add g_get_num_processors()

Based on a patch from John Cupitt <jcupitt@gmail.com>

Useful for thread pools which should scale to number of processors.

See https://bugzilla.gnome.org/show_bug.cgi?id=687223

https://bugzilla.gnome.org/show_bug.cgi?id=614930
This commit is contained in:
Colin Walters
2012-12-17 10:47:53 -05:00
parent ed5accf16c
commit 2149b29468
5 changed files with 69 additions and 4 deletions

View File

@@ -650,6 +650,9 @@ g_pointer_bit_lock
g_pointer_bit_trylock
g_pointer_bit_unlock
<SUBSECTION>
g_get_num_processors
<SUBSECTION Private>
G_LOCK_NAME
atexit