#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <errno.h>#include <sys/stat.h>#include <sys/types.h>#include <dirent.h>#include <pvm3.h>#include <assert.h>#include "Cache.h"#include "constants.h"#include "DataSpace.h"#include "Task.h"#include "prod_cons.h"#include "hash.h"Include dependency graph for Cache.c:

Go to the source code of this file.
Defines | |
| #define | _CACHE_C_ |
| #define | KEY_INT |
| #define | VAL_VOID |
| #define | TASK_FILENAME_SIZE 100 |
| #define | TASK_DIRNAME_SIZE ((1000+TASK_FILENAME_SIZE)*sizeof(char)) |
Functions | |
| int | createDir (char *dirName) |
| void * | writerThread (void *arg) |
| void | initCacheStruct (int filterId, int instanceId) |
| void | initCache (int filterId, int instanceId) |
| void | destroyCache () |
| int | cachePutData (char *key, void *data, int dataSz) |
| void * | cacheGetData (int taskId, char *key, int *dataSz) |
| int | cacheRemoveData (char *key) |
| int * | cacheGetTaskDeps (int taskId, int *depsSz) |
| TaskIdList * | getFinishedTasks () |
| int | cacheRecoverTasks (TaskIdList *tasks) |
| void | setCreator () |
| int | cacheSetCurrentTask (int task) |
| int | cacheGetCurrentTask () |
| void | cacheSetCurrentWork (int work) |
| int | cacheGetCurrentWork () |
| int | cacheRunTask (int taskId) |
| int | cacheCreateTask (int taskId, int *deps, int depSize, char *metadata, int metaSize) |
| int | cacheEndTask (int taskId) |
| int | cacheGetRunningTasks (int *numTasks, int **taskList) |
| int | defaultRecoveryCallback (int newTaskId, int *newTaskDep, int depSize, char *metadata, int metaSize) |
| int | cacheRegisterRecoverCallback (RecoverCallback_t *callback) |
| void | cacheSetUseTasks () |
| int | cacheGetUseTasks () |
| void | cacheSetForwardTaskMsgs (int forward) |
| int | cacheGetForwardTaskMsgs () |
| int * | cacheGetFinishedTasks (int *numTasks) |
| Cache * | ___getCache () |
| This function is for internel testing only. | |
Variables | |
| Cache * | cache = NULL |
|
|
|
|
|
|
|
|
Definition at line 26 of file Cache.c. Referenced by cacheRecoverTasks(), createDir(), initCacheStruct(), and writerThread(). |
|
|
Definition at line 25 of file Cache.c. Referenced by cacheRecoverTasks(), and writerThread(). |
|
|
|
|
|
This function is for internel testing only.
Definition at line 859 of file Cache.c. References cache. |
|
||||||||||||||||||||||||
|
Definition at line 657 of file Cache.c. References cache, Cache::currentWork, and Cache::tasks. Referenced by dsCreateTask(), dsReadBuffer(), and dsReadNonBlockingBuffer(). |
|
|
Definition at line 743 of file Cache.c. References cache, cacheRunTask(), Cache::currentTask, Cache::currentWork, _task_::dependsOnMe, E_NO_SUCH_TASK, E_TASK_NOT_RUNNING, _task_::endedTasks, finished, getTaskState(), _task_::myDeps, running, Cache::runningTasks, setTaskState(), DataSpaceId::task, taskIdListAdd(), taskIdListGet(), taskIdListGetSize(), Cache::tasks, Cache::terminatedTasks, and DataSpaceId::work. Referenced by dsEndTask(), and dsReadBuffer(). Here is the call graph for this function: ![]() |
|
|
Definition at line 621 of file Cache.c. References cache, and Cache::currentTask. Referenced by cacheGetTaskDeps(), dsGetCurrentTask(), dsMCast(), and dsSend(). |
|
|
Definition at line 629 of file Cache.c. References cache, and Cache::currentWork. |
|
||||||||||||||||
|
Definition at line 266 of file Cache.c. References cache, Cache::currentTask, Cache::currentWork, finished, getData(), getTaskDataSpace(), getTaskState(), DataSpaceId::task, Cache::tasks, and DataSpaceId::work. Referenced by dsGetData(). Here is the call graph for this function: ![]() |
|
|
Definition at line 854 of file Cache.c. References cache, taskIdListToArray(), and Cache::terminatedTasks. Referenced by dsGetFinishedTasks(). Here is the call graph for this function: ![]() |
|
|
Definition at line 850 of file Cache.c. References cache, and Cache::forwardTaskMsgs. Referenced by dsCreateTask(), dsEndTask(), dsReadBuffer(), and dsReadNonBlockingBuffer(). |
|
||||||||||||
|
Definition at line 811 of file Cache.c. References cache, and Cache::runningTasks. Referenced by dsGetRunningTasks(). |
|
||||||||||||
|
Definition at line 334 of file Cache.c. References cache, cacheGetCurrentTask(), Cache::currentWork, getTaskMyDeps(), DataSpaceId::task, taskIdListGet(), taskIdListGetSize(), Cache::tasks, and DataSpaceId::work. Referenced by dsGetTaskDeps(). Here is the call graph for this function: ![]() |
|
|
Definition at line 842 of file Cache.c. References cache, and Cache::useTasks. |
|
||||||||||||||||
|
Definition at line 234 of file Cache.c. References cache, createDataSpace(), createTask(), Cache::currentTask, Cache::currentWork, E_NO_SUCH_TASK, getTaskDataSpace(), INITIAL_CAPACITY, putData(), DataSpaceId::task, Cache::tasks, and DataSpaceId::work. Referenced by dsPutData(). Here is the call graph for this function: ![]() |
|
|
Definition at line 400 of file Cache.c. References cache, Cache::currentWork, destroyTask(), E_COULD_NOT_RECOVER_TASK, finished, Cache::finishedTasksDir, _task_::id, _task_::mother, readTask(), setTaskState(), DataSpaceId::task, TASK_DIRNAME_SIZE, TASK_FILENAME_SIZE, taskAddChild(), taskIdListAdd(), taskIdListGet(), taskIdListGetSize(), taskIdListSortAscendig(), Cache::tasks, taskTakeChildren(), Cache::terminatedTasks, and DataSpaceId::work. Here is the call graph for this function: ![]() |
|
|
Definition at line 833 of file Cache.c. References cache, and Cache::recoverCallback. Referenced by dsRegisterRecoverCallback(). |
|
|
Definition at line 308 of file Cache.c. References cache, Cache::currentTask, Cache::currentWork, getTaskDataSpace(), removeData(), DataSpaceId::task, Cache::tasks, and DataSpaceId::work. Referenced by dsRemoveData(). Here is the call graph for this function: ![]() |
|
|
Definition at line 633 of file Cache.c. References cache, Cache::currentTask, Cache::currentWork, running, Cache::runningTasks, setTaskState(), DataSpaceId::task, Cache::tasks, and DataSpaceId::work. Referenced by cacheEndTask(). Here is the call graph for this function: ![]() |
|
|
Definition at line 602 of file Cache.c. References cache, Cache::currentTask, Cache::currentWork, E_NO_SUCH_TASK, E_TASK_NOT_RUNNING, getTaskState(), running, DataSpaceId::task, Cache::tasks, and DataSpaceId::work. Referenced by dsSetCurrentTask(). Here is the call graph for this function: ![]() |
|
|
Definition at line 625 of file Cache.c. References cache, and Cache::currentWork. |
|
|
Definition at line 846 of file Cache.c. References cache, and Cache::forwardTaskMsgs. |
|
|
Definition at line 838 of file Cache.c. References cache, and Cache::useTasks. Referenced by dsUseTasks(). |
|
|
Definition at line 33 of file Cache.c. References TASK_DIRNAME_SIZE. Referenced by writerThread(). |
|
||||||||||||||||||||||||
|
Definition at line 828 of file Cache.c. References dsCreateTask(). Referenced by initCacheStruct(). Here is the call graph for this function: ![]() |
|
|
Definition at line 212 of file Cache.c. References cache, destroy_prod_cons(), Cache::finishedTasksDir, put(), Cache::runningTasks, FinishedTask::task, Cache::taskBuffer, FinishedTask::taskId, taskIdListDestroy(), Cache::tasks, Cache::terminatedTasks, FinishedTask::workId, and Cache::writeThreadDescriptor. Here is the call graph for this function: ![]() |
|
|
Definition at line 373 of file Cache.c. References cache, Cache::finishedTasksDir, taskIdListAdd(), and taskIdListCreate(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 203 of file Cache.c. References cache, initCacheStruct(), writerThread(), and Cache::writeThreadDescriptor. Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 169 of file Cache.c. References cache, create_prod_cons(), Cache::currentTask, Cache::currentWork, defaultRecoveryCallback(), Cache::finishedTasksDir, Cache::forwardTaskMsgs, Cache::IAmTaskCreator, ID_LIST_INIT_SIZE, INITIAL_CAPACITY, PROD_CONS_SIZE, Cache::recoverCallback, Cache::runningTasks, TASK_DIRNAME_SIZE, Cache::taskBuffer, taskIdListCreate(), Cache::tasks, Cache::terminatedTasks, and Cache::useTasks. Referenced by initCache(). Here is the call graph for this function: ![]() |
|
|
Definition at line 598 of file Cache.c. References cache, and Cache::IAmTaskCreator. |
|
|
Definition at line 66 of file Cache.c. References cache, createDir(), Cache::finishedTasksDir, get(), FinishedTask::task, TASK_DIRNAME_SIZE, TASK_FILENAME_SIZE, Cache::taskBuffer, FinishedTask::taskId, and writeTask(). Referenced by initCache(). Here is the call graph for this function: ![]() |
|
1.4.6