summaryrefslogtreecommitdiff
path: root/linuxthreads
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2001-04-21 18:45:05 +0000
committerAndreas Jaeger <aj@suse.de>2001-04-21 18:45:05 +0000
commitf9e1d149b3315e4710512f37a14d3dc407ea1223 (patch)
tree5f753da23a3a99f46d55935027490eb24328be76 /linuxthreads
parent159a2e1a65da49f65f7acd8147bebc247e904d81 (diff)
* sysdeps/pthread/timer_routines.c (thread_func): Add
noreturn attribute, remove statements that will never be executed. * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn attribute, remove statements that will never be executed.
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/ChangeLog3
-rw-r--r--linuxthreads/sysdeps/pthread/timer_routines.c7
2 files changed, 8 insertions, 2 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index d25798318a..a43d4acd46 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,5 +1,8 @@
2001-04-21 Andreas Jaeger <aj@suse.de>
+ * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
+ attribute, remove statements that will never be executed.
+
* manager.c (__pthread_manager): Add noreturn
attribute.
(pthread_start_thread): Likewise, remove return statement.
diff --git a/linuxthreads/sysdeps/pthread/timer_routines.c b/linuxthreads/sysdeps/pthread/timer_routines.c
index d23c27ecaf..71bc6dd814 100644
--- a/linuxthreads/sysdeps/pthread/timer_routines.c
+++ b/linuxthreads/sysdeps/pthread/timer_routines.c
@@ -1,5 +1,5 @@
/* Helper code for POSIX timer implementation on LinuxThreads.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Kaz Kylheku <kaz@ashi.footprints.net>.
@@ -370,6 +370,7 @@ thread_expire_timer (struct thread_node *self, struct timer_node *timer)
timers in chronological order as close to their scheduled time as
possible. */
static void *
+__attribute__ ((noreturn))
thread_func (void *arg)
{
struct thread_node *self = arg;
@@ -437,11 +438,13 @@ thread_func (void *arg)
else
pthread_cond_wait (&self->cond, &__timer_mutex);
}
-
+ /* These statements will never be executed since the while loop
+ loops forever:
pthread_mutex_unlock (&__timer_mutex);
pthread_cleanup_pop (1);
return NULL;
+ */
}