Google
  Web www.spinics.net

How can i get detailed introductions about kernel API such as ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hi all,
    
I am a newer with linux and i have found some difficulties when i read the file linux/drivers/misc/joystick.c for Sitsang board whose CPU is PXA 255.

Here is a capture of the code :
/*
 * This is a RT kernel thread that handles the soft button pressed
 * functions are expected to be able to sleep as well.
 */
static int softbutton_thread(void *_sb)
{
 struct softbutton *sb = _sb;
 struct task_struct *tsk = current;
 int loop;
 DECLARE_WAITQUEUE(wait, tsk);
 
 sb->rtask = tsk;

 daemonize();
 reparent_to_init();
 tsk->tty = NULL;
 tsk->policy = SCHED_FIFO;
 tsk->rt_priority = 1;
 strcpy(tsk->comm, "ksbd");

 /* only want to receive SIGKILL */
 spin_lock_irq(&tsk->sigmask_lock);
 siginitsetinv(&tsk->blocked, sigmask(SIGKILL));
 recalc_sigpending(tsk);
 ……
}

My questions are, what's the meaning of the RT kernel thread,and how can i get some helps  about the kernel API――daemonize()and reparent_to_init() and so on. I really don't konw the functions of these kernel API.Can anybody give me some advices please?

Thanks in advanc!
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Site Home]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux ARM Kernel]     [Linux MIPS]     [ECOS]     [Tools]     [DDR & Rambus]     [Monitors]

Powered by Linux