Skip to content

Commit a654472

Browse files
committed
remove duplicated ifdefs, __unix__ should cover the FreeBSD cases too
1 parent 709fe83 commit a654472

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

private/private.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,7 @@ void _dispatch_prohibit_transition_to_multithreaded(bool prohibit);
191191
typedef mach_port_t dispatch_runloop_handle_t;
192192
#elif defined(__linux__)
193193
typedef int dispatch_runloop_handle_t;
194-
#elif defined(__FreeBSD__)
195-
typedef uint64_t dispatch_runloop_handle_t;
196-
#elif defined(__unix__) && !defined(__linux__)
194+
#elif defined(__unix__)
197195
typedef uint64_t dispatch_runloop_handle_t;
198196
#elif defined(_WIN32)
199197
typedef void *dispatch_runloop_handle_t;

src/queue.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6490,8 +6490,6 @@ _dispatch_runloop_queue_get_handle(dispatch_lane_t dq)
64906490
#elif defined(__linux__)
64916491
// decode: 0 is a valid fd, so offset by 1 to distinguish from NULL
64926492
return ((dispatch_runloop_handle_t)(uintptr_t)dq->do_ctxt) - 1;
6493-
#elif defined(__FreeBSD__)
6494-
return ((dispatch_runloop_handle_t)(uintptr_t)dq->do_ctxt);
64956493
#elif defined(__unix__)
64966494
return ((dispatch_runloop_handle_t)(uintptr_t)dq->do_ctxt);
64976495
#elif defined(_WIN32)
@@ -6511,9 +6509,7 @@ _dispatch_runloop_queue_set_handle(dispatch_lane_t dq,
65116509
#elif defined(__linux__)
65126510
// encode: 0 is a valid fd, so offset by 1 to distinguish from NULL
65136511
dq->do_ctxt = (void *)(uintptr_t)(handle + 1);
6514-
#elif defined(__FreeBSD__)
6515-
dq->do_ctxt = (void *)(uintptr_t)handle;
6516-
#elif defined(__unix__) && !defined(__linux__)
6512+
#elif defined(__unix__)
65176513
dq->do_ctxt = (void *)(uintptr_t)handle;
65186514
#elif defined(_WIN32)
65196515
dq->do_ctxt = (void *)(uintptr_t)handle;

0 commit comments

Comments
 (0)