Skip to content

Commit adfc1df

Browse files
committed
Base: merge two identical CPP cases
The two cases are identical. Merge them to avoid the unnecessary duplication.
1 parent 72d6933 commit adfc1df

File tree

1 file changed

+4
-23
lines changed

1 file changed

+4
-23
lines changed

CoreFoundation/Base.subproj/CFInternal.h

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -504,37 +504,18 @@ CF_EXPORT id __NSDictionary0__;
504504
CF_EXPORT id __NSArray0__;
505505

506506

507-
#if DEPLOYMENT_TARGET_MACOSX
508-
509-
typedef pthread_mutex_t CFLock_t;
510-
511-
#define CFLockInit ((pthread_mutex_t)PTHREAD_ERRORCHECK_MUTEX_INITIALIZER)
512-
#define CF_LOCK_INIT_FOR_STRUCTS(X) (X = CFLockInit)
513-
514-
#define __CFLock(LP) ({ \
515-
(void)pthread_mutex_lock(LP); })
516-
517-
#define __CFUnlock(LP) ({ \
518-
(void)pthread_mutex_unlock(LP); })
519-
520-
#define __CFLockTry(LP) ({ \
521-
pthread_mutex_trylock(LP) == 0; })
522-
523-
#elif DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_EMBEDDED_MINI
507+
#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_EMBEDDED_MINI
524508

525509
typedef pthread_mutex_t CFLock_t;
526510

527511
#define CFLockInit ((pthread_mutex_t)PTHREAD_ERRORCHECK_MUTEX_INITIALIZER)
528512
#define CF_LOCK_INIT_FOR_STRUCTS(X) (X = CFLockInit)
529513

530-
#define __CFLock(LP) ({ \
531-
(void)pthread_mutex_lock(LP); })
514+
#define __CFLock(LP) ({ (void)pthread_mutex_lock(LP); })
532515

533-
#define __CFUnlock(LP) ({ \
534-
(void)pthread_mutex_unlock(LP); })
516+
#define __CFUnlock(LP) ({ (void)pthread_mutex_unlock(LP); })
535517

536-
#define __CFLockTry(LP) ({ \
537-
pthread_mutex_trylock(LP) == 0; })
518+
#define __CFLockTry(LP) ({ pthread_mutex_trylock(LP) == 0; })
538519

539520
#elif DEPLOYMENT_TARGET_WINDOWS
540521

0 commit comments

Comments
 (0)