Atlas Runtime
queue.c File Reference
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
Include dependency graph for queue.c:

Classes

struct  node_t
 
struct  queue_t
 

Macros

#define NUM_ITEMS   100000
 

Typedefs

typedef struct node_t node_t
 
typedef struct queue_t queue_t
 

Functions

void initialize ()
 
void enqueue (int val)
 
int dequeue (int *valp)
 
void * do_work ()
 
int main ()
 

Variables

queue_tQ
 
int ready = 0
 
int done = 0
 
pthread_mutex_t ready_lock
 
pthread_mutex_t done_lock
 

Macro Definition Documentation

#define NUM_ITEMS   100000

Typedef Documentation

typedef struct node_t node_t
typedef struct queue_t queue_t

Function Documentation

int dequeue ( int *  valp)
void* do_work ( )
void enqueue ( int  val)
void initialize ( )
int main ( )

Variable Documentation

int done = 0
pthread_mutex_t done_lock
queue_t* Q
int ready = 0
pthread_mutex_t ready_lock