run: limit created threads in test

The rm_session quota of the context area is not sufficient to start more
then ~95 threads per address space. If one really needs so many threads per
address space one could increase the quota or dynamically respond to it using
the Expanding_rm_session class. Until now there is no need to support so much
threads per address space.

Issue #1122
This commit is contained in:
Alexander Boettcher 2014-04-29 10:57:39 +02:00 committed by Norman Feske
parent 9fd6034e94
commit 0b04f9de25
1 changed files with 5 additions and 1 deletions

View File

@ -51,7 +51,7 @@ static void test_context_alloc()
* Create HELPER threads, which concurrently create CHILDREN threads each. * Create HELPER threads, which concurrently create CHILDREN threads each.
* This most likely triggers any race in the thread-context allocation. * This most likely triggers any race in the thread-context allocation.
*/ */
enum { HELPER = 10, CHILDREN = 10 }; enum { HELPER = 10, CHILDREN = 9 };
Helper<CHILDREN> helper[HELPER]; Helper<CHILDREN> helper[HELPER];
@ -166,6 +166,7 @@ struct Cpu_helper : Thread<0x1000>
} }
}; };
static void test_cpu_session() static void test_cpu_session()
{ {
Cpu_helper thread0("prio high ", env()->cpu_session()); Cpu_helper thread0("prio high ", env()->cpu_session());
@ -183,8 +184,11 @@ static void test_cpu_session()
thread2.join(); thread2.join();
} }
int main() int main()
{ {
printf("--- thread test started ---\n");
try { try {
test_context_alloc(); test_context_alloc();
test_stack_alignment(); test_stack_alignment();