From: Zhang Maiyun via Bird-users Date: Sun, 23 Nov 2025 19:38:03 +0000 (-0500) Subject: BFD: remove unused spinlock X-Git-Tag: v3.2.0~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24ace3ed06bd4bacf0fe5eef369f4cfe9b7945bd;p=thirdparty%2Fbird.git BFD: remove unused spinlock 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 --- diff --git a/aclocal.m4 b/aclocal.m4 index dd5cca359..7fc9c9953 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 71f1090df..d8b5f8ea3 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;