Data Fields | |
void * | f |
void(* | unloader )(void *) |
int | active |
time_t | lastmodified |
char * | filename |
file_list * | next |
Kept in a linked list.
|
Used internally by sweep(). Do not access from elsewhere. |
|
This is a pointer to the data structures associated with the file. Read-only once the structure has been created. |
|
The full filename.
|
|
File last-modified time, so we can check if file has been changed. Read-only once the structure has been created. |
|
Pointer to next entry in the linked list of all "file_list"s. This linked list is so that sweep() can navigate it. Since sweep() can remove items from the list, we must be careful to only access this value from main thread (when we know sweep won't be running). |
|
The unloader function. Normally NULL. When we are finished with file (i.e. when we have loaded a new one), set to a pointer to an unloader function. Unloader will be called by sweep() (called from main loop) when all clients using this file are done. This prevents threading problems. |