Skip to content
Snippets Groups Projects
Commit f1ebce73 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix CID 469135

parent 94fe4232
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -32,10 +32,11 @@ JSRuntime * jsrt_GetNew(int maxbytes, unsigned long timeout, const char *filenam ...@@ -32,10 +32,11 @@ JSRuntime * jsrt_GetNew(int maxbytes, unsigned long timeout, const char *filenam
if(!initialized) { if(!initialized) {
initialized=TRUE; initialized=TRUE;
pthread_mutex_init(&jsrt_mutex, NULL); pthread_mutex_init(&jsrt_mutex, NULL);
pthread_mutex_lock(&jsrt_mutex);
listInit(&rt_list, 0); listInit(&rt_list, 0);
_beginthread(trigger_thread, TRIGGER_THREAD_STACK_SIZE, NULL); _beginthread(trigger_thread, TRIGGER_THREAD_STACK_SIZE, NULL);
} } else
pthread_mutex_lock(&jsrt_mutex); pthread_mutex_lock(&jsrt_mutex);
ret=JS_NewRuntime(maxbytes); ret=JS_NewRuntime(maxbytes);
listPushNode(&rt_list, ret); listPushNode(&rt_list, ret);
pthread_mutex_unlock(&jsrt_mutex); pthread_mutex_unlock(&jsrt_mutex);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment