Monday, November 10, 2008

[socket] shutdown vs close

for a tcp case,
can used to close read-half, write-half, or both-halves of a connection;
will close the socket, and remove from process resource ...

Friday, October 24, 2008

球迷-孙/9第一次国内转播亮相

4:30左右的时间,防守可以,但之后一个空位三分偏差较大,突破分球挺没谱。剩下1分钟左右时间,心里那个不舒坦,有点看不下去。感慨一个后卫登录nba的艰辛,能否进入最终名单的担忧,挺复杂。
然后,惊喜来了,右边3分线45度附近得球,面对外线变相运球,左边突破到罚球区右侧顶,面对多人防守,运球后转身晃动后仰跳投,干脆2分。一阵欣喜。
看中国球员就是牵挂,当球迷不容易。

Wednesday, October 8, 2008

NBA new session...

Rudy/Oden@Blazer
YAO@Rocket
--
Go go go!

Monday, October 6, 2008

wakeup process from interrupt

a case of synchronize between process context and interrupt context, this is quite useful for driver code.
e.g. block operation is executed in a user process, which then can be switch out, ISR will be responsible to wake it up, and resume the operation.

in linux, the "WAIT QUEUE" is used to solve such a scenario, for convenience, add an url of this topic here. go back to this topic later.
http://hi.baidu.com/spiderjun/blog/item/d43de7c4bcd3c3ca39db493a.html

while, some other managed object, such as boolean can also be a method, generally,
1. create managed object,
2. wait on it;
3. ISR set the object value to notify the process.
this should be a simple idea especially for the 1-on-1 mode, while queue can deal more complex mode.

Wednesday, September 3, 2008

[灌水]摄像头之大发现

身边有个摄像头已经2年多了,今天的发现在于:
1. 镜头有旋钮能调节焦距;
2. 内置了麦克风.

嘿嘿,加班后的惊喜,聊以振奋下,明儿下午打球...

Thursday, August 28, 2008

linux mmap: vm_area_struct->vm_ops->nopage

in case impl mmap with nopage in device driver

sys flow:

page fault when looking at page table
interrupt for the fault
...

--stack1
asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code)
@http://lxr.linux.no/linux-old+v2.4.31/arch/i386/mm/fault.c#L140
{
...
switch (handle_mm_fault(mm, vma, address, write))
...
}

--stack2
int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct * vma,
unsigned long address, int write_access)
@http://lxr.linux.no/linux-old+v2.4.31/mm/memory.c#L1370
{
...
return handle_pte_fault(mm, vma, address, write_access, pte);
...
}

--stack3
static inline int handle_pte_fault(struct mm_struct *mm,
struct vm_area_struct * vma, unsigned long address,
int write_access, pte_t * pte)
@http://lxr.linux.no/linux-old+v2.4.31/mm/memory.c#L1337
{
...
return do_no_page(mm, vma, address, write_access, pte);
...
}

--stack4
static int do_no_page(struct mm_struct * mm, struct vm_area_struct * vma,
unsigned long address, int write_access, pte_t *page_table)
@http://lxr.linux.no/linux-old+v2.4.31/mm/memory.c#L1249
{
..
vma->vm_ops->nopage(vma, address & PAGE_MASK, 0);
..
}

Saturday, February 9, 2008

yet another hello world~

place holder~~