Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages  

PID Operators
[Multitasking]


Functions

int new_pid ()
 Create a new pid.
Returns:
The new pid created.


int get_pid ()
 Return the current task pid if there is a curr_task.
Returns:
The current task pid.



Variables

atomic_t last_pid
 Last used pid.


Detailed Description

Operators to manage the pids for the tasks.

Function Documentation

int get_pid  
 

Return the current task pid if there is a curr_task.

Returns:
The current task pid.

Definition at line 186 of file task.c.

00187 {
00188         if ( !curr_task ) return( NULL );
00189         return( curr_task->pid );
00190 }

int new_pid  
 

Create a new pid.

Returns:
The new pid created.

This routine generate a pid using an atomic increment.

Definition at line 178 of file task.c.

00179 {
00180         atomic_inc(&last_pid);
00181         return(atomic_read(&last_pid));
00182 }


Variable Documentation

atomic_t last_pid
 

Last used pid.

Definition at line 171 of file task.c.


Generated on Fri Feb 20 15:32:23 2004 for Minirighi by doxygen1.2.18