Skip to content

libdispatch now builds on Linux and ping/pong test runs successfully. #5

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 3 commits into from
Dec 5, 2015

Conversation

dgrove-oss
Copy link
Contributor

Set of changes to stub out missing functionality and adapt to Linux.
Key changes are:
(1) introduction of linux_base.h and linux_stubs.[h,c] to
contain stubbed out type definitions and functions.
(2) Copied in BSD's sys/queue.h to shims/sys_queue.h to
provide _SAFE macros that are not available in Linux
version of sys/queue.h
(3) made inclusion of os/base.h conditional
(4) worked around pthread_workqueue only providing 4 levels of
priority by skipping initializing of two pairs of queues:
DISPATCH_ROOT_QUEUE_IDX_BACKGROUND_QOS and
DISPATCH_ROOT_QUEUE_IDX_USER_INTERACTIVE_QOS
(5) temporarily stubbed out a few functions in transpose.c
until an approach to the ByteSwap headers is finalized.
These are marked with #ifdef LINUX_PORT_HDD
(6) partial fix to a bug in semaphore.c where the linux clause
was returning a stack address instead of mallocing memory.
The fix is only partial because the memory should be freed
when the semaphore is destroyed (not done).

Small changes
(a) augmented various .gitignore files for generated artifacts
(b) a few additional functions bodies disabled with
#ifdef LINUX_PORT_HDD (need better fixes, but functions
may not be called).

Set of changes to stub out missing functionality and adapt to Linux.
Key changes are:
  (1) introduction of linux_base.h and linux_stubs.[h,c] to
      contain stubbed out type definitions and functions.
  (2) Copied in BSD's sys/queue.h to shims/sys_queue.h to
      provide _SAFE macros that are not available in Linux
      version of sys/queue.h
  (3) made inclusion of os/base.h conditional
  (4) worked around pthread_workqueue only providing 4 levels of
      priority by skipping initializing of two pairs of queues:
        DISPATCH_ROOT_QUEUE_IDX_BACKGROUND_QOS and
        DISPATCH_ROOT_QUEUE_IDX_USER_INTERACTIVE_QOS
  (5) temporarily stubbed out a few functions in transpose.c
      until an approach to the ByteSwap headers is finalized.
      These are marked with #ifdef LINUX_PORT_HDD
  (6) partial fix to a bug in semaphore.c where the linux clause
      was returning a stack address instead of mallocing memory.
      The fix is only partial because the memory should be freed
      when the semaphore is destroyed (not done).

Small changes
  (a) augmented various .gitignore files for generated artifacts
  (b) a few additional functions bodies disabled with
      #ifdef LINUX_PORT_HDD (need better fixes, but functions
      may not be called).
@dgrove-oss dgrove-oss mentioned this pull request Dec 4, 2015
das added a commit that referenced this pull request Dec 5, 2015
libdispatch now builds on Linux and ping/pong test runs successfully.
@das das merged commit 394d9a1 into swiftlang:master Dec 5, 2015
@dgrove-oss dgrove-oss deleted the linux-port-hdd-cp2 branch December 5, 2015 16:31
das added a commit that referenced this pull request Jun 14, 2016
libdispatch now builds on Linux and ping/pong test runs successfully.

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
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