Main Page | Data Structures | File List | Globals | Related Pages

task.h File Reference

Task manager interface. More...

#include <list.h>
#include <frame.h>
#include <scheduler.h>

Go to the source code of this file.

Data Structures

struct  Task

Defines

#define EXECNAME_LIMIT   256
#define EXECVEC_ARGV_LIMIT   256
#define EXECVEC_BUFFER_LIMIT   4096

Typedefs

typedef Task Task

Functions

int task_manager_initialize (void)
 Initializes the task manager.

Task * task_current (void)
 Gets the currently running task.

Task * task_create (Task *parent)
 Creates a new task.

void task_destroy (Task *task)
 Destroys a task.

Task * task_fork (void)
 Forks a task.

int task_exec (Task *task, char *execname, char **execvec)
void task_exit (Task *)
 Free resources for an exiting task.


Detailed Description

Task manager interface.

Provides the interface for task management.

Bug:
No known bugs.
Author:
Lee Salzman (lsalzman)

Function Documentation

Task* task_create Task *  parent  ) 
 

Creates a new task.

Creates a new task and inserts it to the back of the list

Parameters:
parent the parent of the task to be created
Returns:
NULL if task couldn't be created; the task otherwise

Task* task_current void   ) 
 

Gets the currently running task.

returns the task of the currently running thread

Returns:
NULL if no thread is running or the task of the currently running thread

void task_destroy Task *  task  ) 
 

Destroys a task.

Kills a task that was in the list of tasks

Parameters:
task the task to be killed
Returns:
Void

void task_exit Task *   ) 
 

Free resources for an exiting task.

This should be called once the last thread of a task has exited to free any resources associated with the task and wake any threads waiting for it to complete.

Parameters:
task the task to exit
Returns:
Void

Task* task_fork void   ) 
 

Forks a task.

Forks a new task that is a copy of the current task

Returns:
the forked task on success NULL on failure

int task_manager_initialize void   ) 
 

Initializes the task manager.

runs the init task

Returns:
returns 0 on success and -1 on failure


Generated on Fri Apr 9 21:59:16 2004 for 15-410 Project 3 by doxygen 1.3.2