Skip to content

Instantly share code, notes, and snippets.

all:
gcc timerfd.c -o timerfd
test:
./timerfd
clean:
rm -rf timerfd
@oza
oza / .bashrc
Created December 22, 2009 10:49
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
hoge
all:
make poll
make select
poll: poll.c
gcc poll.c -o poll
select:select.c
gcc select.c -o select
#ifndef __DPRINTF_H__
#define __DPRINTF_H__
#ifdef __DEBUG__
#define dprintf(fmt,...) \
printf("[%s]%d:" fmt "\n",__FUNCTION__,__LINE__,__VA_ARGS__)
#define dputs(str) \
printf("[%s]%d:" str "\n",__FUNCTION__,__LINE__)
all:
g++ helloserver.cpp -o helloserver
clean:
server
all:
g++ a.cpp -o a
./a
clean:
rm -rf a
all:
gcc easy_alloc.c -o easy_alloc
./easy_alloc
clean:
rm -rf easy_alloc
/**
* How to compile in linux :
* gcc -lrt posix_timer.c
* to link posix timer functions.
*/
#include <stdio.h>
#include <time.h>
#include <signal.h>