This patch removes SIGALRM handler because winedos doesn't use it any more and replaces TEB field alarms with TEB field dpmi_vif. This new field will be used in SIGUSR2 handler and INSTR_EmulateInstruction in order to see when it is time to raise EXCEPTION_VM86_STI in DOS protected mode. Changelog: Remove SIGALRM handler. Reserve TEB field for DPMI virtual interrupt flag. Index: include/thread.h =================================================================== RCS file: /home/wine/wine/include/thread.h,v retrieving revision 1.71 diff -u -r1.71 thread.h --- include/thread.h 22 May 2003 03:44:01 -0000 1.71 +++ include/thread.h 14 Jun 2003 21:28:06 -0000 @@ -113,7 +113,7 @@ void *pthread_data; /* --3 220 Data for pthread emulation */ struct async_private *pending_list; /* --3 224 list of pending async operations */ void *driver_data; /* --3 228 Graphics driver private data */ - DWORD alarms; /* --3 22c Data for vm86 mode */ + DWORD dpmi_vif; /* --3 22c Protected mode virtual interrupt flag */ DWORD vm86_pending; /* --3 230 Data for vm86 mode */ void *vm86_ptr; /* --3 234 Data for vm86 mode */ /* here is plenty space for wine specific fields (don't forget to change pad6!!) */ Index: dlls/ntdll/signal_i386.c =================================================================== RCS file: /home/wine/wine/dlls/ntdll/signal_i386.c,v retrieving revision 1.63 diff -u -r1.63 signal_i386.c --- dlls/ntdll/signal_i386.c 7 Jun 2003 00:33:13 -0000 1.63 +++ dlls/ntdll/signal_i386.c 14 Jun 2003 21:28:14 -0000 @@ -988,23 +988,6 @@ set_vm86_pend( &context ); restore_context( &context, HANDLER_CONTEXT ); } - - -/********************************************************************** - * alrm_handler - * - * Handler for SIGALRM. - * Increases the alarm counter and sets the vm86 pending flag. - */ -static HANDLER_DEF(alrm_handler) -{ - CONTEXT context; - - save_context( &context, HANDLER_CONTEXT ); - NtCurrentTeb()->alarms++; - set_vm86_pend( &context ); - restore_context( &context, HANDLER_CONTEXT ); -} #endif /* __HAVE_VM86 */ @@ -1148,8 +1131,7 @@ sig_act.ksa_handler = func; sig_act.ksa_flags = SA_RESTART; sig_act.ksa_mask = (1 << (SIGINT-1)) | - (1 << (SIGUSR2-1)) | - (1 << (SIGALRM-1)); + (1 << (SIGUSR2-1)); /* point to the top of the stack */ sig_act.ksa_restorer = (char *)NtCurrentTeb()->signal_stack + SIGNAL_STACK_SIZE; return wine_sigaction( sig, &sig_act, NULL ); @@ -1159,7 +1141,6 @@ sigemptyset( &sig_act.sa_mask ); sigaddset( &sig_act.sa_mask, SIGINT ); sigaddset( &sig_act.sa_mask, SIGUSR2 ); - sigaddset( &sig_act.sa_mask, SIGALRM ); #if defined(linux) || defined(__NetBSD__) sig_act.sa_flags = SA_RESTART; @@ -1226,7 +1207,6 @@ #endif #ifdef __HAVE_VM86 - if (set_handler( SIGALRM, have_sigaltstack, (void (*)())alrm_handler ) == -1) goto error; if (set_handler( SIGUSR2, have_sigaltstack, (void (*)())usr2_handler ) == -1) goto error; #endif @@ -1248,7 +1228,6 @@ sigset_t block_set; sigemptyset( &block_set ); - sigaddset( &block_set, SIGALRM ); sigaddset( &block_set, SIGIO ); sigaddset( &block_set, SIGHUP ); sigaddset( &block_set, SIGUSR1 ); -- Jukka Heinonen <http://www.iki.fi/jhei/>