projects
/
librseq.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
mempool: Introduce rseq_mempool_get_max_nr_cpus
[librseq.git]
/
src
/
rseq-mempool.c
diff --git
a/src/rseq-mempool.c
b/src/rseq-mempool.c
index a7f57d634e8c1620433c3282a60245f84f06605f..d0ed49290ce996b58036cee37ad13185b69a0821 100644
(file)
--- a/
src/rseq-mempool.c
+++ b/
src/rseq-mempool.c
@@
-872,3
+872,12
@@
int rseq_mempool_attr_set_global(struct rseq_mempool_attr *attr,
attr->max_nr_cpus = 0;
return 0;
}
+
+int rseq_mempool_get_max_nr_cpus(struct rseq_mempool *mempool)
+{
+ if (!mempool || mempool->attr.type != MEMPOOL_TYPE_PERCPU) {
+ errno = EINVAL;
+ return -1;
+ }
+ return mempool->attr.max_nr_cpus;
+}
This page took
0.023147 seconds
and
4
git commands to generate.