summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread/thr_clean.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1997-02-05 23:26:09 +0000
committerjulian <julian@FreeBSD.org>1997-02-05 23:26:09 +0000
commitc2f7c3e4893b6b5c4494d549b3645e06664bc1b1 (patch)
treeb2e6d3017e236268263978b585f2150cd10b1689 /lib/libpthread/thread/thr_clean.c
parent321f03c8eddd8cf5aa81836ff1932a74156d30cb (diff)
downloadFreeBSD-src-c2f7c3e4893b6b5c4494d549b3645e06664bc1b1.zip
FreeBSD-src-c2f7c3e4893b6b5c4494d549b3645e06664bc1b1.tar.gz
Submitted by: John Birrell
uthreads update from the author.
Diffstat (limited to 'lib/libpthread/thread/thr_clean.c')
-rw-r--r--lib/libpthread/thread/thr_clean.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/libpthread/thread/thr_clean.c b/lib/libpthread/thread/thr_clean.c
index 99893f6..9319f85 100644
--- a/lib/libpthread/thread/thr_clean.c
+++ b/lib/libpthread/thread/thr_clean.c
@@ -37,11 +37,10 @@
#include <pthread.h>
#include "pthread_private.h"
-int
-_thread_cleanup_push(void (*routine) (void *), void *routine_arg)
+void
+pthread_cleanup_push(void (*routine) (void *), void *routine_arg)
{
struct pthread_cleanup *new;
- int ret;
if ((new = (struct pthread_cleanup *) malloc(sizeof(struct pthread_cleanup))) != NULL) {
new->routine = routine;
@@ -49,15 +48,11 @@ _thread_cleanup_push(void (*routine) (void *), void *routine_arg)
new->next = _thread_run->cleanup;
_thread_run->cleanup = new;
- ret = 0;
- } else {
- ret = ENOMEM;
}
- return (ret);
}
void
-_thread_cleanup_pop(int execute)
+pthread_cleanup_pop(int execute)
{
struct pthread_cleanup *old;
OpenPOWER on IntegriCloud