Cooperative Multithreading for Fun & Profit

Cooperative multitasking was the staple of early operating systems – as were system lockups due to poorly programmed applications not yielding control of the processor. While modern systems instead implement preemptive multitasking to sidestep these issues, cooperative multitasking still shines in certain applications.

Reverse Engineering Bluetooth Vapes

For quite a while, I’ve had a Pax 3, a Bluetooth LE-connected vape. It’s a great device, but the iOS app leaves a lot to be desired. Finally, I had enough and decided to set out to figure out how their communication protocol works; with the end goal of implementing my own app to control it.

Building an AHCI Driver

With much of the foundation for the internals of kush-os built, it was time to break from the confines of the small, size-limited boot RAM disk. This means reading Stuff™ from disk: so it’s time to write a driver for the AHCI to allow filesystem drivers to interface with SATA disks.

A Stupid (Simple) RPC Framework

A common task for most system services is to export a set of actions that do something. Until now, this meant loads of manual boilerplate code, error-prone request serialization, not quite consistent C++ interfaces, and lots of subtle (and blatant…) bugs. So I set out to find an RPC framework for use in kush-os to handle all of this for me.

Building std::shared_ptr

I recently found myself needing reference counting semantics for arbitrary objects in kernel space. C++ libraries include std::shared_ptr and friends, but we don’t have the luxury of using that in a kernel. Thankfully, building a discount reference counting smart pointer isn’t actually all that hard.

Introducing Cubeland

Since I’ve had little time to write code the last few weeks, let’s take a look at some past projects: today, we’ll take a look at Cubeland, my take on the cube voxel world game genre, à la Minecraft.

amd64-Flavored Memory Management

32-bit x86 is one of the worst CPU architectures out there – so it was only a matter of time until I got so fed up with the idio(t)syncrasies of this lovely architecture and took the plunge to port it to amd64.