PKUOS - Pintos
Pintos source browser for PKU Operating System course
Data Structures | Macros | Functions | Variables
priority-fifo.c File Reference
#include <stdio.h>
#include "tests/threads/tests.h"
#include "threads/init.h"
#include "devices/timer.h"
#include "threads/malloc.h"
#include "threads/synch.h"
#include "threads/thread.h"
Include dependency graph for priority-fifo.c:

Go to the source code of this file.

Data Structures

struct  simple_thread_data
 Creates several threads all at the same priority and ensures that they consistently run in the same round-robin order. More...
 

Macros

#define THREAD_CNT   16
 
#define ITER_CNT   16
 

Functions

void test_priority_fifo (void)
 
static void simple_thread_func (void *data_)
 

Variables

static thread_func simple_thread_func
 

Macro Definition Documentation

◆ ITER_CNT

#define ITER_CNT   16

Definition at line 27 of file priority-fifo.c.

◆ THREAD_CNT

#define THREAD_CNT   16

Definition at line 26 of file priority-fifo.c.

Function Documentation

◆ simple_thread_func()

static void simple_thread_func ( void *  data_)
static

Definition at line 87 of file priority-fifo.c.

References simple_thread_data::id, ITER_CNT, simple_thread_data::lock, lock_acquire(), lock_release(), simple_thread_data::op, and thread_yield().

Here is the call graph for this function:

◆ test_priority_fifo()

void test_priority_fifo ( void  )

Definition at line 32 of file priority-fifo.c.

Variable Documentation

◆ simple_thread_func

thread_func simple_thread_func
static

Definition at line 29 of file priority-fifo.c.