* tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
find a random value.
(tf_msgrcv): Likewise. Also don't report msgrcv returns if
errno==EIDRM.
2003-06-18 Ulrich Drepper <drepper@redhat.com>
+ * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
+ find a random value.
+ (tf_msgrcv): Likewise. Also don't report msgrcv returns if
+ errno==EIDRM.
+
* sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
compat_timer_settime.
* sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
long int type;
char mem[10];
} m;
- msgrcv (tempmsg, (struct msgbuf *) &m, 10, 100, 0);
+ int randnr;
+ /* We need a positive random number. */
+ do
+ randnr = random ();
+ while (randnr <= 0);
+ do
+ {
+ errno = 0;
+ msgrcv (tempmsg, (struct msgbuf *) &m, 10, randnr, 0);
+ }
+ while (errno == EIDRM);
pthread_cleanup_pop (0);
long int type;
char mem[1];
} m;
- m.type = 100;
+ /* We need a positive random number. */
+ do
+ m.type = random ();
+ while (m.type <= 0);
msgsnd (tempmsg, (struct msgbuf *) &m, sizeof (m.mem), 0);
pthread_cleanup_pop (0);