summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristopher Davis <chrisd@torproject.org>2010-08-28 04:07:48 -0700
committerChristopher Davis <chrisd@torproject.org>2010-09-08 01:22:22 -0700
commit2447fe88860c40e968261ad8ea059166cb84a280 (patch)
tree35c57c9b079c34137fb2677856f7d59cea85f317 /include
parent499452f4c24f172bf6846599e3886838a4207aca (diff)
downloadlibevent-2447fe88860c40e968261ad8ea059166cb84a280.tar.gz
Add event_config_set_num_cpus_hint for tuning thread pools, etc.
Diffstat (limited to 'include')
-rw-r--r--include/event2/event.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/event2/event.h b/include/event2/event.h
index e9d0048f..fa0f625d 100644
--- a/include/event2/event.h
+++ b/include/event2/event.h
@@ -227,6 +227,16 @@ int event_config_require_features(struct event_config *cfg, int feature);
int event_config_set_flag(struct event_config *cfg, int flag);
/**
+ * Records a hint for the number of CPUs in the system. This is used for
+ * tuning thread pools, etc, for optimal performance.
+ *
+ * @param cfg the event configuration object
+ * @param cpus the number of cpus
+ * @return 0 on success, -1 on failure.
+ */
+int event_config_set_num_cpus_hint(struct event_config *cfg, int cpus);
+
+/**
Initialize the event API.
Use event_base_new_with_config() to initialize a new event base, taking