mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Update.
2003-07-01 Ulrich Drepper <drepper@redhat.com> * libc-cancellation.c (__libc_cleanup_routine): Define. * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define. (__pthread_cleanup_pop): Define.
This commit is contained in:
@ -1 +1 @@
|
|||||||
NPTL 0.50 by Ulrich Drepper
|
NPTL 0.51 by Ulrich Drepper
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2003-07-01 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* libc-cancellation.c (__libc_cleanup_routine): Define.
|
||||||
|
* sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
|
||||||
|
(__pthread_cleanup_pop): Define.
|
||||||
|
|
||||||
2003-07-01 Richard Henderson <rth@redhat.com>
|
2003-07-01 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
* sysdeps/alpha/elf/pt-initfini.c: New file.
|
* sysdeps/alpha/elf/pt-initfini.c: New file.
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "pthreadP.h"
|
#include "pthreadP.h"
|
||||||
#include "atomic.h"
|
#include "atomic.h"
|
||||||
|
#include <bits/libc-lock.h>
|
||||||
|
|
||||||
|
|
||||||
#ifndef NOT_IN_libc
|
#ifndef NOT_IN_libc
|
||||||
@ -103,4 +104,12 @@ __libc_disable_asynccancel (int oldtype)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
__libc_cleanup_routine (struct __pthread_cleanup_frame *f)
|
||||||
|
{
|
||||||
|
if (f->__do_it)
|
||||||
|
f->__cancel_routine (f->__cancel_arg);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -389,6 +389,27 @@ extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *buffer
|
|||||||
} else if (DOIT) \
|
} else if (DOIT) \
|
||||||
_buffer.__routine (_buffer.__arg)
|
_buffer.__routine (_buffer.__arg)
|
||||||
|
|
||||||
|
|
||||||
|
/* Normal cleanup handling, based on C cleanup attribute. */
|
||||||
|
extern inline void
|
||||||
|
__libc_cleanup_routine (struct __pthread_cleanup_frame *f)
|
||||||
|
{
|
||||||
|
if (f->__do_it)
|
||||||
|
f->__cancel_routine (f->__cancel_arg);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define __pthread_cleanup_push(fct, arg) \
|
||||||
|
do { \
|
||||||
|
struct __pthread_cleanup_frame __clframe \
|
||||||
|
__attribute__ ((__cleanup__ (__libc_cleanup_routine))) \
|
||||||
|
= { .__cancel_routine = (routine), .__cancel_arg = (arg), \
|
||||||
|
.__do_it = 1 };
|
||||||
|
|
||||||
|
#define __pthread_cleanup_pop(execute) \
|
||||||
|
__clframe.__do_it = (execute); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
/* Create thread-specific key. */
|
/* Create thread-specific key. */
|
||||||
#define __libc_key_create(KEY, DESTRUCTOR) \
|
#define __libc_key_create(KEY, DESTRUCTOR) \
|
||||||
__libc_ptf_call (__pthread_key_create, (KEY, DESTRUCTOR), 1)
|
__libc_ptf_call (__pthread_key_create, (KEY, DESTRUCTOR), 1)
|
||||||
|
Reference in New Issue
Block a user