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

Conversation

ac000
Copy link
Member

@ac000 ac000 commented Nov 5, 2024

    When configuring under Linux we always got the following
    
      checking for pthread spinlock zero initial value ... found but is not working
    
    Having *actually* taken a look at this, this check seems somewhat bogus,
    the first thing it does is
    
      pthread_spinlock_t  lock = 0;
    
    which you shouldn't do anyway, you should use pthread_spin_init(3) to
    initialise the pthread_spinlock_t variable.
    
    But in any case, this thing, NXT_HAVE_PTHREAD_SPINLOCK_ZERO, isn't even
    checked for in the code.
    
    Neither is NXT_HAVE_PTHREAD_SPINLOCK, we don't use the pthread_spin_*
    API, but rather roll our own spinlock implementation.
    
    So let's just remove these checks, at the very least it'll speed
    ./configure up!

When configuring under Linux we always got the following

  checking for pthread spinlock zero initial value ... found but is not working

Having *actually* taken a look at this, this check seems somewhat bogus,
the first thing it does is

  pthread_spinlock_t  lock = 0;

which you shouldn't do anyway, you should use pthread_spin_init(3) to
initialise the pthread_spinlock_t variable.

But in any case, this thing, NXT_HAVE_PTHREAD_SPINLOCK_ZERO, isn't even
checked for in the code.

Neither is NXT_HAVE_PTHREAD_SPINLOCK, we don't use the pthread_spin_*
API, but rather roll our own spinlock implementation.

So let's just remove these checks, at the very least it'll speed
./configure up!

Signed-off-by: Andrew Clayton <[email protected]>
@ac000 ac000 marked this pull request as ready for review November 5, 2024 21:31
@ac000 ac000 merged commit 158322e into nginx:master Nov 7, 2024
42 of 43 checks passed
@ac000 ac000 deleted the auto branch November 7, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants