From 2a7175600aaffd371a98653a5fd752bf9c726a99 Mon Sep 17 00:00:00 2001
From: Daniel Krueger <daniel.krueger@systec-electronic.com>
Date: Fri, 28 Nov 2014 10:57:04 +0000
Subject: [PATCH 2/6] testsuites/psxtimer01: Adapt to posix timer signal
forwarding change
Timer signals are forwarded to all threads now, so we need distinct
signals for the different threads.
Signed-off-by: Daniel Krueger <daniel.krueger@systec-electronic.com>
---
testsuites/psxtests/psxtimer01/psxtimer.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/testsuites/psxtests/psxtimer01/psxtimer.c b/testsuites/psxtests/psxtimer01/psxtimer.c
index 032e9f8..4cf5370 100644
a
|
b
|
void *POSIX_Init ( |
350 | 350 | /* mask signal */ |
351 | 351 | sigemptyset (&set); |
352 | 352 | sigaddset (&set,SIGALRM); |
| 353 | sigaddset (&set,SIGRTMIN); |
| 354 | sigaddset (&set,SIGRTMIN+1); |
353 | 355 | pthread_sigmask (SIG_BLOCK,&set,NULL); |
354 | 356 | |
355 | 357 | /* set mutex attributes */ |
… |
… |
void *POSIX_Init ( |
421 | 423 | params_b.period.tv_sec = 2; /* seconds */ |
422 | 424 | params_b.period.tv_nsec = 000000000; /* nanoseconds */ |
423 | 425 | params_b.count = 10; |
424 | | params_b.signo = SIGALRM; |
| 426 | params_b.signo = SIGRTMIN; |
425 | 427 | if (pthread_create (&tb, &attr, task_b, ¶ms_b) != 0) { |
426 | 428 | perror ("Error in thread create for task b\n"); |
427 | 429 | } |
… |
… |
void *POSIX_Init ( |
437 | 439 | params_c.period.tv_sec = 3; /* seconds */ |
438 | 440 | params_c.period.tv_nsec = 000000000; /* nanoseconds */ |
439 | 441 | params_c.count = 6; |
440 | | params_c.signo = SIGALRM; |
| 442 | params_c.signo = SIGRTMIN+1; |
441 | 443 | if (pthread_create (&tc, &attr, task_c, ¶ms_c) != 0) { |
442 | 444 | perror ("Error in thread create for task c\n"); |
443 | 445 | } |
… |
… |
void *POSIX_Init ( |
450 | 452 | params_c1.period.tv_sec = 0; /* seconds */ |
451 | 453 | params_c1.period.tv_nsec = 500000000; /* nanoseconds */ |
452 | 454 | params_c1.count = 6; |
453 | | params_c1.signo = SIGALRM; |
| 455 | params_c1.signo = SIGRTMIN+1; |
454 | 456 | if (pthread_create (&tc1, &attr, task_c, ¶ms_c1) != 0) { |
455 | 457 | perror ("Error in thread create for task c1\n"); |
456 | 458 | } |