Skip to content

Instantly share code, notes, and snippets.

View Hermitao's full-sized avatar
🐧
42

Vinicius Krieger Granemann Hermitao

🐧
42
View GitHub Profile
@pedrominicz
pedrominicz / peterson.c
Last active October 24, 2024 08:30
Peterson's algorithm in C.
#include <pthread.h>
#include <unistd.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// This program illustrates the use of Peterson's algorithm to synchronize
// multiple threads.Two new threads are created and alternate writing to the
@d12frosted
d12frosted / MarIO.lua
Created June 15, 2015 08:14
MarI/O by SethBling
-- MarI/O by SethBling
-- Feel free to use this code, but please do not redistribute it.
-- Intended for use with the BizHawk emulator and Super Mario World or Super Mario Bros. ROM.
if gameinfo.getromname() == "Super Mario World (USA)" then
Filename = "DP1.state"
ButtonNames = {
"A",
"B",
"X",