/[guile]/guile/guile-core/libguile/__scm.h
ViewVC logotype

Diff of /guile/guile-core/libguile/__scm.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.92 by mdj, Mon Dec 9 13:42:58 2002 UTC revision 1.93 by mdj, Tue Dec 10 09:35:06 2002 UTC
# Line 403  do { \ Line 403  do { \
403      scm_async_click (); \      scm_async_click (); \
404  } while (0)  } while (0)
405    
 #if (SCM_DEBUG_INTERRUPTS == 1)  
 #include <stdio.h>  
 #define SCM_CHECK_NOT_DISABLED \  
   do { \  
     if (scm_ints_disabled) \  
       fprintf(stderr, "ints already disabled (at %s:%d)\n", \  
               __FILE__, __LINE__); \  
   } while (0)  
   
 #define SCM_CHECK_NOT_ENABLED \  
   do { \  
     if (!scm_ints_disabled) \  
       fprintf(stderr, "ints already enabled (at %s:%d)\n", \  
               __FILE__, __LINE__); \  
   } while (0)  
   
 #else  
 #define SCM_CHECK_NOT_DISABLED  
 #define SCM_CHECK_NOT_ENABLED  
 #endif  
   
406    
407  /* Anthony Green writes:  /* Anthony Green writes:
408     When the compiler sees...     When the compiler sees...
# Line 446  do { \ Line 425  do { \
425  #define SCM_FENCE  #define SCM_FENCE
426  #endif  #endif
427    
428  #define SCM_DEFER_INTS                          \  #define SCM_DEFER_INTS SCM_REC_CRITICAL_SECTION_START (scm_i_defer)
 do {                                            \  
   SCM_FENCE;                                    \  
   SCM_CHECK_NOT_DISABLED;                       \  
   SCM_REC_CRITICAL_SECTION_START (scm_i_defer); \  
   SCM_FENCE;                                    \  
   scm_ints_disabled = 1;                        \  
   SCM_FENCE;                                    \  
 } while (0)  
   
   
 #define SCM_ALLOW_INTS                          \  
 do {                                            \  
   SCM_FENCE;                                    \  
   SCM_CHECK_NOT_ENABLED;                        \  
   SCM_REC_CRITICAL_SECTION_END (scm_i_defer);   \  
   SCM_FENCE;                                    \  
   scm_ints_disabled = 0;                        \  
   SCM_FENCE;                                    \  
   SCM_THREAD_SWITCHING_CODE;                    \  
   SCM_FENCE;                                    \  
 } while (0)  
   
   
 #define SCM_REDEFER_INTS                        \  
 do {                                            \  
   SCM_FENCE;                                    \  
   SCM_REC_CRITICAL_SECTION_START (scm_i_defer); \  
   ++scm_ints_disabled;                          \  
   SCM_FENCE;                                    \  
 } while (0)  
429    
430    #define SCM_ALLOW_INTS SCM_REC_CRITICAL_SECTION_END (scm_i_defer)
431    
432  #define SCM_REALLOW_INTS                        \  #define SCM_REDEFER_INTS SCM_DEFER_INTS
 do {                                            \  
   SCM_FENCE;                                    \  
   SCM_REC_CRITICAL_SECTION_END (scm_i_defer);   \  
   SCM_FENCE;                                    \  
   --scm_ints_disabled;                          \  
   SCM_FENCE;                                    \  
 } while (0)  
433    
434    #define SCM_REALLOW_INTS SCM_ALLOW_INTS
435    
436  #define SCM_TICK \  #define SCM_TICK \
437  do { \  do { \

Legend:
Removed from v.1.92  
changed lines
  Added in v.1.93

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26