Commits

Armin Rigo committed c1aa7af

Some more transaction-safety.

Comments (0)

Files changed (1)

rpython/rtyper/module/ll_time.py

             if self.GETTIMEOFDAY_NO_TZ:
                 c_gettimeofday = self.llexternal('gettimeofday',
                                  [self.TIMEVALP], rffi.INT,
-                                  _nowrapper=True, releasegil=False)
+                                  _nowrapper=True, releasegil=False,
+                                  transactionsafe=True)
             else:
                 c_gettimeofday = self.llexternal('gettimeofday',
                                  [self.TIMEVALP, rffi.VOIDP], rffi.INT,
-                                  _nowrapper=True, releasegil=False)
+                                  _nowrapper=True, releasegil=False,
+                                  transactionsafe=True)
             c_ftime = None # We have gettimeofday(2), so force ftime(3) OFF.
         else:
             c_gettimeofday = None
                 self.configure(CConfigForFTime)
                 c_ftime = self.llexternal(FTIME, [lltype.Ptr(self.TIMEB)],
                                           lltype.Void,
-                                          _nowrapper=True, releasegil=False)
+                                          _nowrapper=True, releasegil=False,
+                                          transactionsafe=True)
             else:
                 c_ftime = None    # to not confuse the flow space
 
         c_time = self.llexternal('time', [rffi.VOIDP], rffi.TIME_T,
-                                 _nowrapper=True, releasegil=False)
+                                 _nowrapper=True, releasegil=False,
+                                 transactionsafe=True)
 
         def time_time_llimpl():
             void = lltype.nullptr(rffi.VOIDP.TO)
             A = lltype.FixedSizeArray(lltype.SignedLongLong, 1)
             QueryPerformanceCounter = self.llexternal(
                 'QueryPerformanceCounter', [lltype.Ptr(A)], lltype.Void,
-                releasegil=False)
+                releasegil=False, transactionsafe=True)
             QueryPerformanceFrequency = self.llexternal(
                 'QueryPerformanceFrequency', [lltype.Ptr(A)], rffi.INT,
-                releasegil=False)
+                releasegil=False, transactionsafe=True)
             class State(object):
                 pass
             state = State()
             c_getrusage = self.llexternal('getrusage', 
                                           [rffi.INT, lltype.Ptr(RUSAGE)],
                                           lltype.Void,
-                                          releasegil=False)
+                                          releasegil=False,
+                                          transactionsafe=True)
             def time_clock_llimpl():
                 a = lltype.malloc(RUSAGE, flavor='raw')
                 c_getrusage(RUSAGE_SELF, a)