Skip to content

Instantly share code, notes, and snippets.

View frroossst's full-sized avatar
👨‍💻
SyntaxError

Adhyan H. Patel frroossst

👨‍💻
SyntaxError
View GitHub Profile
/*
* Under high contention loads a futex should perform worse.
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <linux/futex.h>
#include <sys/syscall.h>
@frroossst
frroossst / sync-primitives.c
Last active December 20, 2024 04:01
Implementing Monitors, IPC, Semaphore, using each other (CMPT 332)
/*
* GLWT(Good Luck With That) Public License
* Copyright (c) Everyone, except Author
*
* Everyone is permitted to copy, distribute, modify, merge, sell, publish,
* sublicense or whatever they want with this software but at their OWN RISK.
*
* Preamble
*
* The author has absolutely no clue what the code in this project does.