aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2001-04-21 18:41:05 +0000
committerAndreas Jaeger <aj@suse.de>2001-04-21 18:41:05 +0000
commit159a2e1a65da49f65f7acd8147bebc247e904d81 (patch)
tree7b96beb3c7384d71bfa85518c122080d7a74b2dd /linuxthreads
parente6dcf35202903067d84f0da7ee997679ccf293c6 (diff)
downloadglibc-159a2e1a65da49f65f7acd8147bebc247e904d81.tar
glibc-159a2e1a65da49f65f7acd8147bebc247e904d81.tar.gz
glibc-159a2e1a65da49f65f7acd8147bebc247e904d81.tar.bz2
glibc-159a2e1a65da49f65f7acd8147bebc247e904d81.zip
Update.
* manager.c (__pthread_manager): Add noreturn attribute. (pthread_start_thread): Likewise, remove return statement. (pthread_start_thread_event): Likewise. Add noreturn attribute for pthread_handle_exit. * weaks.c: Add noreturn attribute for pthread_exit.
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/ChangeLog7
-rw-r--r--linuxthreads/manager.c18
-rw-r--r--linuxthreads/weaks.c5
3 files changed, 22 insertions, 8 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 40056baaba..d25798318a 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,5 +1,12 @@
2001-04-21 Andreas Jaeger <aj@suse.de>
+ * manager.c (__pthread_manager): Add noreturn
+ attribute.
+ (pthread_start_thread): Likewise, remove return statement.
+ (pthread_start_thread_event): Likewise.
+ Add noreturn attribute for pthread_handle_exit.
+ * weaks.c: Add noreturn attribute for pthread_exit.
+
* internals.h: Add __pthread_clock_gettime and
__pthread_clock_settime prototypes.
diff --git a/linuxthreads/manager.c b/linuxthreads/manager.c
index dbe2aa2d19..3d24218307 100644
--- a/linuxthreads/manager.c
+++ b/linuxthreads/manager.c
@@ -96,13 +96,16 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr,
int report_events,
td_thr_events_t *event_maskp);
static void pthread_handle_free(pthread_t th_id);
-static void pthread_handle_exit(pthread_descr issuing_thread, int exitcode);
+static void pthread_handle_exit(pthread_descr issuing_thread, int exitcode)
+ __attribute__ ((noreturn));
static void pthread_reap_children(void);
static void pthread_kill_all_threads(int sig, int main_thread_also);
/* The server thread managing requests for thread creation and termination */
-int __pthread_manager(void *arg)
+int
+__attribute__ ((noreturn))
+__pthread_manager(void *arg)
{
int reqfd = (int) (long int) arg;
struct pollfd ufd;
@@ -220,7 +223,9 @@ int __pthread_manager_event(void *arg)
/* Process creation */
-static int pthread_start_thread(void *arg)
+static int
+__attribute__ ((noreturn))
+pthread_start_thread(void *arg)
{
pthread_descr self = (pthread_descr) arg;
struct pthread_request request;
@@ -270,10 +275,11 @@ static int pthread_start_thread(void *arg)
p_start_args.arg));
/* Exit with the given return value */
__pthread_do_exit(outcome, CURRENT_STACK_FRAME);
- return 0;
}
-static int pthread_start_thread_event(void *arg)
+static int
+__attribute__ ((noreturn))
+pthread_start_thread_event(void *arg)
{
pthread_descr self = (pthread_descr) arg;
@@ -289,7 +295,7 @@ static int pthread_start_thread_event(void *arg)
__pthread_unlock (THREAD_GETMEM(self, p_lock));
/* Continue with the real function. */
- return pthread_start_thread (arg);
+ pthread_start_thread (arg);
}
static int pthread_allocate_stack(const pthread_attr_t *attr,
diff --git a/linuxthreads/weaks.c b/linuxthreads/weaks.c
index 948b893095..036e004612 100644
--- a/linuxthreads/weaks.c
+++ b/linuxthreads/weaks.c
@@ -1,5 +1,5 @@
/* The weak pthread functions for Linux.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,7 +26,8 @@
extern int __pthread_return_0 (void);
extern int __pthread_return_1 (void);
extern void __pthread_return_void (void);
-extern void weak_function pthread_exit (void *__retval);
+extern void weak_function pthread_exit (void *__retval)
+ __attribute__ ((noreturn));
/* Those are pthread functions which return 0 if successful. */
weak_alias (__pthread_return_0, BP_SYM (__libc_pthread_attr_init_2_1))