Skip to content

Conversation

@valeriyvan
Copy link
Contributor

pthread_mutex_trylock return 0 on success.

NAME
     pthread_mutex_trylock – attempt to lock a mutex without blocking

SYNOPSIS
     #include <pthread.h>

     int
     pthread_mutex_trylock(pthread_mutex_t *mutex);

DESCRIPTION
     The pthread_mutex_trylock() function locks mutex.  If the mutex is already locked,
     pthread_mutex_trylock() will not block waiting for the mutex, but will return an error
     condition.

RETURN VALUES
     If successful, pthread_mutex_trylock() will return zero, otherwise an error number will
     be returned to indicate the error.

ERRORS
     The pthread_mutex_trylock() function will fail if:

     [EINVAL]           The value specified by mutex is invalid.

     [EBUSY]            Mutex is already locked.

@valeriyvan valeriyvan requested a review from a team as a code owner October 1, 2025 16:21
@Azoy
Copy link
Contributor

Azoy commented Oct 1, 2025

@swift-ci please smoke test

@finagolfin
Copy link
Member

@swift-ci test windows

@valeriyvan
Copy link
Contributor Author

Should I do something to make this merge?

@finagolfin
Copy link
Member

@swift-ci test windows

@finagolfin
Copy link
Member

It has to pass CI first, trying again.

@finagolfin finagolfin merged commit 0826d47 into swiftlang:main Oct 28, 2025
3 checks passed
@finagolfin
Copy link
Member

Thanks @valeriyvan 👍

@valeriyvan valeriyvan deleted the OpenBSDImpl.swift branch November 5, 2025 12:13
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.

3 participants