Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tinygo-org/tinygo
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: release
Choose a base ref
...
head repository: tinygo-org/tinygo
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: threading-rp2040-2
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 9 commits
  • 48 files changed
  • 1 contributor

Commits on Jan 21, 2025

  1. Configuration menu
    Copy the full SHA
    2599db2 View commit details
    Browse the repository at this point in the history
  2. runtime: refactor GC mark phase into gcMarkReachable

    This is a small refactor to prepare GC marking for multithreaded
    stop-the-world.
    aykevl committed Jan 21, 2025
    Configuration menu
    Copy the full SHA
    8659b18 View commit details
    Browse the repository at this point in the history
  3. runtime: make conservative and precise GC MT-safe

    Using a global lock may be slow, but it is certainly simple and safe.
    If this global lock becomes a bottleneck, we can of course look into
    making the GC truly support multithreading.
    aykevl committed Jan 21, 2025
    Configuration menu
    Copy the full SHA
    c9bb33a View commit details
    Browse the repository at this point in the history
  4. runtime: refactor timerQueue

    Move common functions to scheduler.go. They will be used both from the
    cooperative and from the threads scheduler.
    aykevl committed Jan 21, 2025
    Configuration menu
    Copy the full SHA
    3cc9c44 View commit details
    Browse the repository at this point in the history
  5. sync: implement RWMutex using futexes

    Somewhat surprisingly, this results in smaller code than the old code
    with the cooperative (tasks) scheduler. Probably because the new RWMutex
    is also simpler.
    aykevl committed Jan 21, 2025
    Configuration menu
    Copy the full SHA
    8d6e160 View commit details
    Browse the repository at this point in the history
  6. runtime: map every goroutine to a new OS thread

    This is not a scheduler in the runtime, instead every goroutine is
    mapped to a single OS thread - meaning 1:1 scheduling.
    
    While this may not perform well (or at all) for large numbers of
    threads, it greatly simplifies many things in the runtime. For example,
    blocking syscalls can be called directly instead of having to use epoll
    or similar. Also, we don't need to do anything special to call C code -
    the default stack is all we need.
    aykevl committed Jan 21, 2025
    Configuration menu
    Copy the full SHA
    3767dec View commit details
    Browse the repository at this point in the history
  7. runtime: implement NumCPU for -scheduler=threads

    For the threads scheduler, it makes sense to have NumCPU available.
    For all other schedulers, the number of available CPUs is practically
    limited to one by the scheduler (even though the system might have more
    CPUs).
    aykevl committed Jan 21, 2025
    Configuration menu
    Copy the full SHA
    cce44b5 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2025

  1. WIP cores scheduler

    aykevl committed Jan 22, 2025
    Configuration menu
    Copy the full SHA
    04242fd View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2025

  1. WIP stashed changes

    aykevl committed Apr 1, 2025
    Configuration menu
    Copy the full SHA
    ea2f0e4 View commit details
    Browse the repository at this point in the history
Loading