mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-06-29 04:31:45 +02:00
78306c6f14
(_U_dyn_info_list_lock): Rename from "registration_lock" and change from r/w-lock to a simple mutex (spin) lock. (_U_dyn_register): Insert into doubly-linked list. (Logical change 1.30)
20 lines
398 B
C
20 lines
398 B
C
#include "internal.h"
|
|
|
|
pthread_mutex_t _U_dyn_info_list_lock = PTHREAD_MUTEX_INITIALIZER;
|
|
|
|
void
|
|
_U_dyn_register (unw_dyn_info_t *di)
|
|
{
|
|
mutex_lock (&_U_dyn_info_list_lock);
|
|
{
|
|
++_U_dyn_info_list.generation;
|
|
|
|
di->next = _U_dyn_info_list.first;
|
|
di->prev = NULL;
|
|
if (di->next)
|
|
di->next->prev = di;
|
|
_U_dyn_info_list.first = di;
|
|
}
|
|
mutex_unlock (&_U_dyn_info_list_lock);
|
|
}
|