Skip to content

Instantly share code, notes, and snippets.

View kaworu's full-sized avatar

Alexandre Perrin kaworu

View GitHub Profile
diff --git a/lib/libc/gen/sysctl.3 b/lib/libc/gen/sysctl.3
index 61e3d31..f33288d 100644
--- a/lib/libc/gen/sysctl.3
+++ b/lib/libc/gen/sysctl.3
@@ -26,10 +26,10 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95
-.\" $FreeBSD: src/lib/libc/gen/sysctl.3,v 1.33.2.13 2002/04/07 04:57:14 dd Exp $
+.\" $FreeBSD: head/lib/libc/gen/sysctl.3 204170 2010-02-21 13:57:02Z ed $
@kaworu
kaworu / job.c
Created November 21, 2013 11:28
/*-
* Copyright (c) 1988, 1989, 1990, 1993
* The Regents of the University of California. All rights reserved.
* Copyright (c) 1988, 1989 by Adam de Boor
* Copyright (c) 1989 by Berkeley Softworks
* All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Adam de Boor.
*
@kaworu
kaworu / -
Created November 20, 2013 15:45
# make -DNO_MODULES buildkernel KERNCONF=VKERNEL
--------------------------------------------------------------
>>> Kernel build for VKERNEL started on Wed Nov 20 16:45:05 CET 2013
--------------------------------------------------------------
===> VKERNEL
rm -rf /usr/obj/usr/src/sys/VKERNEL
mkdir -p /usr/obj/usr/src/sys
cd /usr/src/sys/config; PATH=/usr/obj/usr/src/ctools_x86_64_x86_64/usr/sbin:/usr/obj/usr/src/ctools_x86_64_x86_64/usr/bin:/usr/obj/usr/src/ctools_x86_64_x86_64/bin:/usr/obj/usr/src/ctools_x86_64_x86_64/usr/games:/usr/obj/usr/src/btools_x86_64/usr/sbin:/usr/obj/usr/src/btools_x86_64/usr/bin:/usr/obj/usr/src/btools_x86_64/bin:/usr/obj/usr/src/btools_x86_64/usr/games:/usr/local/bin:/usr/pkg/bin config -d /usr/obj/usr/src/sys/VKERNEL /usr/src/sys/config/VKERNEL
Kernel build directory is /usr/obj/usr/src/sys/VKERNEL
/*
* stdmax.cpp
*
*/
#define __STDC_CONSTANT_MACROS 1
#include <stdint.h>
#include <iostream>
From beea9b340e1ca39cbe4ac1329b6e34831ca15ebc Mon Sep 17 00:00:00 2001
From: Alexandre Perrin <[email protected]>
Date: Mon, 18 Nov 2013 23:16:22 +0100
Subject: [PATCH] fix the INT64_C and INTMAX_C family macro for x86_64.
This patch fix the expanding type of both the INT64_C and the INTMAX_C
family macros to match their corresponding type:
- INT64_C(value) to `int_least64_t`
- UINT64_C(value) to `uint_least64_t`
- INTMAX_C(value) to `intmax_t`
@kaworu
kaworu / -
Created November 18, 2013 21:30
/*
* stdmax.cpp
*
*/
#define __STDC_CONSTANT_MACROS 1
#include <stdint.h>
#include <iostream>
/*
* ui64.cpp
*
*/
#include <iostream>
#define UINT64_C(C) C##ui64
int
main(int argc, char *argv[])
@kaworu
kaworu / llvm.dfly.patch
Created November 15, 2013 17:11
Patch for LLVM to build under DragonFly
diff --git a/include/llvm/Analysis/BlockFrequencyImpl.h b/include/llvm/Analysis/BlockFrequencyImpl.h
index 817a441..cbbd934 100644
--- a/include/llvm/Analysis/BlockFrequencyImpl.h
+++ b/include/llvm/Analysis/BlockFrequencyImpl.h
@@ -235,8 +235,9 @@ class BlockFrequencyImpl {
//
// Iterations = 1 / ExitProb
//
- uint64_t D = std::max(getBlockFreq(Head).getFrequency(), UINT64_C(1));
- uint64_t N = std::max(BackFreq.getFrequency(), UINT64_C(1));
@kaworu
kaworu / paging.c
Last active December 26, 2015 21:09
JamesM's kernel development tutorials (The Heap)
void
init_paging(void)
{
int i;
uint32_t mem_end_page;
/* in heap.c */
extern struct vm_heap *kernel_heap;
/*
* The size of physical memory.
@kaworu
kaworu / list.txt
Last active December 26, 2015 06:39
The Garage's Cube price
Abrupt Decay
Absorb
Abyssal Persecutor
Academy Rector
Accorder Paladin
Acidic Slime
Aether Vial
Ajani, Caller of the Pride
Ajani Goldmane
Ajani Vengeant