Vuo  2.3.2
VuoRuntimeMain.c
Go to the documentation of this file.
1 
11 #include <CoreServices/CoreServices.h>
12 #include <pthread.h>
13 
14 #include "VuoRuntime.h"
15 #include "VuoEventLoop.h"
16 
17 void *VuoApp_mainThread = NULL;
18 
22 static void __attribute__((constructor)) VuoRuntimeMain_init(void)
23 {
24  VuoApp_mainThread = (void *)pthread_self();
25 
26 #pragma clang diagnostic push
27 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
28  // Calls _TSGetMainThread().
29  // https://b33p.net/kosada/node/12944
30  YieldToAnyThread();
31 #pragma clang diagnostic pop
32 }
33 
37 int main(int argc, char **argv)
38 {
39  vuoInit(argc, argv);
40 
42  VuoEventLoop_processEvent(VuoEventLoop_WaitIndefinitely);
43 
44  vuoFini();
45  return 0;
46 }