mirror of
git://git.musl-libc.org/musl
synced 2025-03-06 20:48:29 +01:00
move __abort_lock to its own file and drop pointless weak_alias trick
the dummy definition of __abort_lock in sigaction.c was performing exactly the same role that putting the lock in its own source file could and should have been used to achieve. while we're moving it, give it a proper declaration.
This commit is contained in:
parent
34904d830a
commit
3cd3de6189
4 changed files with 5 additions and 8 deletions
|
@ -6,8 +6,6 @@
|
|||
#include "lock.h"
|
||||
#include "ksigaction.h"
|
||||
|
||||
hidden volatile int __abort_lock[1];
|
||||
|
||||
_Noreturn void abort(void)
|
||||
{
|
||||
raise(SIGABRT);
|
||||
|
|
3
src/exit/abort_lock.c
Normal file
3
src/exit/abort_lock.c
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "pthread_impl.h"
|
||||
|
||||
volatile int __abort_lock[1];
|
|
@ -196,6 +196,8 @@ hidden void __tl_sync(pthread_t);
|
|||
|
||||
extern hidden volatile int __thread_list_lock;
|
||||
|
||||
extern hidden volatile int __abort_lock[1];
|
||||
|
||||
extern hidden unsigned __default_stacksize;
|
||||
extern hidden unsigned __default_guardsize;
|
||||
|
||||
|
|
|
@ -7,12 +7,6 @@
|
|||
#include "lock.h"
|
||||
#include "ksigaction.h"
|
||||
|
||||
static volatile int dummy_lock[1] = { 0 };
|
||||
|
||||
extern hidden volatile int __abort_lock[1];
|
||||
|
||||
weak_alias(dummy_lock, __abort_lock);
|
||||
|
||||
static int unmask_done;
|
||||
static unsigned long handler_set[_NSIG/(8*sizeof(long))];
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue