[rtems-libbsd commit] media01: Scale with processor count
Sebastian Huber
sebh at rtems.org
Mon Oct 23 07:27:50 UTC 2017
Module: rtems-libbsd
Branch: master
Commit: 1e554b8193d9dfe5f438b7f70d4b960ddcf918f7
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=1e554b8193d9dfe5f438b7f70d4b960ddcf918f7
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Nov 23 14:06:26 2016 +0100
media01: Scale with processor count
---
testsuite/media01/test_main.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/testsuite/media01/test_main.c b/testsuite/media01/test_main.c
index b808ad6..d09efd7 100644
--- a/testsuite/media01/test_main.c
+++ b/testsuite/media01/test_main.c
@@ -29,6 +29,8 @@
* SUCH DAMAGE.
*/
+#include <sys/param.h>
+
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
@@ -59,8 +61,8 @@ struct rtems_ftpd_configuration rtems_ftpd_configuration = {
/* Root for FTPD or NULL for "/" */
.root = NULL,
- /* Max. connections */
- .tasks_count = 4,
+ /* Max. connections depending on processor count */
+ .tasks_count = 0,
/* Idle timeout in seconds or 0 for no (infinite) timeout */
.idle = 5 * 60,
@@ -140,6 +142,8 @@ test_main(void)
int rv;
rtems_status_code sc;
+ rtems_ftpd_configuration.tasks_count = MAX(4,
+ rtems_get_processor_count());
rv = rtems_initialize_ftpd();
assert(rv == 0);
More information about the vc
mailing list