Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto: Remove unused pthread spinlock checks #1483

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 0 additions & 50 deletions auto/threads
Original file line number Diff line number Diff line change
Expand Up @@ -73,56 +73,6 @@ if [ $nxt_found = no ]; then
fi


# FreeBSD, Solaris, AIX.

nxt_feature="pthread spinlock"
nxt_feature_name=NXT_HAVE_PTHREAD_SPINLOCK
nxt_feature_run=yes
nxt_feature_incs=
nxt_feature_libs=$NXT_PTHREAD
nxt_feature_test="#include <pthread.h>

int main(void) {
pthread_spinlock_t lock;

if (pthread_spin_init(&lock, PTHREAD_PROCESS_PRIVATE) != 0)
return 1;
if (pthread_spin_lock(&lock) != 0)
return 1;
if (pthread_spin_unlock(&lock) != 0)
return 1;
if (pthread_spin_destroy(&lock) != 0)
return 1;
return 0;
}"
. auto/feature


if [ $nxt_found = yes ]; then

# Linux glibc uses 0 as pthread_spinlock_t initial value on the most
# platforms. However, on i386 and x86_64 the initial value is 1.

nxt_feature="pthread spinlock zero initial value"
nxt_feature_name=NXT_HAVE_PTHREAD_SPINLOCK_ZERO
nxt_feature_run=yes
nxt_feature_incs=
nxt_feature_libs=$NXT_PTHREAD
nxt_feature_test="#include <pthread.h>

pthread_spinlock_t lock = 0;

int main(void) {
if (pthread_spin_trylock(&lock) != 0)
return 1;
if (pthread_spin_unlock(&lock) != 0)
return 1;
return 0;
}"
. auto/feature
fi


nxt_feature="sem_timedwait()"
nxt_feature_name=NXT_HAVE_SEM_TIMEDWAIT
nxt_feature_run=yes
Expand Down
Loading