gwsystems / composite

A component-based OS
composite.seas.gwu.edu
185 stars 70 forks source link

The first patch in the composite runtime: blockpoints and a lock #386

Closed gparmer closed 4 years ago

gparmer commented 5 years ago

Summary of this Pull Request (PR)

Some support for block-point-based locks along with a simple test (crttest). This is a feature addition, and changes existing code very minimally, so I don't see much risk for existing applications. I want this to concretely start a more in-depth blockpoint discussion.

Limitations.

I believe this blockpoint API is stable. Next steps will be to

  1. implement channels using this API, and
  2. fix the multi-core support after I talk to @phanikishoreg and determine if sl supports cross-core wakeup.

Intent for your PR

Choose one (Mandatory):

Reviewers (Mandatory):

@WenyuanShao @phanikishoreg @hungry-foolish

Code Quality

As part of this pull request, I've considered the following:

Style:

Code Craftsmanship:

Testing

I've tested the code using the following test programs (provide list here):

gparmer commented 5 years ago

Added a Treiber stack to track blocked threads. Now multicore-safe. Wakeups still don't go between cores, so that is the last thing to do. @phanikishoreg said he can do this.

gparmer commented 5 years ago

Added channels. Added tests to crttests.c. See crt_chan.h for the API and implementation. Quite simple.

@hungry-foolish @phanikishoreg

gparmer commented 4 years ago

This was meant for feedback. That was accomplished. Closing now.