media01: Scale with processor count

This commit is contained in:
Sebastian Huber 2016-11-23 14:06:26 +01:00
parent 91fb6e3753
commit 1e554b8193

View File

@ -29,6 +29,8 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#include <sys/param.h>
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -59,8 +61,8 @@ struct rtems_ftpd_configuration rtems_ftpd_configuration = {
/* Root for FTPD or NULL for "/" */ /* Root for FTPD or NULL for "/" */
.root = NULL, .root = NULL,
/* Max. connections */ /* Max. connections depending on processor count */
.tasks_count = 4, .tasks_count = 0,
/* Idle timeout in seconds or 0 for no (infinite) timeout */ /* Idle timeout in seconds or 0 for no (infinite) timeout */
.idle = 5 * 60, .idle = 5 * 60,
@ -140,6 +142,8 @@ test_main(void)
int rv; int rv;
rtems_status_code sc; rtems_status_code sc;
rtems_ftpd_configuration.tasks_count = MAX(4,
rtems_get_processor_count());
rv = rtems_initialize_ftpd(); rv = rtems_initialize_ftpd();
assert(rv == 0); assert(rv == 0);