tests: helpers: limit stack size to EVL default
All tests run mlocked, so make sure to commit and lock a reasonably small amount of RAM for thread stacks (i.e. smaller than the glibc default value).
This commit is contained in:
parent
438dcd1363
commit
321da2e177
|
@ -11,6 +11,7 @@
|
|||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
#include <evl/thread.h>
|
||||
#include "helpers.h"
|
||||
|
||||
char *get_unique_name_and_path(const char *type,
|
||||
|
@ -38,6 +39,7 @@ void new_thread(pthread_t *tid, int policy, int prio,
|
|||
|
||||
pthread_attr_init(&attr);
|
||||
param.sched_priority = prio;
|
||||
pthread_attr_setstacksize(&attr, EVL_STACK_DEFAULT);
|
||||
pthread_attr_setschedpolicy(&attr, policy);
|
||||
pthread_attr_setschedparam(&attr, ¶m);
|
||||
pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
|
||||
|
|
Loading…
Reference in New Issue