Skip to content

Instantly share code, notes, and snippets.

View pedroarthur's full-sized avatar

Pedro Arthur Duarte [aka JEdi] pedroarthur

View GitHub Profile
@pedroarthur
pedroarthur / mutex_master.c
Created July 28, 2016 18:51
DEBUG_LOCKS_WARN_ON(lock->owner != current)
#include <linux/module.h>
#include <linux/init.h>
#include <linux/mutex.h>
DEFINE_MUTEX (master_mutex);
EXPORT_SYMBOL(master_mutex);
static int __init mutex_master_init(void)
/* imports suppressed */
class MemoizingActor(actual: ActorRef) extends Actor {
case class DropState(message: Any)
override def receive: Actor.Receive = actualReceive(Map())
def actualReceive(data: Map[Any, Future[Any]]): Receive = {
case DropState(any) =>