Skip to content

Base: merge two identical CPP cases #1718

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

Merged
merged 1 commit into from
Oct 11, 2018
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
27 changes: 4 additions & 23 deletions CoreFoundation/Base.subproj/CFInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -504,37 +504,18 @@ CF_EXPORT id __NSDictionary0__;
CF_EXPORT id __NSArray0__;


#if DEPLOYMENT_TARGET_MACOSX
#if TARGET_OS_MAC

typedef pthread_mutex_t CFLock_t;

#define CFLockInit ((pthread_mutex_t)PTHREAD_ERRORCHECK_MUTEX_INITIALIZER)
#define CF_LOCK_INIT_FOR_STRUCTS(X) (X = CFLockInit)

#define __CFLock(LP) ({ \
(void)pthread_mutex_lock(LP); })
#define __CFLock(LP) ({ (void)pthread_mutex_lock(LP); })

#define __CFUnlock(LP) ({ \
(void)pthread_mutex_unlock(LP); })
#define __CFUnlock(LP) ({ (void)pthread_mutex_unlock(LP); })

#define __CFLockTry(LP) ({ \
pthread_mutex_trylock(LP) == 0; })

#elif DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_EMBEDDED_MINI

typedef pthread_mutex_t CFLock_t;

#define CFLockInit ((pthread_mutex_t)PTHREAD_ERRORCHECK_MUTEX_INITIALIZER)
#define CF_LOCK_INIT_FOR_STRUCTS(X) (X = CFLockInit)

#define __CFLock(LP) ({ \
(void)pthread_mutex_lock(LP); })

#define __CFUnlock(LP) ({ \
(void)pthread_mutex_unlock(LP); })

#define __CFLockTry(LP) ({ \
pthread_mutex_trylock(LP) == 0; })
#define __CFLockTry(LP) ({ pthread_mutex_trylock(LP) == 0; })

#elif DEPLOYMENT_TARGET_WINDOWS

Expand Down