Skip to content

Instantly share code, notes, and snippets.

View glaudiston's full-sized avatar

Glaudiston Gomes da Silva glaudiston

View GitHub Profile
@glaudiston
glaudiston / kvm-host.c
Created October 19, 2025 12:57 — forked from zserge/kvm-host.c
Tiny KVM host to at least partially run Linux kernel
#define _GNU_SOURCE
#include <asm/bootparam.h>
#include <errno.h>
#include <fcntl.h>
#include <linux/kvm.h>
#include <linux/kvm_para.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@glaudiston
glaudiston / main.bkp.c
Last active September 16, 2016 21:50
C Promises
// ref https://computing.llnl.gov/tutorials/pthreads/#WhyPthreads
#include <stdio.h>
#include <pthread.h>
#include <stdlib.h>
int promises=0;
typedef void *( FunctionPointerNoArgs )();
typedef void *( *FunctionPointer )( void * );
typedef void *( *PromiseBaseFunctionPointer )( FunctionPointerNoArgs *, FunctionPointerNoArgs * );