1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2025-04-01 11:52:18 +02:00

Include <signal.h>. Remove include of <tdep.h>.

(mutex_init): New macro.
(HAVE_CMPXCHG): Ditto.
(cmpxchg_ptr): Ditto.
(unwi_full_sigmask): New variable.

(Logical change 1.59)
This commit is contained in:
mostang.com!davidm 2003-03-06 06:14:36 +00:00
parent 00c5dee16b
commit 9003fd20fe

View file

@ -29,8 +29,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/* Platform-independent libunwind-internal declarations. */
#include <assert.h>
#include <pthread.h>
#include <libunwind.h>
#include <pthread.h>
#include <signal.h>
#ifdef __GNUC__
# if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ > 2)
@ -79,12 +80,25 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#pragma weak pthread_mutex_lock
#pragma weak pthread_mutex_unlock
#define mutex_init(l) (pthread_mutex_init ? pthread_mutex_init ((l), 0) : 0)
#define mutex_lock(l) (pthread_mutex_lock ? pthread_mutex_lock (l) : 0)
#define mutex_unlock(l) (pthread_mutex_unlock ? pthread_mutex_unlock (l) : 0)
#if UNW_TARGET_IA64
# define HAVE_CMPXCHG
# include <ia64intrin.h>
# define cmpxchg_ptr(_ptr,_o,_n) \
((void *) __sync_val_compare_and_swap((long *) (_ptr), \
(long) (_o), (long) (_n)))
#endif
#define UNWI_OBJ(fn) UNW_PASTE(UNW_PREFIX,UNW_PASTE(I,fn))
#define UNWI_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_UI,UNW_TARGET),_), fn)
#define unwi_full_sigmask UNWI_ARCH_OBJ(full_sigmask)
extern sigset_t unwi_full_sigmask;
extern int UNWI_OBJ(find_dynamic_proc_info) (unw_addr_space_t as,
unw_word_t ip,
unw_proc_info_t *pi,
@ -223,6 +237,4 @@ struct elf_image
size_t size; /* (file-) size of the image */
};
#include <tdep.h>
#endif /* internal_h */