#include <linux/module.h>
#include <linux/printk.h>
#include <linux/spinlock.h>

#define MODULE_NAME "sad"

DEFINE_SPINLOCK(slay);

int sad_init(void)
{
	pr_info("this will be sad\n");

	spin_lock(&slay);
	pr_info("wow we have the lock\n");
	spin_lock(&slay);
	spin_unlock(&slay);
	spin_unlock(&slay);

	return 0;
}

void sad_exit(void)
{
	pr_info("we survived somehow\n");
}

module_init(sad_init);
module_exit(sad_exit);

MODULE_LICENSE("GPL");
MODULE_DESCRIPTION(MODULE_NAME);
MODULE_AUTHOR("cs4118-dev-guides");
