| 977 | } |
| 978 | |
| 979 | void fxRunFile(txPool* pool, char* path) |
| 980 | { |
| 981 | txContext* context = c_malloc(sizeof(txContext) + c_strlen(path)); |
| 982 | txContext** address; |
| 983 | txContext* former; |
| 984 | if (!context) return; |
| 985 | c_memset(context, 0, sizeof(txContext)); |
| 986 | context->result = pool->current; |
| 987 | c_strcpy(context->path, path); |
| 988 | fxLockMutex(&(pool->countMutex)); |
| 989 | while (pool->count == mxPoolSize) |
| 990 | fxSleepCondition(&(pool->countCondition), &(pool->countMutex)); |
| 991 | address = &(pool->firstContext); |
| 992 | while ((former = *address)) |
| 993 | address = &(former->next); |
| 994 | *address = context; |
| 995 | pool->count++; |
| 996 | fxWakeAllCondition(&(pool->countCondition)); |
| 997 | fxUnlockMutex(&(pool->countMutex)); |
| 998 | } |
| 999 | |
| 1000 | #if mxWindows |
| 1001 | unsigned int __stdcall fxRunFileThread(void* it) |
no outgoing calls
no test coverage detected