Atlas Runtime
|
#include <assert.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
Classes | |
struct | COW_AL_INTERNAL |
struct | COW_AL |
struct | COW_AL_ITER |
Macros | |
#define | INITIAL_SIZE 1000 |
#define | NUM_ITER 10 |
Typedefs | |
typedef struct COW_AL_INTERNAL | COW_AL_INTERNAL |
typedef struct COW_AL | COW_AL |
typedef struct COW_AL_ITER | COW_AL_ITER |
Functions | |
COW_AL * | create_cal () |
void | add_cal (COW_AL *cal, int num) |
void | insert_cal (COW_AL *cal, int index, int num) |
int | remove_cal (COW_AL *cal, int index) |
int | cal_contains (COW_AL *cal, int num) |
int | cal_get (COW_AL *cal, int index) |
int | size (COW_AL *cal) |
COW_AL_ITER * | create_iter (COW_AL *) |
int * | iter_first (COW_AL_ITER *) |
int * | iter_last (COW_AL_ITER *) |
void | print_cal (COW_AL *) |
COW_AL_INTERNAL * | GetNewCalInternal () |
int | DoAtomicSwitch (COW_AL *cal, COW_AL_INTERNAL *cal_int) |
uint64_t | sum_cal (COW_AL *cal) |
void * | do_work () |
int | main () |
Variables | |
pthread_mutex_t | lock_cal |
pthread_mutex_t | ready_lock |
int | ready = 0 |
int | done = 0 |
COW_AL * | alist = 0 |
#define INITIAL_SIZE 1000 |
#define NUM_ITER 10 |
typedef struct COW_AL_INTERNAL COW_AL_INTERNAL |
typedef struct COW_AL_ITER COW_AL_ITER |
void add_cal | ( | COW_AL * | cal, |
int | num | ||
) |
int cal_contains | ( | COW_AL * | cal, |
int | num | ||
) |
int cal_get | ( | COW_AL * | cal, |
int | index | ||
) |
COW_AL * create_cal | ( | ) |
COW_AL_ITER * create_iter | ( | COW_AL * | al | ) |
void* do_work | ( | ) |
int DoAtomicSwitch | ( | COW_AL * | cal, |
COW_AL_INTERNAL * | cal_int | ||
) |
COW_AL_INTERNAL* GetNewCalInternal | ( | ) |
void insert_cal | ( | COW_AL * | cal, |
int | index, | ||
int | num | ||
) |
int * iter_first | ( | COW_AL_ITER * | it | ) |
int * iter_last | ( | COW_AL_ITER * | it | ) |
int main | ( | ) |
void print_cal | ( | COW_AL * | cal | ) |
int remove_cal | ( | COW_AL * | cal, |
int | index | ||
) |
int size | ( | COW_AL * | cal | ) |
uint64_t sum_cal | ( | COW_AL * | cal | ) |
COW_AL* alist = 0 |
int done = 0 |
pthread_mutex_t lock_cal |
int ready = 0 |
pthread_mutex_t ready_lock |