process.c File Reference

Go to the source code of this file.

Classes

struct  pid2task
 PID to task_struct mapping. More...
struct  __kthread_data

Functions

struct thread_info * current_thread_info (void)
struct task_struct * get_current (void)
 LIST_HEAD (_pid_task_list)
void put_pid (struct pid *pid)
void attach_pid (struct task_struct *task, enum pid_type type __attribute__((unused)), struct pid *pid)
 Attach PID to a certain task struct.
void detach_pid (struct task_struct *task, enum pid_type type __attribute__((unused)))
 Detach PID from a task struct.
struct task_struct * find_task_by_pid_type (int type, int nr)
struct task_struct * find_task_by_pid_ns (int nr, struct pid_namespace *ns)
struct task_struct * find_task_by_pid (int nr)
static void __kthread_helper (void *arg)
 Entry point for new kernel threads.
int kernel_thread (int(*fn)(void *), void *arg, unsigned long flags)
 Our implementation of Linux' kernel_thread() function.
void do_exit (long code)
 Our implementation of exit().
void dump_stack (void)
char * get_task_comm (char *buf, struct task_struct *tsk)
void set_task_comm (struct task_struct *tsk, char *buf)
static dde26_thread_datainit_dde26_thread (void)
int l4dde26_process_add_worker (void)
int l4dde26_process_from_ddekit (ddekit_thread_t *t)
 Add an already existing DDEKit thread to the set of threads known to the Linux environment.
int __init l4dde26_process_init (void)
 Function to initialize the first DDE process.
 DEFINE_PER_CPU (int, cpu_number)

Variables

ddekit_lock_t _pid_task_list_lock
struct pid init_struct_pid = INIT_STRUCT_PID
static atomic_t kthread_count = ATOMIC_INIT(0)
 Counter for running kthreads.


Function Documentation

static void __kthread_helper ( void *  arg  )  [static]

Entry point for new kernel threads.

Make this thread a DDE26 worker and then execute the real thread fn.

Definition at line 147 of file process.c.

void attach_pid ( struct task_struct *  task,
enum pid_type type   __attribute__(unused),
struct pid *  pid 
)

Attach PID to a certain task struct.

Definition at line 62 of file process.c.

struct thread_info* current_thread_info ( void   )  [read]

Definition at line 20 of file process.c.

DEFINE_PER_CPU ( int  ,
cpu_number   
)

void detach_pid ( struct task_struct *  task,
enum pid_type type   __attribute__(unused) 
)

Detach PID from a task struct.

Definition at line 77 of file process.c.

void do_exit ( long  code  ) 

Our implementation of exit().

For DDE purposes this only relates to kernel threads.

Definition at line 207 of file process.c.

void dump_stack ( void   ) 

Definition at line 223 of file process.c.

struct task_struct* find_task_by_pid ( int  nr  )  [read]

Definition at line 122 of file process.c.

struct task_struct* find_task_by_pid_ns ( int  nr,
struct pid_namespace *  ns 
) [read]

Definition at line 116 of file process.c.

struct task_struct* find_task_by_pid_type ( int  type,
int  nr 
) [read]

Definition at line 97 of file process.c.

struct task_struct* get_current ( void   )  [read]

Definition at line 26 of file process.c.

char* get_task_comm ( char *  buf,
struct task_struct *  tsk 
)

Definition at line 228 of file process.c.

static dde26_thread_data* init_dde26_thread ( void   )  [static]

Definition at line 257 of file process.c.

int kernel_thread ( int(*)(void *)  fn,
void *  arg,
unsigned long  flags 
)

Our implementation of Linux' kernel_thread() function.

Setup a new thread running our __kthread_helper() function.

Definition at line 175 of file process.c.

int l4dde26_process_add_worker ( void   ) 

Definition at line 288 of file process.c.

int l4dde26_process_from_ddekit ( ddekit_thread_t t  ) 

Add an already existing DDEKit thread to the set of threads known to the Linux environment.

This is used for the timer thread, which is actually a DDEKit thread, but Linux code shall see it as a Linux thread as well.

Definition at line 319 of file process.c.

int __init l4dde26_process_init ( void   ) 

Function to initialize the first DDE process.

Definition at line 333 of file process.c.

LIST_HEAD ( _pid_task_list   ) 

void put_pid ( struct pid *  pid  ) 

Definition at line 53 of file process.c.

void set_task_comm ( struct task_struct *  tsk,
char *  buf 
)

Definition at line 239 of file process.c.


Variable Documentation

Definition at line 41 of file process.c.

struct pid init_struct_pid = INIT_STRUCT_PID

Definition at line 51 of file process.c.

atomic_t kthread_count = ATOMIC_INIT(0) [static]

Counter for running kthreads.

It is used to create unique names for kthreads.

Definition at line 142 of file process.c.


Generated on Wed Apr 11 06:39:16 2012 for DDE - The L4 Device Driver Environment by  doxygen 1.5.6