No subject
Maiyun Zhang
me at maiyun.me
Sun Nov 23 20:30:46 CET 2025
>From 625b42a0d9f4157c59d90e25eaa56d9bf8b5090a Mon Sep 17 00:00:00 2001
From: Zhang Maiyun <me at maiyun.me>
Date: Wed, 1 May 2024 12:37:16 -0700
Subject: [PATCH] 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 <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.50.1 (Apple Git-155)
More information about the Bird-users
mailing list