Giter Site home page Giter Site logo

superboonie / swift-corelibs-libdispatch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apple/swift-corelibs-libdispatch

0.0 2.0 0.0 603 KB

The libdispatch Project, (a.k.a. Grand Central Dispatch), for concurrency on multicore hardware

Home Page: swift.org

License: Apache License 2.0

Shell 0.55% C 85.72% C++ 3.99% Objective-C 8.41% DTrace 0.27% Objective-C++ 1.06%

swift-corelibs-libdispatch's Introduction

Grand Central Dispatch

Grand Central Dispatch (GCD or libdispatch) provides comprehensive support for concurrent code execution on multicore hardware.

libdispatch is currently available on all Darwin platforms. This project aims to make a modern version of libdispatch available on all other Swift platforms. To do this, we will implement as much of the portable subset of the API as possible, using the existing open source C implementation.

Project Goals

We are currently very early in the development of this project. Our starting point is simply a mirror of the open source drop that corresponds with OS X El Capitan (10.11). Therefore, our earliest goals are:

  1. Build and test the C source code as a dynamic library on the current Swift Linux targets (Ubuntu 14.04 and Ubuntu 15.10).
  2. Add a module.modulemap and make the libdispatch API importable into Swift.
  3. After the previous two steps are done, consider possible improvements to the interface of the libdispatch API in Swift.

Building a C Library

libdispatch on Darwin is a combination of logic in the xnu kernel alongside the user-space Library. The kernel has the most information available to balance workload across the entire system. As a first step, however, we believe it is useful to bring up the basic functionality of the library using user-space pthread primitives on Linux.

Our first tasks for this project are:

  1. Adapt the current autotools build system to work on Linux, or develop a new makefile or other build script for the project on Linux. The current version of the build system has only been tested on Darwin, though previous versions have been made to work on FreeBSD and Linux (see INSTALL).
  2. Omit as much of the extra functionality of the library as possible, to get a core version of the project building. Much of the OS X-specific functionality can be elided completely on Linux.
  3. Adopt libdispatch in other Core Libraries projects, especially Foundation. This will validate our work and get immediate coverage on basic functionality.
  4. Incrementally add functionality back in.

Some C headers and sources (e.g. Availability.h, Block.h, and the libclosure runtime.c) are similar to ones embedded into the CoreFoundation part of swift-corelibs-foundation. We should figure out a mechanism to share these instead of duplicating them across projects.

swift-corelibs-libdispatch's People

Contributors

dgrove-oss avatar madcoder avatar das avatar parkera avatar katashimonosato avatar frankeh avatar dbworku avatar jrose-apple avatar

Watchers

James Cloos avatar Boon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.