pintos/src/threads/thread.h File Reference

#include <debug.h>
#include <list.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  thread

Defines

#define TID_ERROR   ((tid_t) -1)
#define PRI_MIN   0
#define PRI_DEFAULT   31
#define PRI_MAX   63

Typedefs

typedef int tid_t
typedef void thread_func (void *aux)
typedef void thread_action_func (struct thread *t, void *aux)

Enumerations

enum  thread_status { THREAD_RUNNING, THREAD_READY, THREAD_BLOCKED, THREAD_DYING }

Functions

void thread_init (void)
void thread_start (void)
void thread_tick (void)
void thread_print_stats (void)
tid_t thread_create (const char *name, int priority, thread_func *, void *)
void thread_block (void)
void thread_unblock (struct thread *)
struct threadthread_current (void)
tid_t thread_tid (void)
const char * thread_name (void)
void thread_exit (void) NO_RETURN
void thread_yield (void)
void thread_foreach (thread_action_func *, void *)
int thread_get_priority (void)
void thread_set_priority (int)
int thread_get_nice (void)
void thread_set_nice (int)
int thread_get_recent_cpu (void)
int thread_get_load_avg (void)

Variables

bool thread_mlfqs


Define Documentation

#define PRI_DEFAULT   31

#define PRI_MAX   63

Definition at line 26 of file thread.h.

Referenced by init_thread().

#define PRI_MIN   0

#define TID_ERROR   ((tid_t) -1)

Definition at line 21 of file thread.h.

Referenced by process_execute(), and thread_create().


Typedef Documentation

typedef void thread_action_func(struct thread *t, void *aux)

Definition at line 131 of file thread.h.

typedef void thread_func(void *aux)

Definition at line 117 of file thread.h.

typedef int tid_t

Definition at line 20 of file thread.h.


Enumeration Type Documentation

Enumerator:
THREAD_RUNNING 
THREAD_READY 
THREAD_BLOCKED 
THREAD_DYING 

Definition at line 10 of file thread.h.


Function Documentation

void thread_block ( void   ) 

tid_t thread_create ( const char *  name,
int  priority,
thread_func ,
void *   
)

struct thread* thread_current ( void   )  [read]

void thread_exit ( void   ) 

void thread_foreach ( thread_action_func ,
void *   
)

int thread_get_load_avg ( void   ) 

int thread_get_nice ( void   ) 

Definition at line 366 of file thread.c.

int thread_get_priority ( void   ) 

int thread_get_recent_cpu ( void   ) 

Definition at line 382 of file thread.c.

Referenced by test_mlfqs_recent_1().

void thread_init ( void   ) 

Referenced by main().

const char* thread_name ( void   ) 

void thread_print_stats ( void   ) 

Definition at line 145 of file thread.c.

References idle_ticks, kernel_ticks, printf(), and user_ticks.

Referenced by print_stats().

void thread_set_nice ( int   ) 

void thread_set_priority ( int   ) 

void thread_start ( void   ) 

Definition at line 107 of file thread.c.

References idle(), intr_enable(), PRI_MIN, sema_down(), sema_init(), and thread_create().

Referenced by main().

void thread_tick ( void   ) 

tid_t thread_tid ( void   ) 

Definition at line 282 of file thread.c.

References thread_current(), and thread::tid.

void thread_unblock ( struct thread  ) 

void thread_yield ( void   ) 


Variable Documentation


Generated on Mon Jan 10 16:43:58 2011 for Pintos by  doxygen 1.5.6