[BACK]Return to io.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / windows / engine2000

Diff for /OpenXM_contrib2/windows/engine2000/io.c between version 1.3 and 1.10

version 1.3, 2001/10/09 01:36:28 version 1.10, 2018/09/08 02:06:08
Line 54  static HANDLE hNotify0,hNotify_Ack0,hIntr0;
Line 54  static HANDLE hNotify0,hNotify_Ack0,hIntr0;
 static HANDLE hDebugNotify,hDebugNotify_Ack,hDebugIntr,hDebugIntr_Ack,hDebugKill;  static HANDLE hDebugNotify,hDebugNotify_Ack,hDebugIntr,hDebugIntr_Ack,hDebugKill;
   
 HANDLE hResizeNotify,hResizeNotify_Ack; /* should be visible from another file */  HANDLE hResizeNotify,hResizeNotify_Ack; /* should be visible from another file */
   HANDLE hMainThreadReady,hCanvasCreated; /* notification for ox_plot */
   
 /* XXX */  /* XXX */
 extern HANDLE hStreamNotify,hStreamNotify_Ack; /* declared in io/ox.c */  extern HANDLE hStreamNotify,hStreamNotify_Ack; /* declared in io/ox.c */
Line 69  static struct ErrMsg Errmsg;
Line 70  static struct ErrMsg Errmsg;
  * interrupt_state : flag to distinguish an Asir error and a cancellation   * interrupt_state : flag to distinguish an Asir error and a cancellation
  */   */
   
 static int emergency;  int emergency;
 static int interrupt_state;  static int interrupt_state;
 int debuggui_is_present;  int debuggui_is_present;
 int messagegui_is_present;  int messagegui_is_present;
Line 123  void watch_intr() {
Line 124  void watch_intr() {
                                 if ( doing_batch )                                  if ( doing_batch )
                                         send_intr();                                          send_intr();
                                 /* for Asir; recv_intr is reset to 0 in Asir */                                  /* for Asir; recv_intr is reset to 0 in Asir */
                                   enter_signal_cs();
                                 recv_intr = 1;                                  recv_intr = 1;
                                   leave_signal_cs();
                                   PulseEvent(hIntr_Ack);
                                 break;                                  break;
                         case WAIT_OBJECT_0+1: /* hKill */                          case WAIT_OBJECT_0+1: /* hKill */
                         default:                          default:
                                 terminate_debug_gui();                                  terminate_debug_gui();
                                 emergency = 1; /* XXX */                                  emergency = 1; /* XXX */
                                 asir_terminate(2);                                  asir_terminate(3);
                                 exit(0);                                  exit(0);
                                 /* NOTREACHED */                                  /* NOTREACHED */
                                 break;                                  break;
Line 149  void ox_watch_intr() {
Line 153  void ox_watch_intr() {
                                 ResetEvent(hOxIntr);                                  ResetEvent(hOxIntr);
                                 if ( doing_batch )                                  if ( doing_batch )
                                         send_intr();                                          send_intr();
                                   enter_signal_cs();
                                 recv_intr = 1;                                  recv_intr = 1;
                                   leave_signal_cs();
                                 break;                                  break;
                         case WAIT_OBJECT_0+1: /* hOxReset */                          case WAIT_OBJECT_0+1: /* hOxReset */
                                 ResetEvent(hOxReset);                                  ResetEvent(hOxReset);
                                 if ( doing_batch )                                  if ( doing_batch )
                                         send_intr();                                          send_intr();
                                   enter_signal_cs();
                                 recv_intr = 2;                                  recv_intr = 2;
                                   leave_signal_cs();
                                 break;                                  break;
                         case WAIT_OBJECT_0+2: /* hOxKill */                          case WAIT_OBJECT_0+2: /* hOxKill */
                                 ResetEvent(hOxKill);                                  ResetEvent(hOxKill);
                                 terminate_debug_gui();                                  terminate_debug_gui();
                                 emergency = 1; /* XXX */                                  emergency = 1; /* XXX */
                                 asir_terminate(2);                                  asir_terminate(3);
                                 /* NOTREACHED */                                  /* NOTREACHED */
                                 break;                                  break;
                 }                  }
Line 322  void set_debug_handles(int on)
Line 330  void set_debug_handles(int on)
         }          }
 }  }
   
   extern int wfep_mode;
   
 void Init_IO()  void Init_IO()
 {  {
   #if _MSC_VER < 1900
         _setargv();          _setargv();
         if ( !strcmp(__argv[0],"ox_asir") ) {  #endif
           if ( !strncmp(__argv[0],"ox_asir",strlen("ox_asir")) ) {
                   /* ox_asir or ox_asir_wfep */
                   if ( !strcmp(__argv[0],"ox_asir_wfep") ) wfep_mode = 1;
                 OxAsirMain(__argc,__argv);                  OxAsirMain(__argc,__argv);
                 exit(0);                  exit(0);
         } else if ( !strcmp(__argv[0],"ox_plot") )          } else if ( !strcmp(__argv[0],"ox_plot") )
Line 431  void OxPlotMain(int argc, char **argv)
Line 445  void OxPlotMain(int argc, char **argv)
         hResizeNotify = CreateEvent(NULL,TRUE,FALSE,eventname);          hResizeNotify = CreateEvent(NULL,TRUE,FALSE,eventname);
         sprintf(eventname,"resize_notify_ack_%d",mypid);          sprintf(eventname,"resize_notify_ack_%d",mypid);
         hResizeNotify_Ack = CreateEvent(NULL,TRUE,FALSE,eventname);          hResizeNotify_Ack = CreateEvent(NULL,TRUE,FALSE,eventname);
           sprintf(eventname,"mainthreadready_%d",mypid);
           hMainThreadReady = CreateEvent(NULL,TRUE,FALSE,eventname);
           sprintf(eventname,"canvascreated_%d",mypid);
           hCanvasCreated = CreateEvent(NULL,TRUE,FALSE,eventname);
   
         hWatchStreamThread = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)ox_watch_stream,NULL,0,&tid);          hWatchStreamThread = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)ox_watch_stream,NULL,0,&tid);
 //      ret = SetThreadPriority(hWatchStreamThread,THREAD_PRIORITY_BELOW_NORMAL);  //      ret = SetThreadPriority(hWatchStreamThread,THREAD_PRIORITY_BELOW_NORMAL);

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.10

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>