Skip to content

Instantly share code, notes, and snippets.

View hnakagawa's full-sized avatar

Hirofumi Nakagawa hnakagawa

View GitHub Profile
@hnakagawa
hnakagawa / gist:4501843
Created January 10, 2013 12:53
ERを3.3にバックポートしてみた。※ERの動作は未確認
From 810e88dced5511f1785e8b227c9f95e6d74bd152 Mon Sep 17 00:00:00 2001
From: Hirofumi Nakagawa <hirofumi.nakagawa@mixi.co.jp>
Date: Fri, 11 Jan 2013 06:43:37 +0900
Subject: [PATCH] backported early retransmit to v3.3
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
commit eed530b6c67624db3f2cf477bac7c4d005d8f7ba
Author: Yuchung Cheng <ycheng@google.com>
@hnakagawa
hnakagawa / memcached
Created October 7, 2012 16:54
memcached rc script for CentOS6.3
#! /bin/sh
#
# chkconfig: - 55 45
# description: The memcached daemon is a network memory cache service.
# processname: memcached
# config: /etc/sysconfig/memcached
# pidfile: /var/run/memcached/memcached.pid
# Standard LSB functions
#. /lib/lsb/init-functions
@hnakagawa
hnakagawa / nginx
Created October 7, 2012 16:30
nginx rc script for CentOS6.3
#!/bin/sh
. /etc/rc.d/init.d/functions
. /etc/sysconfig/network
[ "$NETWORKING" = "no" ] && exit 0
INSTALLDIR="/opt/nginx"
NGINX="$INSTALLDIR/sbin/nginx"
@hnakagawa
hnakagawa / Makefile
Created October 7, 2012 11:30
Hello linux driver(勉強会配布用)
KERNEL ?= /usr/src/linux
PWD := $(shell pwd)
obj-m := hello_driver.o
all:
make -C $(KERNEL) M=$(PWD) modules
clean:
rm -f *.o *.ko *.mod.c
@hnakagawa
hnakagawa / Makefile
Created October 6, 2012 10:09
Linux kernel module template(勉強会配布用)
KERNEL ?= /usr/src/linux
PWD := $(shell pwd)
obj-m := example.o
all:
make -C $(KERNEL) M=$(PWD) modules
clean:
rm -f *.o *.ko *.mod.c
@hnakagawa
hnakagawa / gist:3728305
Created September 15, 2012 14:46
第(3+1)回 六本木 Linux カーネル読書会 議事録
システムコールexit()のメイン処理は、kernel/exit.cのdo_exit関数から始まります。
do_exitから呼び出されている、exit_xxx関数を読んでいけば大まかな処理が解る
* exit_signals
signalをmaskしていたりして、pending状態になっているsignalを処理している。
終了したtask_structがthreadだった場合、pendingしているsignalを他のthreadに付け直す必要があり、その処理をretarget_shared_pending関数で行っている。
* exit_itimers
いわゆるpoxiタイマー(timer_createで作る奴)の解放処理。