October 15, 2021

Source Code
Plan
Proposal
SAOC Projects

Report for week 1 of milestone 1
Report for week 2 of milestone 1
Report for week 3 of milestone 1

Light Weight D Runtime.
15th October, 2021.
Symmetry Autumn of Code, Week 4 of Milestone 1.

Hi all,
Apologies for the delay on this update. On Wednesday night (13th OCT), I was rushed to hospital for difficulty breathing and chest pains (started on Monday 11th OCT), which has impacted me a bit. Fortunately, as of the 15th of October, LWDR has fulfilled milestone 1 of my plan.

Between the 6th of October and the 15th, when possible, work was completed on task 2 of milestone 1 - implementation of object monitors and support for synchronized. The work was straight-forward. DRuntime's monitor_.d was ported to LWDR. It was almost 1:1, except for stuff involving the global mutex (used for allocating monitors), which relied on LWDR-specified hooks.

A series of hooks in rtoslink.d have been added. They forward operations involving mutexes to the underlying platform. Ie, creating, destroying, locking and unlocking mutexes (using synchronized or core.sync.mutex.Mutex) are all forwarded through these functions.

An LWDR-specific implementation of core.sync.mutex.Mutex has been completed. It attempts to replicate the functionality of DRuntime's Mutex class.

object.Monitor was implemented - it's just an interface with two functions. For a while I considered perhaps changing the interface to make manual memory management easier, but I prioritise compatibility with DRuntime more. I don't want potential users to have to learn the ins and outs of a new runtime, it should be as compatible as possible.

I'm sorry there isn't much at all this week. Hopefully the next will be better.

All the best,
Dylan Graham.

October 15, 2021

On Friday, 15 October 2021 at 13:01:26 UTC, Dylan Graham wrote:

>

Light Weight D Runtime.
15th October, 2021.
Symmetry Autumn of Code, Week 4 of Milestone 1.

Had to patch a bug just then regarding monitor deletion during object finalisation. Otherwise, I've tested it on hardware and it has been working well.