Remove #include of spinlock.h from libc_private.h. Declare spinlocks as
struct _spinlock. Keep the typedef in for now; another set of changes may come around to clean up consumers of spinlocks. Requested by: bde
This commit is contained in:
parent
4e2a2c6a2d
commit
82358b1b5a
@ -38,8 +38,6 @@
|
||||
#ifndef _LIBC_PRIVATE_H_
|
||||
#define _LIBC_PRIVATE_H_
|
||||
|
||||
#include <spinlock.h>
|
||||
|
||||
/*
|
||||
* This global flag is non-zero when a process has created one
|
||||
* or more threads. It is used to avoid calling locking functions
|
||||
@ -126,6 +124,6 @@ extern const char *__progname;
|
||||
* This is the lock to make malloc() thread-safe. It is externalized
|
||||
* so that thread libraries can protect malloc across fork().
|
||||
*/
|
||||
extern spinlock_t *__malloc_lock;
|
||||
extern struct _spinlock *__malloc_lock;
|
||||
|
||||
#endif /* _LIBC_PRIVATE_H_ */
|
||||
|
@ -43,12 +43,13 @@
|
||||
/*
|
||||
* Lock structure with room for debugging information.
|
||||
*/
|
||||
typedef struct {
|
||||
struct _spinlock {
|
||||
volatile long access_lock;
|
||||
volatile long lock_owner;
|
||||
volatile char *fname;
|
||||
volatile int lineno;
|
||||
} spinlock_t;
|
||||
};
|
||||
typedef struct _spinlock spinlock_t;
|
||||
|
||||
#define _SPINLOCK_INITIALIZER { 0, 0, 0, 0 }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user