From 16984701aa5165b77f229cc318e8025ee8cf81b5 Mon Sep 17 00:00:00 2001 From: Mystery Man Date: Mon, 14 May 2001 14:17:54 +0000 Subject: This commit was manufactured by cvs2svn to create branch 'dietlibc'. --- .../dietlibc/libpthread/pthread_cleanup_push.c | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 mdk-stage1/dietlibc/libpthread/pthread_cleanup_push.c (limited to 'mdk-stage1/dietlibc/libpthread/pthread_cleanup_push.c') diff --git a/mdk-stage1/dietlibc/libpthread/pthread_cleanup_push.c b/mdk-stage1/dietlibc/libpthread/pthread_cleanup_push.c new file mode 100644 index 000000000..cd2aabf71 --- /dev/null +++ b/mdk-stage1/dietlibc/libpthread/pthread_cleanup_push.c @@ -0,0 +1,23 @@ +#include +#include + +#include +#include "thread_internal.h" + +void pthread_cleanup_push(void (*func)(void*), void *arg) +{ + _pthread_descr this; + int i; + + __THREAD_INIT(); + + this = __thread_self(); + + for (i=0; icleanup_stack[i].func==0) { + this->cleanup_stack[i].func=func; + this->cleanup_stack[i].arg=arg; + break; + } + } +} -- cgit v1.2.1