Skip to content

Instantly share code, notes, and snippets.

View hnakagawa's full-sized avatar

Hirofumi Nakagawa hnakagawa

View GitHub Profile
@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で作る奴)の解放処理。
@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 / 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 / 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 / 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 / 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>
package triaina.sample;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Parcel;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.NavUtils;
require 'sinatra'
post '/upload' do
p params
unless params[:test] &&
(tmpfile = params[:test][:tempfile]) &&
(name = params[:test][:filename])
@error = "No file selected"
return 'error'
end
package com.example.hackpolicy;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;
import android.view.Window;
import android.view.WindowManager;
@hnakagawa
hnakagawa / 0001-broadcom-wl-driver-hybrid-v35_64-nodebug-pcoem-6_30_.patch
Created September 6, 2014 18:33
broadcom wl driver(hybrid-v35_64-nodebug-pcoem-6_30_223_248) porting for 3.16
From 82040520df05810b6c4a4d9584c2f27f2de16a90 Mon Sep 17 00:00:00 2001
From: Hirofumi Nakagawa <nklabs@gmail.com>
Date: Sun, 7 Sep 2014 03:29:53 +0900
Subject: [PATCH] broadcom wl driver(hybrid-v35_64-nodebug-pcoem-6_30_223_248)
porting for 3.16
---
src/wl/sys/wl_cfg80211_hybrid.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)