MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxRunFile

Function fxRunFile

xs/tools/xst262.c:979–998  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

977}
978
979void 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
1001unsigned int __stdcall fxRunFileThread(void* it)

Callers 2

xst262.cFile · 0.85
fxRunDirectoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected