mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-05-13 23:59:18 +08:00
media01: Scale with processor count
This commit is contained in:
parent
91fb6e3753
commit
1e554b8193
@ -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);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user