+2014-03-20 Pedro Alves <palves@redhat.com>
+
+ * gdb.threads/signal-while-stepping-over-bp-other-thread.c (pid):
+ Delete.
+ (block_signals, unblock_signals): Delete.
+ (child_function_2, main): Remove references to deleted variable
+ and functions.
+
2014-03-20 Pedro Alves <palves@redhat.com>
* gdb.threads/signal-while-stepping-over-bp-other-thread.c (main):
unsigned int args[2];
-pid_t pid;
pthread_barrier_t barrier;
pthread_t child_thread_2, child_thread_3;
{
}
-void
-block_signals (void)
-{
- sigset_t mask;
-
- sigfillset (&mask);
- sigprocmask (SIG_BLOCK, &mask, NULL);
-}
-
-void
-unblock_signals (void)
-{
- sigset_t mask;
-
- sigfillset (&mask);
- sigprocmask (SIG_UNBLOCK, &mask, NULL);
-}
-
void *
child_function_3 (void *arg)
{
int my_number = (long) arg;
volatile int *myp = (int *) &args[my_number];
- unblock_signals ();
-
pthread_barrier_wait (&barrier);
while (*myp > 0)
int res;
long i;
- /* Block signals in all threads but one, so that we're sure which
- thread gets the signal we send from the command line. */
- block_signals ();
-
signal (SIGUSR1, handler);
/* Call these early so that PLTs for these are resolved soon,
pthread_barrier_init (&barrier, NULL, 2);
- /* The test uses this global to know where to send the signal
- to. */
- pid = getpid ();
-
i = 0;
args[i] = 1;
res = pthread_create (&child_thread_2,