[PATCH v3.1] BFD: remove unused spinlock
Zhang Maiyun
me at maiyun.me
Sun Jun 1 16:25:39 CEST 2025
The only use of the spinlock in `struct bfd_proto` was removed in 38acb415f
and now it should be fine to remove it.
The check for `pthread_spin*` in `aclocal.m4` is also removed
accordingly. This makes it possible to port BFD support to platforms
without spinlocks (e.g. Darwin)
Signed-off-by: Zhang Maiyun <me at maiyun.me>
---
aclocal.m4 | 4 ++--
proto/bfd/bfd.h | 2 --
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/aclocal.m4 b/aclocal.m4
index dd5cca35..7fc9c995 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -91,8 +91,8 @@ AC_DEFUN([BIRD_CHECK_PTHREADS],
[
pthread_t pt;
pthread_create(&pt, NULL, NULL, NULL);
- pthread_spinlock_t lock;
- pthread_spin_lock(&lock);
+ pthread_mutex_t lock;
+ pthread_mutex_lock(&lock);
]
)
],
diff --git a/proto/bfd/bfd.h b/proto/bfd/bfd.h
index 71f1090d..d8b5f8ea 100644
--- a/proto/bfd/bfd.h
+++ b/proto/bfd/bfd.h
@@ -82,8 +82,6 @@ struct bfd_proto
{
struct proto p;
- pthread_spinlock_t lock;
-
pool *tpool;
struct birdloop *eloop;
--
2.39.5 (Apple Git-154)
More information about the Bird-users
mailing list